[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77JMGNNPXH3RY7J33TY7TGV":3,"skill-same:01M77JMGNNPXH3RY7J33TY7TGV":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M77JMGNNPXH3RY7J33TY7TGV","create-subagents",null,"Expert guidance for creating, building, and using Claude Code subagents and the Task tool. Use when working with subagents, setting up agent configurations, understanding how agents work, or using the Task tool to launch specialized agents.","Elad73\u002Fagentic-base-layer","Elad73","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11886649?v=4","01M77JKHHH0GYX9ZBKNJ38QRAJ","EladRon","01M77JKHJNDTJ53993X2QNMHSG",0,"MIT","https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fcreate-subagents\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: create-subagents\ndescription: Expert guidance for creating, building, and using Claude Code subagents and the Task tool. Use when working with subagents, setting up agent configurations, understanding how agents work, or using the Task tool to launch specialized agents.\n---\n\n\u003Cobjective>\nSubagents are specialized Claude instances that run in isolated contexts with focused roles and limited tool access. This skill teaches you how to create effective subagents, write strong system prompts, configure tool access, and orchestrate multi-agent workflows using the Task tool.\n\nSubagents enable delegation of complex tasks to specialized agents that operate autonomously without user interaction, returning their final output to the main conversation.\n\u003C\u002Fobjective>\n\n\u003Csubagents_vs_skills>\n## Subagents vs. Skills — pick the right tool\n\n| | **Subagent** | **Skill** |\n|---|---|---|\n| **What it is** | A *separate* Claude instance with its own isolated context window | Reusable knowledge\u002Fprocedure loaded into the *current* context |\n| **Context** | Isolated; only its final report returns to the main thread | Shares your context; everything it loads stays in your window |\n| **Best for** | Heavy fan-out\u002Fparallel work, noisy exploration, role-isolated tasks (review, research) | Encoding how-to knowledge, conventions, multi-step procedures you run inline |\n| **Tools** | Can be restricted to a focused, least-privilege tool set | Uses whatever tools the session already has |\n| **Invocation** | Launched explicitly via the Task tool (or auto-selected by `description`) | Auto-triggered by its `description`, or via the Skill tool |\n| **State** | Returns a summary; intermediate work is discarded | Edits files, accrues context you keep |\n\nRule of thumb: reach for a **subagent** when you want to *offload* a chunk of work into a clean context; reach for a **skill** when you want Claude to *know how* to do something in-line (see the create-agent-skills skill).\n\u003C\u002Fsubagents_vs_skills>\n\n\u003Cfirst_invocation_rule>\n## The first invocation must carry everything\n\nA subagent cannot ask you a clarifying question mid-run — it is a black box that runs to completion and returns only its final output. There is no back-and-forth.\n\nTherefore the prompt you pass on the **first (and only) invocation must be self-contained**:\n- All requirements, constraints, and acceptance criteria stated up front\n- Any file paths, identifiers, or values the agent needs (it cannot guess your context)\n- The exact shape of the deliverable you want back\n- What it must NOT do\n\nIf the task is genuinely ambiguous, resolve the ambiguity in the **main chat first** (using AskUserQuestion), then launch the subagent with the resolved decision baked in. Never delegate a half-specified task and expect the agent to come back for clarification — it can't.\n\u003C\u002Ffirst_invocation_rule>\n\n\u003Cquick_start>\n\u003Cworkflow>\n1. Run `\u002Fagents` command\n2. Select \"Create New Agent\"\n3. Choose project-level (`.claude\u002Fagents\u002F`) or user-level (`~\u002F.claude\u002Fagents\u002F`)\n4. Define the subagent:\n   - **name**: lowercase-with-hyphens\n   - **description**: When should this subagent be used?\n   - **tools**: Optional comma-separated list (inherits all if omitted)\n   - **model**: Optional (`sonnet`, `opus`, `haiku`, or `inherit`)\n5. Write the system prompt (the subagent's instructions)\n\u003C\u002Fworkflow>\n\n\u003Cexample>\n```markdown\n---\nname: code-reviewer\ndescription: Expert code reviewer. Use proactively after code changes to review for quality, security, and best practices.\ntools: Read, Grep, Glob, Bash\nmodel: sonnet\n---\n\n\u003Crole>\nYou are a senior code reviewer focused on quality, security, and best practices.\n\u003C\u002Frole>\n\n\u003Cfocus_areas>\n- Code quality and maintainability\n- Security vulnerabilities\n- Performance issues\n- Best practices adherence\n\u003C\u002Ffocus_areas>\n\n\u003Coutput_format>\nProvide specific, actionable feedback with file:line references.\n\u003C\u002Foutput_format>\n```\n\u003C\u002Fexample>\n\u003C\u002Fquick_start>\n\n\u003Cfile_structure>\n| Type | Location | Scope | Priority |\n|------|----------|-------|----------|\n| **Project** | `.claude\u002Fagents\u002F` | Current project only | Highest |\n| **User** | `~\u002F.claude\u002Fagents\u002F` | All projects | Lower |\n| **Plugin** | Plugin's `agents\u002F` dir | All projects | Lowest |\n\nProject-level subagents override user-level when names conflict.\n\u003C\u002Ffile_structure>\n\n\u003Cconfiguration>\n\u003Cfield name=\"name\">\n- Lowercase letters and hyphens only\n- Must be unique\n\u003C\u002Ffield>\n\n\u003Cfield name=\"description\">\n- Natural language description of purpose\n- Include when Claude should invoke this subagent\n- Used for automatic subagent selection\n\u003C\u002Ffield>\n\n\u003Cfield name=\"tools\">\n- Comma-separated list: `Read, Write, Edit, Bash, Grep`\n- If omitted: inherits all tools from main thread\n- Use `\u002Fagents` interface to see all available tools\n\u003C\u002Ffield>\n\n\u003Cfield name=\"model\">\n- `sonnet`, `opus`, `haiku`, or `inherit`\n- `inherit`: uses same model as main conversation\n- If omitted: defaults to configured subagent model (usually sonnet)\n\u003C\u002Ffield>\n\u003C\u002Fconfiguration>\n\n\u003Cexecution_model>\n\u003Ccritical_constraint>\n**Subagents are black boxes that cannot interact with users.**\n\nSubagents run in isolated contexts and return their final output to the main conversation. They:\n- ✅ Can use tools like Read, Write, Edit, Bash, Grep, Glob\n- ✅ Can access MCP servers and other non-interactive tools\n- ❌ **Cannot use AskUserQuestion** or any tool requiring user interaction\n- ❌ **Cannot present options or wait for user input**\n- ❌ **User never sees subagent's intermediate steps**\n\nThe main conversation sees only the subagent's final report\u002Foutput.\n\u003C\u002Fcritical_constraint>\n\n\u003Cworkflow_design>\n**Designing workflows with subagents:**\n\nUse **main chat** for:\n- Gathering requirements from user (AskUserQuestion)\n- Presenting options or decisions to user\n- Any task requiring user confirmation\u002Finput\n- Work where user needs visibility into progress\n\nUse **subagents** for:\n- Research tasks (API documentation lookup, code analysis)\n- Code generation based on pre-defined requirements\n- Analysis and reporting (security review, test coverage)\n- Context-heavy operations that don't need user interaction\n\n**Example workflow pattern:**\n```\nMain Chat: Ask user for requirements (AskUserQuestion)\n  ↓\nSubagent: Research API and create documentation (no user interaction)\n  ↓\nMain Chat: Review research with user, confirm approach\n  ↓\nSubagent: Generate code based on confirmed plan\n  ↓\nMain Chat: Present results, handle testing\u002Fdeployment\n```\n\u003C\u002Fworkflow_design>\n\u003C\u002Fexecution_model>\n\n\u003Csystem_prompt_guidelines>\n\u003Cprinciple name=\"be_specific\">\nClearly define the subagent's role, capabilities, and constraints.\n\u003C\u002Fprinciple>\n\n\u003Cprinciple name=\"use_pure_xml_structure\">\nStructure the system prompt with pure XML tags. Remove ALL markdown headings from the body.\n\n```markdown\n---\nname: security-reviewer\ndescription: Reviews code for security vulnerabilities\ntools: Read, Grep, Glob, Bash\nmodel: sonnet\n---\n\n\u003Crole>\nYou are a senior code reviewer specializing in security.\n\u003C\u002Frole>\n\n\u003Cfocus_areas>\n- SQL injection vulnerabilities\n- XSS attack vectors\n- Authentication\u002Fauthorization issues\n- Sensitive data exposure\n\u003C\u002Ffocus_areas>\n\n\u003Cworkflow>\n1. Read the modified files\n2. Identify security risks\n3. Provide specific remediation steps\n4. Rate severity (Critical\u002FHigh\u002FMedium\u002FLow)\n\u003C\u002Fworkflow>\n```\n\u003C\u002Fprinciple>\n\n\u003Cprinciple name=\"task_specific\">\nTailor instructions to the specific task domain. Don't create generic \"helper\" subagents.\n\n❌ Bad: \"You are a helpful assistant that helps with code\"\n\u0005✅ Good: \"You are a React component refactoring specialist. Analyze components for hooks best practices, performance anti-patterns, and accessibility issues.\"\n\u003C\u002Fprinciple>\n\u003C\u002Fsystem_prompt_guidelines>\n\n\u003Csubagent_xml_structure>\nSubagent.md files are system prompts consumed only by Claude. Like skills and slash commands, they should use pure XML structure for optimal parsing and token efficiency.\n\n\u003Crecommended_tags>\nCommon tags for subagent structure:\n\n- `\u003Crole>` - Who the subagent is and what it does\n- `\u003Cconstraints>` - Hard rules (NEVER\u002FMUST\u002FALWAYS)\n- `\u003Cfocus_areas>` - What to prioritize\n- `\u003Cworkflow>` - Step-by-step process\n- `\u003Coutput_format>` - How to structure deliverables\n- `\u003Csuccess_criteria>` - Completion criteria\n- `\u003Cvalidation>` - How to verify work\n\u003C\u002Frecommended_tags>\n\n\u003Cintelligence_rules>\n**Simple subagents** (single focused task):\n- Use role + constraints + workflow minimum\n- Example: code-reviewer, test-runner\n\n**Medium subagents** (multi-step process):\n- Add workflow steps, output_format, success_criteria\n- Example: api-researcher, documentation-generator\n\n**Complex subagents** (research + generation + validation):\n- Add all tags as appropriate including validation, examples\n- Example: mcp-api-researcher, comprehensive-auditor\n\u003C\u002Fintelligence_rules>\n\n\u003Ccritical_rule>\n**Remove ALL markdown headings (##, ###) from subagent body.** Use semantic XML tags instead.\n\nKeep markdown formatting WITHIN content (bold, italic, lists, code blocks, links).\n\nFor XML structure principles and token efficiency details, see @skills\u002Fcreate-agent-skills\u002Freferences\u002Fuse-xml-tags.md - the same principles apply to subagents.\n\u003C\u002Fcritical_rule>\n\u003C\u002Fsubagent_xml_structure>\n\n\u003Cinvocation>\n\u003Cautomatic>\nClaude automatically selects subagents based on the `description` field when it matches the current task.\n\u003C\u002Fautomatic>\n\n\u003Cexplicit>\nYou can explicitly invoke a subagent:\n\n```\n> Use the code-reviewer subagent to check my recent changes\n```\n\n```\n> Have the test-writer subagent create tests for the new API endpoints\n```\n\u003C\u002Fexplicit>\n\u003C\u002Finvocation>\n\n\u003Cmanagement>\n\u003Cusing_agents_command>\nRun `\u002Fagents` for an interactive interface to:\n- View all available subagents\n- Create new subagents\n- Edit existing subagents\n- Delete custom subagents\n\u003C\u002Fusing_agents_command>\n\n\u003Cmanual_editing>\nYou can also edit subagent files directly:\n- Project: `.claude\u002Fagents\u002Fsubagent-name.md`\n- User: `~\u002F.claude\u002Fagents\u002Fsubagent-name.md`\n\u003C\u002Fmanual_editing>\n\u003C\u002Fmanagement>\n\n\u003Creference>\n**Core references**:\n\n**Subagent usage and configuration**: [references\u002Fsubagents.md](references\u002Fsubagents.md)\n- File format and configuration\n- Model selection (Sonnet + Haiku orchestration)\n- Tool security and least privilege\n- Prompt caching optimization\n- Complete examples\n\n**Writing effective prompts**: [references\u002Fwriting-subagent-prompts.md](references\u002Fwriting-subagent-prompts.md)\n- Core principles and XML structure\n- Description field optimization for routing\n- Extended thinking for complex reasoning\n- Security constraints and strong modal verbs\n- Success criteria definition\n\n**Advanced topics**:\n\n**Evaluation and testing**: [references\u002Fevaluation-and-testing.md](references\u002Fevaluation-and-testing.md)\n- Evaluation metrics (task completion, tool correctness, robustness)\n- Testing strategies (offline, simulation, online monitoring)\n- Evaluation-driven development\n- G-Eval for custom criteria\n\n**Error handling and recovery**: [references\u002Ferror-handling-and-recovery.md](references\u002Ferror-handling-and-recovery.md)\n- Common failure modes and causes\n- Recovery strategies (graceful degradation, retry, circuit breakers)\n- Structured communication and observability\n- Anti-patterns to avoid\n\n**Context management**: [references\u002Fcontext-management.md](references\u002Fcontext-management.md)\n- Memory architecture (STM, LTM, working memory)\n- Context strategies (summarization, sliding window, scratchpads)\n- Managing long-running tasks\n- Prompt caching interaction\n\n**Orchestration patterns**: [references\u002Forchestration-patterns.md](references\u002Forchestration-patterns.md)\n- Sequential, parallel, hierarchical, coordinator patterns\n- Sonnet + Haiku orchestration for cost\u002Fperformance\n- Multi-agent coordination\n- Pattern selection guidance\n\n**Debugging and troubleshooting**: [references\u002Fdebugging-agents.md](references\u002Fdebugging-agents.md)\n- Logging, tracing, and correlation IDs\n- Common failure types (hallucinations, format errors, tool misuse)\n- Diagnostic procedures\n- Continuous monitoring\n\u003C\u002Freference>\n\n\u003Csuccess_criteria>\nA well-configured subagent has:\n\n- Valid YAML frontmatter (name matches file, description includes triggers)\n- Clear role definition in system prompt\n- Appropriate tool restrictions (least privilege)\n- XML-structured system prompt with role, approach, and constraints\n- Description field optimized for automatic routing\n- Successfully tested on representative tasks\n- Model selection appropriate for task complexity (Sonnet for reasoning, Haiku for simple tasks)\n\u003C\u002Fsuccess_criteria>\n","\u003Cobjective>\nSubagents are specialized Claude instances that run in isolated contexts with focused roles and limited tool access. This skill teaches you how to create effective subagents, write strong system prompts, configure tool access, and orchestrate multi-agent workflows using the Task tool.\n\nSubagents enable delegation of complex tasks to specialized agents that operate autonomously without user interaction, returning their final output to the main conversation.\n\u003C\u002Fobjective>\n\n\u003Csubagents_vs_skills>\n## Subagents vs. Skills — pick the right tool\n\n| | **Subagent** | **Skill** |\n|---|---|---|\n| **What it is** | A *separate* Claude instance with its own isolated context window | Reusable knowledge\u002Fprocedure loaded into the *current* context |\n| **Context** | Isolated; only its final report returns to the main thread | Shares your context; everything it loads stays in your window |\n| **Best for** | Heavy fan-out\u002Fparallel work, noisy exploration, role-isolated tasks (review, research) | Encoding how-to knowledge, conventions, multi-step procedures you run inline |\n| **Tools** | Can be restricted to a focused, least-privilege tool set | Uses whatever tools the session already has |\n| **Invocation** | Launched explicitly via the Task tool (or auto-selected by `description`) | Auto-triggered by its `description`, or via the Skill tool |\n| **State** | Returns a summary; intermediate work is discarded | Edits files, accrues context you keep |\n\nRule of thumb: reach for a **subagent** when you want to *offload* a chunk of work into a clean context; reach for a **skill** when you want Claude to *know how* to do something in-line (see the create-agent-skills skill).\n\u003C\u002Fsubagents_vs_skills>\n\n\u003Cfirst_invocation_rule>\n## The first invocation must carry everything\n\nA subagent cannot ask you a clarifying question mid-run — it is a black box that runs to completion and returns only its final output. There is no back-and-forth.\n\nTherefore the prompt you pass on the **first (and only) invocation must be self-contained**:\n- All requirements, constraints, and acceptance criteria stated up front\n- Any file paths, identifiers, or values the agent needs (it cannot guess your context)\n- The exact shape of the deliverable you want back\n- What it must NOT do\n\nIf the task is genuinely ambiguous, resolve the ambiguity in the **main chat first** (using AskUserQuestion), then launch the subagent with the resolved decision baked in. Never delegate a half-specified task and expect the agent to come back for clarification — it can't.\n\u003C\u002Ffirst_invocation_rule>\n\n\u003Cquick_start>\n\u003Cworkflow>\n1. Run `\u002Fagents` command\n2. Select \"Create New Agent\"\n3. Choose project-level (`.claude\u002Fagents\u002F`) or user-level (`~\u002F.claude\u002Fagents\u002F`)\n4. Define the subagent:\n   - **name**: lowercase-with-hyphens\n   - **description**: When should this subagent be used?\n   - **tools**: Optional comma-separated list (inherits all if omitted)\n   - **model**: Optional (`sonnet`, `opus`, `haiku`, or `inherit`)\n5. Write the system prompt (the subagent's instructions)\n\u003C\u002Fworkflow>\n\n\u003Cexample>\n```markdown\n---\nname: code-reviewer\ndescription: Expert code reviewer. Use proactively after code changes to review for quality, security, and best practices.\ntools: Read, Grep, Glob, Bash\nmodel: sonnet\n---\n\n\u003Crole>\nYou are a senior code reviewer focused on quality, security, and best practices.\n\u003C\u002Frole>\n\n\u003Cfocus_areas>\n- Code quality and maintainability\n- Security vulnerabilities\n- Performance issues\n- Best practices adherence\n\u003C\u002Ffocus_areas>\n\n\u003Coutput_format>\nProvide specific, actionable feedback with file:line references.\n\u003C\u002Foutput_format>\n```\n\u003C\u002Fexample>\n\u003C\u002Fquick_start>\n\n\u003Cfile_structure>\n| Type | Location | Scope | Priority |\n|------|----------|-------|----------|\n| **Project** | `.claude\u002Fagents\u002F` | Current project only | Highest |\n| **User** | `~\u002F.claude\u002Fagents\u002F` | All projects | Lower |\n| **Plugin** | Plugin's `agents\u002F` dir | All projects | Lowest |\n\nProject-level subagents override user-level when names conflict.\n\u003C\u002Ffile_structure>\n\n\u003Cconfiguration>\n\u003Cfield name=\"name\">\n- Lowercase letters and hyphens only\n- Must be unique\n\u003C\u002Ffield>\n\n\u003Cfield name=\"description\">\n- Natural language description of purpose\n- Include when Claude should invoke this subagent\n- Used for automatic subagent selection\n\u003C\u002Ffield>\n\n\u003Cfield name=\"tools\">\n- Comma-separated list: `Read, Write, Edit, Bash, Grep`\n- If omitted: inherits all tools from main thread\n- Use `\u002Fagents` interface to see all available tools\n\u003C\u002Ffield>\n\n\u003Cfield name=\"model\">\n- `sonnet`, `opus`, `haiku`, or `inherit`\n- `inherit`: uses same model as main conversation\n- If omitted: defaults to configured subagent model (usually sonnet)\n\u003C\u002Ffield>\n\u003C\u002Fconfiguration>\n\n\u003Cexecution_model>\n\u003Ccritical_constraint>\n**Subagents are black boxes that cannot interact with users.**\n\nSubagents run in isolated contexts and return their final output to the main conversation. They:\n- ✅ Can use tools like Read, Write, Edit, Bash, Grep, Glob\n- ✅ Can access MCP servers and other non-interactive tools\n- ❌ **Cannot use AskUserQuestion** or any tool requiring user interaction\n- ❌ **Cannot present options or wait for user input**\n- ❌ **User never sees subagent's intermediate steps**\n\nThe main conversation sees only the subagent's final report\u002Foutput.\n\u003C\u002Fcritical_constraint>\n\n\u003Cworkflow_design>\n**Designing workflows with subagents:**\n\nUse **main chat** for:\n- Gathering requirements from user (AskUserQuestion)\n- Presenting options or decisions to user\n- Any task requiring user confirmation\u002Finput\n- Work where user needs visibility into progress\n\nUse **subagents** for:\n- Research tasks (API documentation lookup, code analysis)\n- Code generation based on pre-defined requirements\n- Analysis and reporting (security review, test coverage)\n- Context-heavy operations that don't need user interaction\n\n**Example workflow pattern:**\n```\nMain Chat: Ask user for requirements (AskUserQuestion)\n  ↓\nSubagent: Research API and create documentation (no user interaction)\n  ↓\nMain Chat: Review research with user, confirm approach\n  ↓\nSubagent: Generate code based on confirmed plan\n  ↓\nMain Chat: Present results, handle testing\u002Fdeployment\n```\n\u003C\u002Fworkflow_design>\n\u003C\u002Fexecution_model>\n\n\u003Csystem_prompt_guidelines>\n\u003Cprinciple name=\"be_specific\">\nClearly define the subagent's role, capabilities, and constraints.\n\u003C\u002Fprinciple>\n\n\u003Cprinciple name=\"use_pure_xml_structure\">\nStructure the system prompt with pure XML tags. Remove ALL markdown headings from the body.\n\n```markdown\n---\nname: security-reviewer\ndescription: Reviews code for security vulnerabilities\ntools: Read, Grep, Glob, Bash\nmodel: sonnet\n---\n\n\u003Crole>\nYou are a senior code reviewer specializing in security.\n\u003C\u002Frole>\n\n\u003Cfocus_areas>\n- SQL injection vulnerabilities\n- XSS attack vectors\n- Authentication\u002Fauthorization issues\n- Sensitive data exposure\n\u003C\u002Ffocus_areas>\n\n\u003Cworkflow>\n1. Read the modified files\n2. Identify security risks\n3. Provide specific remediation steps\n4. Rate severity (Critical\u002FHigh\u002FMedium\u002FLow)\n\u003C\u002Fworkflow>\n```\n\u003C\u002Fprinciple>\n\n\u003Cprinciple name=\"task_specific\">\nTailor instructions to the specific task domain. Don't create generic \"helper\" subagents.\n\n❌ Bad: \"You are a helpful assistant that helps with code\"\n\u0005✅ Good: \"You are a React component refactoring specialist. Analyze components for hooks best practices, performance anti-patterns, and accessibility issues.\"\n\u003C\u002Fprinciple>\n\u003C\u002Fsystem_prompt_guidelines>\n\n\u003Csubagent_xml_structure>\nSubagent.md files are system prompts consumed only by Claude. Like skills and slash commands, they should use pure XML structure for optimal parsing and token efficiency.\n\n\u003Crecommended_tags>\nCommon tags for subagent structure:\n\n- `\u003Crole>` - Who the subagent is and what it does\n- `\u003Cconstraints>` - Hard rules (NEVER\u002FMUST\u002FALWAYS)\n- `\u003Cfocus_areas>` - What to prioritize\n- `\u003Cworkflow>` - Step-by-step process\n- `\u003Coutput_format>` - How to structure deliverables\n- `\u003Csuccess_criteria>` - Completion criteria\n- `\u003Cvalidation>` - How to verify work\n\u003C\u002Frecommended_tags>\n\n\u003Cintelligence_rules>\n**Simple subagents** (single focused task):\n- Use role + constraints + workflow minimum\n- Example: code-reviewer, test-runner\n\n**Medium subagents** (multi-step process):\n- Add workflow steps, output_format, success_criteria\n- Example: api-researcher, documentation-generator\n\n**Complex subagents** (research + generation + validation):\n- Add all tags as appropriate including validation, examples\n- Example: mcp-api-researcher, comprehensive-auditor\n\u003C\u002Fintelligence_rules>\n\n\u003Ccritical_rule>\n**Remove ALL markdown headings (##, ###) from subagent body.** Use semantic XML tags instead.\n\nKeep markdown formatting WITHIN content (bold, italic, lists, code blocks, links).\n\nFor XML structure principles and token efficiency details, see @skills\u002Fcreate-agent-skills\u002Freferences\u002Fuse-xml-tags.md - the same principles apply to subagents.\n\u003C\u002Fcritical_rule>\n\u003C\u002Fsubagent_xml_structure>\n\n\u003Cinvocation>\n\u003Cautomatic>\nClaude automatically selects subagents based on the `description` field when it matches the current task.\n\u003C\u002Fautomatic>\n\n\u003Cexplicit>\nYou can explicitly invoke a subagent:\n\n```\n> Use the code-reviewer subagent to check my recent changes\n```\n\n```\n> Have the test-writer subagent create tests for the new API endpoints\n```\n\u003C\u002Fexplicit>\n\u003C\u002Finvocation>\n\n\u003Cmanagement>\n\u003Cusing_agents_command>\nRun `\u002Fagents` for an interactive interface to:\n- View all available subagents\n- Create new subagents\n- Edit existing subagents\n- Delete custom subagents\n\u003C\u002Fusing_agents_command>\n\n\u003Cmanual_editing>\nYou can also edit subagent files directly:\n- Project: `.claude\u002Fagents\u002Fsubagent-name.md`\n- User: `~\u002F.claude\u002Fagents\u002Fsubagent-name.md`\n\u003C\u002Fmanual_editing>\n\u003C\u002Fmanagement>\n\n\u003Creference>\n**Core references**:\n\n**Subagent usage and configuration**: [references\u002Fsubagents.md](references\u002Fsubagents.md)\n- File format and configuration\n- Model selection (Sonnet + Haiku orchestration)\n- Tool security and least privilege\n- Prompt caching optimization\n- Complete examples\n\n**Writing effective prompts**: [references\u002Fwriting-subagent-prompts.md](references\u002Fwriting-subagent-prompts.md)\n- Core principles and XML structure\n- Description field optimization for routing\n- Extended thinking for complex reasoning\n- Security constraints and strong modal verbs\n- Success criteria definition\n\n**Advanced topics**:\n\n**Evaluation and testing**: [references\u002Fevaluation-and-testing.md](references\u002Fevaluation-and-testing.md)\n- Evaluation metrics (task completion, tool correctness, robustness)\n- Testing strategies (offline, simulation, online monitoring)\n- Evaluation-driven development\n- G-Eval for custom criteria\n\n**Error handling and recovery**: [references\u002Ferror-handling-and-recovery.md](references\u002Ferror-handling-and-recovery.md)\n- Common failure modes and causes\n- Recovery strategies (graceful degradation, retry, circuit breakers)\n- Structured communication and observability\n- Anti-patterns to avoid\n\n**Context management**: [references\u002Fcontext-management.md](references\u002Fcontext-management.md)\n- Memory architecture (STM, LTM, working memory)\n- Context strategies (summarization, sliding window, scratchpads)\n- Managing long-running tasks\n- Prompt caching interaction\n\n**Orchestration patterns**: [references\u002Forchestration-patterns.md](references\u002Forchestration-patterns.md)\n- Sequential, parallel, hierarchical, coordinator patterns\n- Sonnet + Haiku orchestration for cost\u002Fperformance\n- Multi-agent coordination\n- Pattern selection guidance\n\n**Debugging and troubleshooting**: [references\u002Fdebugging-agents.md](references\u002Fdebugging-agents.md)\n- Logging, tracing, and correlation IDs\n- Common failure types (hallucinations, format errors, tool misuse)\n- Diagnostic procedures\n- Continuous monitoring\n\u003C\u002Freference>\n\n\u003Csuccess_criteria>\nA well-configured subagent has:\n\n- Valid YAML frontmatter (name matches file, description includes triggers)\n- Clear role definition in system prompt\n- Appropriate tool restrictions (least privilege)\n- XML-structured system prompt with role, approach, and constraints\n- Description field optimized for automatic routing\n- Successfully tested on representative tasks\n- Model selection appropriate for task complexity (Sonnet for reasoning, Haiku for simple tasks)\n\u003C\u002Fsuccess_criteria>\n",{"name":5,"description":7},"main","49131d07c65f27037f747a6e0ae748ff6f082fc1","global\u002Fskills\u002Fcreate-subagents","https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer","https:\u002F\u002Fgithub.com\u002FElad73","2026-06-23 00:00:33",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add Elad73\u002Fagentic-base-layer --skill create-subagents",{"tool":36,"command":37},"bunx","bunx skills add Elad73\u002Fagentic-base-layer --skill create-subagents",{"tool":39,"command":40},"pnpm","pnpm dlx skills add Elad73\u002Fagentic-base-layer --skill create-subagents","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fcreate-subagents\u002FSKILL.md",true,[44,50,54,58,62,66,70],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fcontext-management.md","REFERENCE","参考文档",15543,"https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fcreate-subagents\u002Freferences\u002Fcontext-management.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fdebugging-agents.md",18919,"https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fcreate-subagents\u002Freferences\u002Fdebugging-agents.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Ferror-handling-and-recovery.md",14872,"https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fcreate-subagents\u002Freferences\u002Ferror-handling-and-recovery.md",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fevaluation-and-testing.md",11136,"https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fcreate-subagents\u002Freferences\u002Fevaluation-and-testing.md",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Forchestration-patterns.md",17184,"https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fcreate-subagents\u002Freferences\u002Forchestration-patterns.md",{"path":67,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fsubagents.md",13933,"https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fcreate-subagents\u002Freferences\u002Fsubagents.md",{"path":71,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fwriting-subagent-prompts.md",14209,"https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fcreate-subagents\u002Freferences\u002Fwriting-subagent-prompts.md",[75,82,89,96,103,110],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M77JNFJ3FH3RRX9PBVZKWDNG","wrap-up","Session-end safe closeout. Updates STATUS, verifies you are on a feature branch (never main), security-greps the diff for secrets, makes a conventional commit (no AI-tool mentions), then asks for approval before pushing and opening a PR. Use this to properly close a development session. Side-effecting and gated on explicit user approval; run explicitly.","https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fwrap-up\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M77JNBV46D0G35X0BPMQ69TY","wake-up","Session-start context sync. Reads project STATUS, git state, and runs a quick health check, then emits a short (\u003C15 line) announcement of where things stand and the single best next step. Use this at the beginning of a working session to re-establish context fast. Does NOT re-read CLAUDE.md (already in the system prompt). Read-only and fast.","https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fwake-up\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M77JN6N1R6M90B9BX5FAQGK7","station","End-of-session composition that chains retrospect → document → cleanup → wrap-up into one closeout pipeline. Use this to fully close a working session — capture learnings, sync docs, prune artifacts, then commit and open a PR — without forgetting a step. Side-effecting; honors each sub-skill's confirmation and approval gates. Run explicitly.","https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fstation\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M77JN0GC9BTN7EZ68PSHRJHK","retrospect","Post-session learning capture. Mines the current conversation for reusable patterns, pitfalls, architecture decisions, performance and security insights, then appends them to the project knowledge registry. Use this at the end of a working session, after a bug is fixed, or after a non-obvious decision is made — so the next session starts smarter. Writes structured entries to .claude\u002Fknowledge\u002FREGISTRY.md.","https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fretrospect\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M77JMWMCKNK9ZSK36X4T86V5","pre-ship","Mandatory pre-commit quality gates — type-check, lint, test, build — run in order and halting on the first failure. Use this BEFORE committing any change that touches application code, so failures are caught while context is still fresh instead of by CI. Surfaces the failing tool's verbatim error and refuses to proceed until gates pass.","https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fpre-ship\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M77JMQT8VRMA5H73X9887PJ4","document","Code-is-truth documentation sync. Detects drift between the codebase and project docs (STATUS.md, CLAUDE.md, README), then applies targeted edits so docs describe what the code actually is. Use this after shipping features, before a release, or when docs feel stale. Secret-scans every doc before writing. Makes small surgical edits, never wholesale rewrites.","https:\u002F\u002Fgithub.com\u002FElad73\u002Fagentic-base-layer\u002Fblob\u002Fmain\u002Fglobal\u002Fskills\u002Fdocument\u002FSKILL.md",[],[]]