Token导航 LogoToken导航

Agent Skill · 研究检索

subagent-creation(子 Agent 创建)

subagent-creation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

subagent-creation 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 44,750。

总安装 894周安装 38GitHub Stars 88下载 313核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:subagent-creation(子 Agent 创建)
来源仓库:https://github.com/supercent-io/skills-template
仓库路径:skills/subagent-creation
安装命令:
npx skills add https://github.com/supercent-io/skills-template --skill subagent-creation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/supercent-io/skills-template --skill subagent-creation

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。适合根据关键词、任务场景快速定位候选结果。通过 npx skills add 命令从指定仓库安装使用。建议确认权限范围和维护状态,避免触发联网或文件读写操作。

subagent-creation 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/subagent-creation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/supercent-io/skills-template --skill subagent-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

subagent-creation 怎么安装?

在终端执行 npx skills add https://github.com/supercent-io/skills-template --skill subagent-creation。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

subagent-creation 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

subagent-creation 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/supercent-io/skills-template --skill subagent-creation;npx skills add supercent-io/skills-template --skill "subagent-creation" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

subagent-creation 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

subagent-creation 用的人多吗?

公开数据是累计安装 894 次,近一周安装 38 次,下载 313 次,GitHub 88 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

subagent-creation 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
subagent-creation

子 Agent 创建 · 本页

89488执行命令MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Claude Code Subagent Creation

When to use this skill

  • Defining specialized AI experts for specific tasks
  • Creating reusable agent configurations for team workflows
  • Implementing task delegation patterns
  • Setting up automated code review, debugging, or analysis workflows
  • Creating agents with custom prompts and tool permissions

Instructions

Step 1: Understanding Subagents

Claude Code subagents are pre-configured AI experts that the main Claude delegates work to.

Core benefits:

  • Context isolation: Each agent has separate 200K token context
  • Specialized expertise: Focused prompts for specific domains
  • Reusability: Share agents via Git across projects
  • Flexible permissions: Control which tools each agent can use
  • No nesting: Prevents infinite loops - subagents cannot spawn more subagents

Agent types:

  • Built-in agents: Explore (read-only, Haiku), Plan (research), General-purpose (Sonnet)
  • Custom agents: User-defined with custom prompts and permissions

Step 2: Agent Configuration File

Subagents are defined as Markdown files with YAML frontmatter.

File location (priority order):

  1. Project-level: .claude/agents/{agent-name}.md
  2. User-level: ~/.claude/agents/{agent-name}.md

File format:

---
name: code-reviewer
description: Review code changes for quality, security, and best practices. Use immediately after code changes.
tools: [Read, Grep, Glob, Bash, LSP]
model: inherit
---

# Code Reviewer

You are a senior code reviewer with expertise in:
- Code quality and maintainability
- Security vulnerabilities
- Performance optimization
- Best practices and design patterns

## Review Checklist

- [ ] Does the code follow project conventions?
- [ ] Are there any security vulnerabilities?
- [ ] Is the code readable and maintainable?
- [ ] Are there performance concerns?
- [ ] Are tests adequate?
- [ ] Is documentation complete?

## Review Guidelines

1. **Prioritize critical issues**: Security bugs, data races, memory leaks
2. **Be constructive**: Provide clear explanations and suggestions
3. **Consider trade-offs**: Don't optimize prematurely
4. **Reference standards**: Link to relevant docs/style guides

## Output Format

Critical Issues (Must Fix)

  • Issue: Description File: path/to/file.ts:123 Suggestion: How to fix

Suggestions (Should Fix)

...

Nice to Have

...

Step 3: YAML Frontmatter Configuration

Required fields:

FieldTypeDescription
namestringAgent identifier (kebab-case)
descriptionstringWhen to use this agent (1-2 sentences)
toolslistTools the agent can access (omit to inherit)

Optional fields:

FieldTypeDescriptionDefault
modelstringModel to useinherit
versionstringAgent versionNone

Model options:

  • inherit: Use same model as main Claude
  • sonnet: Claude 3.5 Sonnet
  • haiku: Claude 3 Haiku (faster, cheaper)
  • opus: Claude 3 Opus

Tool options: Read, Write, Edit, Grep, Glob, Bash, LSP tools

Step 4: System Prompt Writing

Best practices:

  1. Define role clearly: "You are a [role] with expertise in [domains]"
  2. Include checklist: Concrete steps for evaluation/execution
  3. Provide examples: Show input-output pairs
  4. Specify format: Define exactly how results should be presented
  5. Set boundaries: What the agent should NOT do

Example prompt structure:

You are a [ROLE] specializing in [DOMAIN].

## Responsibilities
- Task 1
- Task 2

## Process
1. Step 1: ...
2. Step 2: ...

## Checklist
- [ ] Item 1
- [ ] Item 2

## Output Format
[Template]

## Constraints
- Constraint 1
- Constraint 2

Step 5: Creating Common Agent Types

Agent 1: Code Reviewer

.claude/agents/code-reviewer.md:

---
name: code-reviewer
description: Review code changes for quality, security, and best practices.
tools: [Read, Grep, Glob, LSP]
model: inherit
---

# Code Reviewer

Review code changes focusing on:
1. **Security**: Authentication, authorization, injection risks
2. **Quality**: Clean code principles, maintainability
3. **Performance**: Time/space complexity, bottlenecks
4. **Tests**: Coverage, edge cases

## Priority Levels
- **Critical**: Security vulnerabilities, data corruption
- **High**: Performance issues, logic errors
- **Medium**: Code smell, missing tests
- **Low**: Style, minor improvements
Agent 2: Debugger

.claude/agents/debugger.md:

---
name: debugger
description: Analyze errors and implement fixes. Use when encountering bugs or failures.
tools: [Read, Write, Edit, Bash, Grep, Glob, LSP]
model: inherit
---

# Debugger

Systematically debug issues:
1. **Understand the problem**: Read error messages, logs
2. **Reproduce**: Try to recreate the issue
3. **Analyze**: Identify root cause
4. **Fix**: Implement minimal fix
5. **Verify**: Confirm the fix works
6. **Test**: Check for regressions

## Debugging Strategy
- Use `grep` to search for error-related code
- Check recent changes with `git log`
- Add logging if needed to trace execution
- Fix one issue at a time
- Verify fix doesn't break existing functionality
Agent 3: Test Writer

.claude/agents/test-writer.md:

---
name: test-writer
description: Write comprehensive unit and integration tests for new code.
tools: [Read, Write, Edit, Grep, Glob]
model: inherit
---

# Test Writer

Write tests following these principles:
1. **AAA pattern**: Arrange, Act, Assert
2. **Descriptive names**: Test names explain what they verify
3. **One assertion per test**: Clear failure reasons
4. **Test happy path**: Main functionality
5. **Test edge cases**: Boundary conditions, nulls, errors
6. **Mock external dependencies**: Isolate code under test

## Test Coverage Goals
- Unit tests: 80%+ coverage
- Integration tests: Critical user flows
- E2E tests: Key user journeys

## Framework-Specific Guidelines
**Jest**: Use `describe`, `test`, `expect`, `beforeEach`, `afterEach`
**Pytest**: Use `def test_`, `assert`, `@pytest.fixture`
**Go testing**: Use `TestXxx`, `t.Run`, `assert.Equal`
Agent 4: Performance Analyzer

.claude/agents/performance-analyzer.md:

---
name: performance-analyzer
description: Analyze code performance and identify optimization opportunities.
tools: [Read, Grep, Glob, LSP]
model: sonnet
---

# Performance Analyzer

Focus on:
1. **Time complexity**: Algorithm efficiency
2. **Space complexity**: Memory usage
3. **Database queries**: N+1 queries, missing indexes
4. **I/O operations**: File system, network calls
5. **Caching**: Missed caching opportunities

## Analysis Steps
1. Profile code to find hotspots
2. Review algorithm choices
3. Check database query patterns
4. Look for redundant computations
5. Identify parallelization opportunities

## Report Format

Performance Issues Found

Critical (High Impact)

  • Impact: [description] Suggestion: [optimization]

Moderate (Medium Impact)

...

Low (Minor)

...

Agent 5: Documentation Writer

.claude/agents/doc-writer.md:

---
name: doc-writer
description: Write clear, comprehensive documentation for code, APIs, and features.
tools: [Read, Write, Edit, Grep, Glob]
model: inherit
---

# Documentation Writer

Write documentation that is:
- **Clear**: Simple language, avoid jargon
- **Complete**: Cover all use cases
- **Accurate**: Keep docs in sync with code
- **Actionable**: Include examples
- **Searchable**: Use consistent terminology

## Documentation Types
- **README**: Project overview, setup, usage
- **API docs**: Endpoints, parameters, examples
- **Code comments**: Why, not what
- **Changelog**: Version history, breaking changes

## Writing Guidelines
1. Start with user goals
2. Provide examples for each feature
3. Link related documentation
4. Update docs when code changes
5. Use active voice and present tense

Step 6: CLI Configuration

Create agents via CLI for automation:

Single agent:

claude --agents '{
  "code-reviewer": {
    "description": "Review code changes for quality and security",
    "tools": ["Read", "Grep", "Glob", "LSP"],
    "model": "inherit"
  }
}'

Multiple agents:

claude --agents '{
  "code-reviewer": {"description": "...", "tools": ["Read"]},
  "debugger": {"description": "...", "tools": ["Read", "Write", "Edit"]},
  "test-writer": {"description": "...", "tools": ["Read", "Write"]}
}'

Add hooks for automation:

# PostToolUse hook - automatically invoke debugger on errors
claude --hooks '{
  "PostToolUse": {
    "onError": "debugger"
  }
}'

Step 7: Using Subagents

Explicit Invocation

Directly call an agent:

"Use code-reviewer to review the recent authentication changes."
"Invoke debugger agent to fix the failing test."
Automatic Delegation

Claude automatically delegates based on agent descriptions:

"Refactor the authentication logic for better security."
→ Claude delegates to: code-reviewer (security expert)
"Fix the database connection timeout error."
→ Claude delegates to: debugger (error fixing)
Agent Chaining

Chain multiple agents for complex tasks:

"Use performance-analyzer to identify bottlenecks, then debugger to fix them."
"Let code-reviewer check the changes, then doc-writer update the documentation."
Resume Previous Context

Resume a previous agent session:

"Resume the code-reviewer session with agentId abc123 to continue where we left off."

Step 8: Version Control

Share agents via Git:

Commit agents:

cd /path/to/project
git add .claude/agents/
git commit -m "feat: add code-reviewer and debugger agents"
git push

Clone project with agents:

git clone https://github.com/myorg/project.git
# Agents are automatically available in .claude/agents/

Examples

Example 1: Complete Agent Creation Workflow

# 1. Create project-level agents directory
mkdir -p .claude/agents

# 2. Create code-reviewer agent
cat > .claude/agents/code-reviewer.md << 'EOF'
---
name: code-reviewer
description: Review code changes for quality, security, and best practices.
tools: [Read, Grep, Glob, LSP]
model: inherit
---

# Code Reviewer

Review code focusing on security, quality, performance, and tests.

## Priority
- Critical: Security vulnerabilities, data corruption
- High: Performance issues, logic errors
- Medium: Code smell, missing tests
- Low: Style improvements
EOF

# 3. Commit to Git
git add .claude/agents/code-reviewer.md
git commit -m "feat: add code-reviewer subagent"
git push

Example 2: Automated Code Review Workflow

Scenario: After completing a feature, automatically review code.

Setup:

# Create post-commit hook
cat > .git/hooks/post-commit << 'EOF'
#!/bin/bash
claude --agents '{
  "code-reviewer": {
    "description": "Review HEAD commit for quality and security",
    "tools": ["Read", "Grep", "Glob", "LSP"],
    "model": "inherit"
  }
}' << INPUT
Review the changes in the most recent commit.
INPUT
EOF
chmod +x .git/hooks/post-commit

Usage:

git commit -m "feat: add user authentication"
# Post-commit hook automatically invokes code-reviewer

Example 3: Multi-Agent Pipeline

Scenario: Code → Review → Test → Document

In Claude Code:

"Here's the new payment processing code I just wrote.

Use the following agents in sequence:
1. code-reviewer - Check for security issues and quality
2. test-writer - Write unit tests for the payment flow
3. doc-writer - Update API documentation

Return a summary of all findings."

Example 4: Specialized Domain Agent

.claude/agents/database-expert.md:

---
name: database-expert
description: Design and optimize database schemas, queries, and migrations.
tools: [Read, Write, Edit, Grep, Glob, Bash]
model: sonnet
---

# Database Expert

Expertise in:
- SQL design (PostgreSQL, MySQL, SQLite)
- NoSQL design (MongoDB, Redis, DynamoDB)
- Query optimization and indexing
- Migration strategies
- Data modeling and normalization

## Review Checklist
- [ ] Schema normalized? (3NF for relational DBs)
- [ ] Appropriate indexes?
- [ ] Query performance acceptable?
- [ ] Foreign keys/constraints defined?
- [ ] Migration reversible?
- [ ] Backup strategy documented?

## Optimization Tips
1. Use EXPLAIN ANALYZE to analyze query plans
2. Create composite indexes for multi-column WHERE clauses
3. Avoid SELECT * in production
4. Use connection pooling
5. Implement read replicas for read-heavy workloads

Design Principles

  1. Single responsibility: Each agent has one focused role
  2. Minimal permissions: Only grant tools actually needed
  3. Detailed prompts: Include checklists, steps, examples
  4. Model selection: Choose model based on task complexity
  5. Version control: Track agent configurations in Git
  6. Reusability: Design agents to work across projects
  7. Clear descriptions: Help Claude understand when to delegate

Common Patterns

PatternUse CaseExample
Code → Review → FixIterative improvementCode changes, review, implement fixes
Analyze → OptimizePerformanceProfile, identify issues, optimize
Design → Implement → TestFeature developmentDesign, write code, test
Document → DeployReleaseUpdate docs, deploy

Best Practices

  1. Start with tools: Define what the agent needs, not what you think it needs
  2. Inherit model: Use model: inherit unless you need specific behavior
  3. Test prompts: Verify agents work as expected before relying on them
  4. Iterate: Improve agent prompts based on real usage
  5. Document agent usage: Add README notes on when/how to use each agent
  6. Use built-in agents: Explore, Plan, General-purpose cover many common cases

Common Pitfalls

  • Too broad scope: Agents should focus on one domain, not do everything
  • Missing constraints: Specify what agents should NOT do
  • Over-permissive tools: Grant minimal tools needed for the task
  • Unclear descriptions: Make descriptions specific so Claude knows when to delegate
  • No examples: Show input/output patterns in prompts

References

平台分布

Claude Code

26.05%
按下载量换算82

OpenCode

23.38%
按下载量换算73

Gemini CLI

19.09%
按下载量换算60

Codex

11.82%
按下载量换算37

Antigravity

7.77%
按下载量换算24

Cursor

3.45%
按下载量换算11

安全审计

暂无安全审计结果可展示。

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/supercent-io/skills-template --skill subagent-creation;npx skills add supercent-io/skills-template --skill "subagent-creation" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills