subagent-creator
它能做什么
这个技能指导 AI 创建子智能体,即拥有独立上下文、负责处理复杂任务的专门辅助角色。适合希望拥有专属验证者、调试者或协调者的人。
适用场景
- ✓当一项任务复杂到需要独立上下文时。
- ✓当你希望一个独立的检查者从全新角度审查工作时。
- ✓当你希望多个辅助角色同时处理不同部分时。
技能链接
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(creation)/subagent-creator/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请创建一个子智能体,检查我的代码改动是否有缺陷,并以简短的列表汇报。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能说明如何把子智能体编写为 markdown 文件,包括名称、何时使用的说明和清晰的步骤;以及什么时候普通技能就已足够。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Subagent Creator
This skill provides guidance for creating effective, agent-agnostic subagents.
What are Subagents?
Subagents are specialized assistants that an AI agent can delegate tasks to. Characteristics:
- Isolated context: Each subagent has its own context window
- Parallel execution: Multiple subagents can run simultaneously
- Specialization: Configured with specific prompts and expertise
- Reusable: Defined once, used in multiple contexts
When to Use Subagents vs Skills
Is the task complex with multiple steps?
├─ YES → Does it require isolated context?
│ ├─ YES → Use SUBAGENT
│ └─ NO → Use SKILL
│
└─ NO → Use SKILL
Use Subagents for:
- Complex workflows requiring isolated context
- Long-running tasks that benefit from specialization
- Verification and auditing (independent perspective)
- Parallel workstreams
Use Skills for:
- Quick, one-off actions
- Domain knowledge without context isolation
- Reusable procedures that don't need isolation
Subagent Structure
A subagent is typically a markdown file with frontmatter metadata:
---
name: agent-name
description: Description of when to use this subagent.
model: inherit # or fast, or specific model ID
readonly: false # true to restrict write permissions
---
You are an [expert in X].
When invoked:
1. [Step 1]
2. [Step 2]
3. [Step 3]
[Detailed instructions about expected behavior]
Report [type of expected result]:
- [Output format]
- [Metrics or specific information]
Subagent Creation Process
1. Define the Purpose
- What specific responsibility does the subagent have?
- Why does it need isolated context?
- Does it involve multiple complex steps?
- Does it require deep specialization?
2. Configure the Metadata
name (required)
Unique identifier. Use kebab-case.
name: security-auditor
description (critical)
CRITICAL for automatic delegation. Explains when to use this subagent.
Good descriptions:
- "Security specialist. Use when implementing auth, payments, or handling sensitive data."
- "Debugging specialist for errors and test failures. Use when encountering issues."
- "Validates completed work. Use after tasks are marked done."
Phrases that encourage automatic delegation:
- "Use proactively when..."
- "Always use for..."
- "Automatically delegate when..."
model (optional)
model: inherit # Uses same model as parent (default)
model: fast # Uses fast model for quick tasks
readonly (optional)
readonly: true # Restricts write permissions
3. Write the Subagent Prompt
Define:
- Identity: "You are an [expert]..."
- When invoked: Context of use
- Process: Specific steps to follow
- Expected output: Format and content
Template:
You are an [expert in X] specialized in [Y].
When invoked:
1. [First action]
2. [Second action]
3. [Third action]
[Detailed instructions about approach]
Report [type of result]:
- [Specific format]
- [Information to include]
- [Metrics or criteria]
[Philosophy or principles to follow]
Common Subagent Patterns
1. Verification Agent
Purpose: Independently validates that completed work actually works.
---
name: verifier
description: Validates completed work. Use after tasks are marked done.
model: fast
---
You are a skeptical validator.
When invoked:
1. Identify what was declared as complete
2. Verify the implementation exists and is functional
3. Execute tests or relevant verification steps
4. Look for edge cases that may have been missed
Be thorough. Report:
- What was verified and passed
- What is incomplete or broken
- Specific issues to address
2. Debugger
Purpose: Expert in root cause analysis.
---
name: debugger
description: Debugging specialist. Use when encountering errors or test failures.
---
You are a debugging expert.
When invoked:
1. Capture the error message and stack trace
2. Identify reproduction steps
3. Isolate the failure location
4. Implement minimal fix
5. Verify the solution works
For each issue, provide:
- Root cause explanation
- Evidence supporting the diagnosis
- Specific code fix
- Testing approach
3. Security Auditor
Purpose: Security expert auditing code.
---
name: security-auditor
description: Security specialist. Use for auth, payments, or sensitive data.
---
You are a security expert.
When i
常见问题
子智能体和技能有什么区别?
子智能体为复杂工作拥有独立的上下文窗口,而技能更简单,并与主上下文共享。
它适用于任何 AI 智能体吗?
是的。这些指导是为支持子智能体的任何智能体编写的。
子智能体可以同时运行吗?
可以。多个子智能体可以并行运行。
详情
作者的原始描述
Guide for creating AI subagents with isolated context for complex multi-step workflows. Use when users want to create a subagent, specialized agent, verifier, debugger, or orchestrator that requires isolated context and deep specialization. Works with any agent that supports subagent delegation. Triggers on "create subagent", "new agent", "specialized assistant", "create verifier". Do NOT use for Cursor-specific subagents (use cursor-subagent-creator instead).
热度
- GitHub 星标
- 7.1k
- 排名
- #13519
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
component-common-domain-detection
7.1k帮你的智能体找出代码库中多个部分重复的业务逻辑,并建议如何合并。
component-flattening-analysis
7.1k帮你的智能体找出位置不当的代码,并整理杂乱的组件文件夹结构,让每个部分都放在应在的位置。
component-identification-sizing
7.1k帮你的智能体梳理代码库的各个组成部分并测量其规模,以找出应首先拆分的模块。
coupling-analysis
7.1k帮你的智能体检查代码库各部分之间的依赖有多紧密,并找出应优先放松的连接。