Subagents Meta Skill
🚨 MANDATORY: Invoke docs-management First
STOP - Before providing ANY response about subagents/agents:
- INVOKE
docs-management skill
- QUERY for the user's specific topic
- BASE all responses EXCLUSIVELY on official documentation loaded
Skipping this step results in outdated or incorrect information.
Verification Checkpoint
Before responding, verify:
If ANY checkbox is unchecked, STOP and invoke docs-management first.
Overview
Central authority for Claude Code subagents (also called sub-agents). This skill uses 100% delegation to docs-management - it contains NO duplicated official documentation.
Architecture: Pure delegation with keyword registry. All official documentation is accessed via docs-management skill queries.
When to Use This Skill
Keywords: subagents, sub-agents, agents, agent file, agent YAML, agent frontmatter, agent tools, agent model, automatic delegation, agent lifecycle, agent resumption, /agents command, programmatic agents, agent SDK, built-in agents, Plan subagent, agent configuration
Use this skill when:
- Creating new agent definition files
- Configuring agent tool access
- Selecting agent models (inherit, sonnet, haiku, opus)
- Understanding automatic vs explicit agent invocation
- Working with agent resumption and lifecycle
- Using the /agents CLI command
- Integrating agents with Agent SDK
- Understanding priority resolution (project > CLI > user)
- Working with built-in agents (Plan subagent)
- Troubleshooting agent behavior
Keyword Registry for docs-management Queries
Use these keywords when querying docs-management skill for official documentation:
Core Concepts
| Topic |
Keywords |
| Overview |
"subagents", "sub-agents", "agent overview" |
| File Format |
"agent file format", "agent YAML frontmatter", "agent file structure" |
| File Locations |
"agent file locations", "agent directories", "where to put agents" |
Configuration
| Topic |
Keywords |
| YAML Frontmatter |
"agent YAML frontmatter", "agent configuration", "agent metadata" |
| Tool Access |
"agent tools", "agent tool access", "allowed-tools agents" |
| Model Selection |
"agent model selection", "inherit model", "sonnet haiku opus agents" |
| Permission Mode |
"permissionMode", "agent permission mode", "acceptEdits", "bypassPermissions" |
| Skills Field |
"agent skills field", "skills auto-load", "agent skills configuration" |
| Color (Undocumented) |
"agent color", "subagent color", "agent UI color" |
Behavior
| Topic |
Keywords |
| Automatic Delegation |
"automatic delegation", "agent automatic invocation" |
| Explicit Invocation |
"explicit agent invocation", "manual agent call" |
| Lifecycle |
"agent lifecycle", "agent execution", "agent completion" |
| Resumption |
"agent resumption", "resume agent", "continue agent", "agentId", "resumable agents" |
| Plugin Agents |
"plugin agents", "plugin-provided agents", "plugin subagents" |
| Chaining Agents |
"chaining subagents", "chain agents", "agent orchestration" |
| Performance |
"agent performance", "context efficiency", "agent latency", "parallel agents" |
CLI and SDK
| Topic |
Keywords |
| CLI Usage |
"/agents command", "agents CLI", "list agents" |
| Agent SDK |
"Agent SDK subagents", "programmatic agents", "SDK agent creation" |
| Priority Resolution |
"agent priority resolution", "project CLI user agents" |
Built-in Agents
| Topic |
Keywords |
| General-purpose |
"general-purpose subagent", "general purpose agent", "default subagent" |
| Plan Subagent |
"Plan subagent", "planning agent", "implementation planning" |
| Explore Subagent |
"Explore subagent", "explore agent", "codebase exploration", "read-only agent" |
| Thoroughness Levels |
"thoroughness levels", "quick medium thorough", "exploration depth" |
Official YAML Frontmatter Reference
Source: doc_id: code-claude-com-docs-en-sub-agents section #configuration-fields
These are the officially documented YAML frontmatter fields for subagent definition files:
| Field |
Required |
Description |
name |
Yes |
Unique identifier using lowercase letters and hyphens |
description |
Yes |
Natural language description of the subagent's purpose |
tools |
No |
Comma-separated list of specific tools. If omitted, inherits all tools from main thread |
model |
No |
Model alias (sonnet, opus, haiku) or 'inherit' to use main conversation's model |
permissionMode |
No |
Valid values: default, acceptEdits, bypassPermissions, plan, ignore |
skills |
No |
Comma-separated list of skill names to auto-load when subagent starts |
Important: The color property documented below is NOT in official Claude Code documentation.
Color Property (Undocumented)
The color property is an undocumented feature that sets the UI color for subagents. It is NOT in official Claude Code documentation and may change without notice.
Available Values: red, blue, green, yellow, purple, orange, pink, cyan
Placement: Typically placed after model or at the bottom of YAML frontmatter.
Example:
---
name: my-agent
description: Description of what this agent does
tools: Read, Grep, Glob
model: haiku
color: blue
---
Warning: As an undocumented feature, this property:
- May not work in all Claude Code versions
- May be removed or changed without notice
- Should not be relied upon for critical functionality
Repository Color Standard
This repository uses a semantic color categorization for subagents to provide visual consistency:
Category Assignments
| Category |
Color |
Purpose |
Agents |
| Documentation/Meta |
purple |
Documentation, auditing, meta-skills |
docs-researcher, docs-validator, skill-auditor |
| Code Quality |
blue |
Code analysis, review, debugging, testing |
code-reviewer, codebase-analyst, debugger, test-generator |
| Research |
green |
Research, information gathering, web content |
mcp-research, platform-docs-researcher, web-research |
Reserved Colors (Future Use)
| Color |
Reserved For |
| orange |
Generation/Creation agents |
| red |
Critical/Error handling agents |
| yellow |
Warning/Attention agents |
| pink |
User-facing/Communication agents |
| cyan |
Utility agents |
When to Assign Colors
When creating new agents for this repository:
- Identify the agent's primary purpose (documentation, code quality, research, etc.)
- Match to existing category if possible
- Use reserved colors only for new categories that match the reserved purpose
- Document new categories if creating a genuinely new type
Quick Decision Tree
What do you want to do?
- Create a new agent -> Query docs-management: "agent file format", "agent YAML frontmatter"
- Configure agent tools -> Query docs-management: "agent tools", "allowed-tools agents"
- Select agent model -> Query docs-management: "agent model selection", "inherit sonnet haiku opus"
- Configure permissionMode -> Query docs-management: "permissionMode", "agent permission mode"
- Auto-load skills in agent -> Query docs-management: "agent skills field", "skills auto-load"
- Understand automatic delegation -> Query docs-management: "automatic delegation agents"
- Resume an agent (agentId) -> Query docs-management: "agent resumption", "agentId", "resumable agents"
- Use /agents CLI -> Query docs-management: "/agents command", "agents CLI"
- Programmatic agents (SDK) -> Query docs-management: "Agent SDK subagents"
- Understand priority resolution -> Query docs-management: "agent priority resolution"
- Work with General-purpose agent -> Query docs-management: "general-purpose subagent"
- Work with Plan subagent -> Query docs-management: "Plan subagent", "planning agent"
- Work with Explore subagent -> Query docs-management: "Explore subagent", "thoroughness levels"
- Understand plugin agents -> Query docs-management: "plugin agents", "plugin-provided agents"
- Chain multiple agents -> Query docs-management: "chaining subagents", "agent orchestration"
- Optimize agent performance -> Query docs-management: "agent performance", "parallel agents"
- Troubleshoot agent issues -> Query docs-management: "agent troubleshooting" + specific issue keywords
- Add color to agent (undocumented) -> See "Color Property (Undocumented)" section above
- Choose color for new agent -> See "Repository Color Standard" section above
Topic Coverage
Agent Files
- File format and structure
- YAML frontmatter fields (name, description, tools, model)
- File locations (project, CLI, user directories)
- Naming conventions
Tool Configuration
- Specifying allowed tools
- Tool access inheritance
- Restricting dangerous tools
- MCP tools in agents
Model Selection
- Model options: inherit, sonnet, haiku, opus
- When to use each model
- Cost and performance considerations
- Inheritance from parent context
Invocation Patterns
- Automatic delegation (description matching)
- Explicit invocation via Task tool
- Agent discovery and selection
- Priority resolution order
Lifecycle Management
- Agent execution flow
- Context isolation
- Result reporting
- Error handling
Resumption
- Resuming existing agents
- Context preservation
- When to resume vs create new
- Resume parameter usage
CLI Integration
- /agents command
- Listing available agents
- Agent status and management
- CLI-defined agents
Agent SDK Integration
- Programmatic agent creation
- SDK patterns for subagents
- Custom agent implementations
- Advanced agent workflows
Default Agent Types
- General-purpose subagent: Complex multi-step tasks, autonomous execution
- Plan subagent: Implementation planning, architectural decisions
- Explore subagent: Codebase exploration, read-only research
- Thoroughness levels (quick, medium, very thorough) for Explore agent
- Default agent behaviors and when to use each
- Customizing built-in agent behavior
Plugin Agents
- Plugin-provided agents
- Plugin agent discovery and usage
- Plugin agent configuration
Performance Considerations
- Parallel agent execution
- Context efficiency and token usage
- Agent latency optimization
- When to use subagents vs direct tools
Test Scenarios
These scenarios should activate this skill:
- Direct activation: "Use the subagent-development skill to help me create an agent"
- Configuration question: "How do I restrict tools for my subagent?"
- Built-in agent question: "What is the Explore subagent and how do I use it?"
- Troubleshooting: "My agent isn't being invoked automatically"
- SDK question: "How do I define agents programmatically in the Agent SDK?"
Related Skills
| Skill |
Relationship |
| docs-management |
Primary delegation target (100%) - all official documentation |
| agent-sdk-development |
Agent SDK-specific guidance for programmatic agents |
| skill-development |
Skills can be auto-loaded by agents via skills field |
| current-date |
For audit timestamps and verification dates |
Delegation Patterns
Standard Query Pattern
User asks: "How do I create an agent?"
1. Invoke docs-management skill
2. Use keywords: "agent file format", "agent YAML frontmatter"
3. Load official documentation
4. Provide guidance based EXCLUSIVELY on official docs
Multi-Topic Query Pattern
User asks: "I want to create an agent with restricted tools that uses Haiku"
1. Invoke docs-management skill with multiple queries:
- "agent file format", "agent YAML frontmatter"
- "agent tools", "allowed-tools agents"
- "agent model selection", "haiku agents"
2. Synthesize guidance from official documentation
Troubleshooting Pattern
User reports: "My agent isn't being invoked automatically"
1. Invoke docs-management skill
2. Use keywords: "automatic delegation agents", "agent description"
3. Check official docs for automatic invocation requirements
4. Guide user based on official troubleshooting steps
Troubleshooting Quick Reference
| Issue |
Keywords for docs-management |
| Agent not found |
"agent file locations", "agent directories" |
| Agent not auto-invoked |
"automatic delegation", "agent description matching" |
| Wrong model used |
"agent model selection", "inherit model" |
| Tools not available |
"agent tools", "allowed-tools agents" |
| Resumption not working |
"agent resumption", "resume agent" |
| Priority conflicts |
"agent priority resolution", "project CLI user" |
Repository-Specific Notes
This repository uses subagents for:
- Explore agents: Codebase exploration and research
- Plan agents: Implementation planning
- General-purpose agents: Complex multi-step tasks
When creating agents for this repository, follow patterns in .claude/settings.json and existing agent configurations.
Related Guidance
For comprehensive subagent usage guidance beyond configuration:
- When to use subagents: See
.claude/memory/operational-rules.md → "Agent Usage Principles"
- Parallelization strategies: See
.claude/memory/performance-quick-start.md → "Strategy 1: Parallelization"
- Context preservation patterns: See
.claude/memory/operational-rules.md → "Agent Communication Pattern"
- Proactive delegation rule: See
CLAUDE.md Quick Reference → "PROACTIVE DELEGATION"
Auditing Agents
This skill provides the validation criteria used by the agent-auditor agent for formal audits.
Audit Resources
| Resource |
Location |
Purpose |
| Validation Checklist |
references/validation-checklist.md |
Pre-creation verification checklist |
| Scoring Rubric |
references/validation-checklist.md#audit-scoring-rubric |
Formal audit scoring criteria |
| Undocumented Features |
references/undocumented-features.md |
Color, permissionMode, skills field details |
Scoring Categories
| Category |
Points |
Key Criteria |
| Name Field |
20 |
Lowercase, hyphens, max 64 chars, no reserved words |
| Description Field |
25 |
Third person, delegation triggers, when-to-use guidance |
| Tools Configuration |
20 |
Appropriate restrictions, not over/under restricted |
| Model Selection |
15 |
Appropriate for task complexity |
| Additional Fields |
20 |
Color, skills, permissionMode correctly configured |
Thresholds: 85+ = PASS, 70-84 = PASS WITH WARNINGS, <70 = FAIL
Related Agent
The agent-auditor agent (Haiku model) performs formal audits using this skill:
- Auto-loads this skill via
skills: subagent-development
- Uses validation checklist and scoring rubric
- Checks both official and undocumented features
- Generates structured audit reports
- Invoked by
/audit-agents command
External Technology Validation
When auditing agents that use external technologies (scripts, packages, runtimes), the auditor MUST validate claims using MCP servers before flagging findings.
Technologies Requiring MCP Validation:
- .NET/C# scripts: Validate with microsoft-learn + perplexity
- Node.js/npm packages: Validate with context7 + perplexity
- Python scripts/packages: Validate with context7 + perplexity
- Shell scripts: Validate with perplexity
- Any version-specific claims: ALWAYS validate with perplexity
Validation Rule:
Never flag a technology usage as incorrect without first:
- Querying appropriate MCP server(s) for current documentation
- Verifying with perplexity for recent changes (especially .NET 10+)
- Documenting MCP sources in the finding
Stale Data Warning:
- microsoft-learn can return cached/outdated documentation
- ALWAYS pair microsoft-learn with perplexity for version verification
- Trust perplexity for version numbers and recently-released features
References
Official Documentation (via docs-management skill):
- Primary: "sub-agents" documentation
- Related: "Agent SDK", "Task tool", "model selection"
Repository-Specific:
- Agent configurations:
.claude/settings.json
- Performance guidance:
.claude/memory/performance-quick-start.md
- Operational rules:
.claude/memory/operational-rules.md (Agent Usage Principles section)
Version History
- v1.2.0 (2025-11-27): Color property documentation
- Added "Official YAML Frontmatter Reference" section with source reference to docs-management
- Added "Color Property (Undocumented)" section documenting available colors
- Added "Repository Color Standard" section with semantic color categories
- Added color keyword to Configuration registry
- Expanded Quick Decision Tree (19 entries, up from 17) with color entries
- v1.1.0 (2025-11-27): Audit and enhancement
- Added missing keyword registry entries (permissionMode, skills field, plugin agents, chaining, performance)
- Expanded Built-in Agents section (General-purpose, Plan, Explore, thoroughness levels)
- Added Test Scenarios section (5 scenarios)
- Added Related Skills section
- Expanded Quick Decision Tree (17 entries, up from 10)
- Added Plugin Agents and Performance Considerations to Topic Coverage
- Added Token Budget statement
- v1.0.0 (2025-11-26): Initial release
- Pure delegation architecture
- Comprehensive keyword registry
- Quick decision tree
- Topic coverage for all subagent features
- Troubleshooting quick reference
Last Updated
Date: 2025-11-28
Model: claude-opus-4-5-20251101
1---2name: subagent-development3description: Central authority for Claude Code subagents (sub-agents). Covers agent file format, YAML frontmatter, tool access configuration, model selection (inherit, sonnet, haiku, opus), automatic delegation, agent lifecycle, resumption, command-line usage (/agents), Agent SDK programmatic agents, priority resolution, and built-in agents (Plan subagent). Assists with creating agents, configuring agent tools, understanding agent behavior, and troubleshooting agent issues. Delegates 100% to docs-management skill for official documentation.4---5
6# Subagents Meta Skill
7
8> ## 🚨 MANDATORY: Invoke docs-management First
9>
10> **STOP - Before providing ANY response about subagents/agents:**
11>
12> 1. **INVOKE** `docs-management` skill
13> 2. **QUERY** for the user's specific topic
14> 3. **BASE** all responses EXCLUSIVELY on official documentation loaded
15>
16> **Skipping this step results in outdated or incorrect information.**
17>
18> ### Verification Checkpoint
19>
20> Before responding, verify:
21>
22> - [ ] Did I invoke docs-management skill?
23> - [ ] Did official documentation load?
24> - [ ] Is my response based EXCLUSIVELY on official docs?
25>
26> If ANY checkbox is unchecked, STOP and invoke docs-management first.
27
28## Overview
29
30Central authority for Claude Code subagents (also called sub-agents). This skill uses **100% delegation to docs-management** - it contains NO duplicated official documentation.
31
32**Architecture:** Pure delegation with keyword registry. All official documentation is accessed via docs-management skill queries.
33
34## When to Use This Skill
35
36**Keywords:** subagents, sub-agents, agents, agent file, agent YAML, agent frontmatter, agent tools, agent model, automatic delegation, agent lifecycle, agent resumption, /agents command, programmatic agents, agent SDK, built-in agents, Plan subagent, agent configuration
37
38**Use this skill when:**
39
40- Creating new agent definition files
41- Configuring agent tool access
42- Selecting agent models (inherit, sonnet, haiku, opus)
43- Understanding automatic vs explicit agent invocation
44- Working with agent resumption and lifecycle
45- Using the /agents CLI command
46- Integrating agents with Agent SDK
47- Understanding priority resolution (project > CLI > user)
48- Working with built-in agents (Plan subagent)
49- Troubleshooting agent behavior
50
51## Keyword Registry for docs-management Queries
52
53Use these keywords when querying docs-management skill for official documentation:
54
55### Core Concepts
56
57| Topic | Keywords |
58| --- | --- |
59| Overview | "subagents", "sub-agents", "agent overview" |
60| File Format | "agent file format", "agent YAML frontmatter", "agent file structure" |
61| File Locations | "agent file locations", "agent directories", "where to put agents" |
62
63### Configuration
64
65| Topic | Keywords |
66| --- | --- |
67| YAML Frontmatter | "agent YAML frontmatter", "agent configuration", "agent metadata" |
68| Tool Access | "agent tools", "agent tool access", "allowed-tools agents" |
69| Model Selection | "agent model selection", "inherit model", "sonnet haiku opus agents" |
70| Permission Mode | "permissionMode", "agent permission mode", "acceptEdits", "bypassPermissions" |
71| Skills Field | "agent skills field", "skills auto-load", "agent skills configuration" |
72| Color (Undocumented) | "agent color", "subagent color", "agent UI color" |
73
74### Behavior
75
76| Topic | Keywords |
77| --- | --- |
78| Automatic Delegation | "automatic delegation", "agent automatic invocation" |
79| Explicit Invocation | "explicit agent invocation", "manual agent call" |
80| Lifecycle | "agent lifecycle", "agent execution", "agent completion" |
81| Resumption | "agent resumption", "resume agent", "continue agent", "agentId", "resumable agents" |
82| Plugin Agents | "plugin agents", "plugin-provided agents", "plugin subagents" |
83| Chaining Agents | "chaining subagents", "chain agents", "agent orchestration" |
84| Performance | "agent performance", "context efficiency", "agent latency", "parallel agents" |
85
86### CLI and SDK
87
88| Topic | Keywords |
89| --- | --- |
90| CLI Usage | "/agents command", "agents CLI", "list agents" |
91| Agent SDK | "Agent SDK subagents", "programmatic agents", "SDK agent creation" |
92| Priority Resolution | "agent priority resolution", "project CLI user agents" |
93
94### Built-in Agents
95
96| Topic | Keywords |
97| --- | --- |
98| General-purpose | "general-purpose subagent", "general purpose agent", "default subagent" |
99| Plan Subagent | "Plan subagent", "planning agent", "implementation planning" |
100| Explore Subagent | "Explore subagent", "explore agent", "codebase exploration", "read-only agent" |
101| Thoroughness Levels | "thoroughness levels", "quick medium thorough", "exploration depth" |
102
103## Official YAML Frontmatter Reference
104
105**Source:** `doc_id: code-claude-com-docs-en-sub-agents` section `#configuration-fields`
106
107These are the officially documented YAML frontmatter fields for subagent definition files:
108
109| Field | Required | Description |
110| --- | --- | --- |
111| `name` | Yes | Unique identifier using lowercase letters and hyphens |
112| `description` | Yes | Natural language description of the subagent's purpose |
113| `tools` | No | Comma-separated list of specific tools. If omitted, inherits all tools from main thread |
114| `model` | No | Model alias (`sonnet`, `opus`, `haiku`) or `'inherit'` to use main conversation's model |
115| `permissionMode` | No | Valid values: `default`, `acceptEdits`, `bypassPermissions`, `plan`, `ignore` |
116| `skills` | No | Comma-separated list of skill names to auto-load when subagent starts |
117
118**Important:** The `color` property documented below is NOT in official Claude Code documentation.
119
120## Color Property (Undocumented)
121
122The `color` property is an undocumented feature that sets the UI color for subagents. It is NOT in official Claude Code documentation and may change without notice.
123
124**Available Values:** red, blue, green, yellow, purple, orange, pink, cyan
125
126**Placement:** Typically placed after `model` or at the bottom of YAML frontmatter.
127
128**Example:**
129
130```yaml
131---
132name: my-agent
133description: Description of what this agent does
134tools: Read, Grep, Glob
135model: haiku
136color: blue
137---
138```
139
140**Warning:** As an undocumented feature, this property:
141
142- May not work in all Claude Code versions
143- May be removed or changed without notice
144- Should not be relied upon for critical functionality
145
146## Repository Color Standard
147
148This repository uses a semantic color categorization for subagents to provide visual consistency:
149
150### Category Assignments
151
152| Category | Color | Purpose | Agents |
153| --- | --- | --- | --- |
154| **Documentation/Meta** | purple | Documentation, auditing, meta-skills | docs-researcher, docs-validator, skill-auditor |
155| **Code Quality** | blue | Code analysis, review, debugging, testing | code-reviewer, codebase-analyst, debugger, test-generator |
156| **Research** | green | Research, information gathering, web content | mcp-research, platform-docs-researcher, web-research |
157
158### Reserved Colors (Future Use)
159
160| Color | Reserved For |
161| --- | --- |
162| orange | Generation/Creation agents |
163| red | Critical/Error handling agents |
164| yellow | Warning/Attention agents |
165| pink | User-facing/Communication agents |
166| cyan | Utility agents |
167
168### When to Assign Colors
169
170When creating new agents for this repository:
171
1721. **Identify the agent's primary purpose** (documentation, code quality, research, etc.)
1732. **Match to existing category** if possible
1743. **Use reserved colors** only for new categories that match the reserved purpose
1754. **Document new categories** if creating a genuinely new type
176
177## Quick Decision Tree
178
179**What do you want to do?**
180
1811. **Create a new agent** -> Query docs-management: "agent file format", "agent YAML frontmatter"
1822. **Configure agent tools** -> Query docs-management: "agent tools", "allowed-tools agents"
1833. **Select agent model** -> Query docs-management: "agent model selection", "inherit sonnet haiku opus"
1844. **Configure permissionMode** -> Query docs-management: "permissionMode", "agent permission mode"
1855. **Auto-load skills in agent** -> Query docs-management: "agent skills field", "skills auto-load"
1866. **Understand automatic delegation** -> Query docs-management: "automatic delegation agents"
1877. **Resume an agent (agentId)** -> Query docs-management: "agent resumption", "agentId", "resumable agents"
1888. **Use /agents CLI** -> Query docs-management: "/agents command", "agents CLI"
1899. **Programmatic agents (SDK)** -> Query docs-management: "Agent SDK subagents"
19010. **Understand priority resolution** -> Query docs-management: "agent priority resolution"
19111. **Work with General-purpose agent** -> Query docs-management: "general-purpose subagent"
19212. **Work with Plan subagent** -> Query docs-management: "Plan subagent", "planning agent"
19313. **Work with Explore subagent** -> Query docs-management: "Explore subagent", "thoroughness levels"
19414. **Understand plugin agents** -> Query docs-management: "plugin agents", "plugin-provided agents"
19515. **Chain multiple agents** -> Query docs-management: "chaining subagents", "agent orchestration"
19616. **Optimize agent performance** -> Query docs-management: "agent performance", "parallel agents"
19717. **Troubleshoot agent issues** -> Query docs-management: "agent troubleshooting" + specific issue keywords
19818. **Add color to agent (undocumented)** -> See "Color Property (Undocumented)" section above
19919. **Choose color for new agent** -> See "Repository Color Standard" section above
200
201## Topic Coverage
202
203### Agent Files
204
205- File format and structure
206- YAML frontmatter fields (name, description, tools, model)
207- File locations (project, CLI, user directories)
208- Naming conventions
209
210### Tool Configuration
211
212- Specifying allowed tools
213- Tool access inheritance
214- Restricting dangerous tools
215- MCP tools in agents
216
217### Model Selection
218
219- Model options: inherit, sonnet, haiku, opus
220- When to use each model
221- Cost and performance considerations
222- Inheritance from parent context
223
224### Invocation Patterns
225
226- Automatic delegation (description matching)
227- Explicit invocation via Task tool
228- Agent discovery and selection
229- Priority resolution order
230
231### Lifecycle Management
232
233- Agent execution flow
234- Context isolation
235- Result reporting
236- Error handling
237
238### Resumption
239
240- Resuming existing agents
241- Context preservation
242- When to resume vs create new
243- Resume parameter usage
244
245### CLI Integration
246
247- /agents command
248- Listing available agents
249- Agent status and management
250- CLI-defined agents
251
252### Agent SDK Integration
253
254- Programmatic agent creation
255- SDK patterns for subagents
256- Custom agent implementations
257- Advanced agent workflows
258
259### Default Agent Types
260
261- **General-purpose subagent**: Complex multi-step tasks, autonomous execution
262- **Plan subagent**: Implementation planning, architectural decisions
263- **Explore subagent**: Codebase exploration, read-only research
264- Thoroughness levels (quick, medium, very thorough) for Explore agent
265- Default agent behaviors and when to use each
266- Customizing built-in agent behavior
267
268### Plugin Agents
269
270- Plugin-provided agents
271- Plugin agent discovery and usage
272- Plugin agent configuration
273
274### Performance Considerations
275
276- Parallel agent execution
277- Context efficiency and token usage
278- Agent latency optimization
279- When to use subagents vs direct tools
280
281## Test Scenarios
282
283These scenarios should activate this skill:
284
2851. **Direct activation**: "Use the subagent-development skill to help me create an agent"
2862. **Configuration question**: "How do I restrict tools for my subagent?"
2873. **Built-in agent question**: "What is the Explore subagent and how do I use it?"
2884. **Troubleshooting**: "My agent isn't being invoked automatically"
2895. **SDK question**: "How do I define agents programmatically in the Agent SDK?"
290
291## Related Skills
292
293| Skill | Relationship |
294| --- | --- |
295| **docs-management** | Primary delegation target (100%) - all official documentation |
296| **agent-sdk-development** | Agent SDK-specific guidance for programmatic agents |
297| **skill-development** | Skills can be auto-loaded by agents via skills field |
298| **current-date** | For audit timestamps and verification dates |
299
300## Delegation Patterns
301
302### Standard Query Pattern
303
304```text
305User asks: "How do I create an agent?"
306
3071. Invoke docs-management skill
3082. Use keywords: "agent file format", "agent YAML frontmatter"
3093. Load official documentation
3104. Provide guidance based EXCLUSIVELY on official docs
311```
312
313### Multi-Topic Query Pattern
314
315```text
316User asks: "I want to create an agent with restricted tools that uses Haiku"
317
3181. Invoke docs-management skill with multiple queries:
319 - "agent file format", "agent YAML frontmatter"
320 - "agent tools", "allowed-tools agents"
321 - "agent model selection", "haiku agents"
3222. Synthesize guidance from official documentation
323```
324
325### Troubleshooting Pattern
326
327```text
328User reports: "My agent isn't being invoked automatically"
329
3301. Invoke docs-management skill
3312. Use keywords: "automatic delegation agents", "agent description"
3323. Check official docs for automatic invocation requirements
3334. Guide user based on official troubleshooting steps
334```
335
336## Troubleshooting Quick Reference
337
338| Issue | Keywords for docs-management |
339| --- | --- |
340| Agent not found | "agent file locations", "agent directories" |
341| Agent not auto-invoked | "automatic delegation", "agent description matching" |
342| Wrong model used | "agent model selection", "inherit model" |
343| Tools not available | "agent tools", "allowed-tools agents" |
344| Resumption not working | "agent resumption", "resume agent" |
345| Priority conflicts | "agent priority resolution", "project CLI user" |
346
347## Repository-Specific Notes
348
349This repository uses subagents for:
350
351- **Explore agents**: Codebase exploration and research
352- **Plan agents**: Implementation planning
353- **General-purpose agents**: Complex multi-step tasks
354
355When creating agents for this repository, follow patterns in `.claude/settings.json` and existing agent configurations.
356
357## Related Guidance
358
359For comprehensive subagent usage guidance beyond configuration:
360
361- **When to use subagents**: See `.claude/memory/operational-rules.md` → "Agent Usage Principles"
362- **Parallelization strategies**: See `.claude/memory/performance-quick-start.md` → "Strategy 1: Parallelization"
363- **Context preservation patterns**: See `.claude/memory/operational-rules.md` → "Agent Communication Pattern"
364- **Proactive delegation rule**: See `CLAUDE.md` Quick Reference → "PROACTIVE DELEGATION"
365
366## Auditing Agents
367
368This skill provides the validation criteria used by the `agent-auditor` agent for formal audits.
369
370### Audit Resources
371
372| Resource | Location | Purpose |
373| --- | --- | --- |
374| Validation Checklist | `references/validation-checklist.md` | Pre-creation verification checklist |
375| Scoring Rubric | `references/validation-checklist.md#audit-scoring-rubric` | Formal audit scoring criteria |
376| Undocumented Features | `references/undocumented-features.md` | Color, permissionMode, skills field details |
377
378### Scoring Categories
379
380| Category | Points | Key Criteria |
381| --- | --- | --- |
382| Name Field | 20 | Lowercase, hyphens, max 64 chars, no reserved words |
383| Description Field | 25 | Third person, delegation triggers, when-to-use guidance |
384| Tools Configuration | 20 | Appropriate restrictions, not over/under restricted |
385| Model Selection | 15 | Appropriate for task complexity |
386| Additional Fields | 20 | Color, skills, permissionMode correctly configured |
387
388**Thresholds:** 85+ = PASS, 70-84 = PASS WITH WARNINGS, <70 = FAIL
389
390### Related Agent
391
392The `agent-auditor` agent (Haiku model) performs formal audits using this skill:
393
394- Auto-loads this skill via `skills: subagent-development`
395- Uses validation checklist and scoring rubric
396- Checks both official and undocumented features
397- Generates structured audit reports
398- Invoked by `/audit-agents` command
399
400### External Technology Validation
401
402When auditing agents that use external technologies (scripts, packages, runtimes), the auditor MUST validate claims using MCP servers before flagging findings.
403
404**Technologies Requiring MCP Validation:**
405
406- .NET/C# scripts: Validate with microsoft-learn + perplexity
407- Node.js/npm packages: Validate with context7 + perplexity
408- Python scripts/packages: Validate with context7 + perplexity
409- Shell scripts: Validate with perplexity
410- Any version-specific claims: ALWAYS validate with perplexity
411
412**Validation Rule:**
413
414Never flag a technology usage as incorrect without first:
415
4161. Querying appropriate MCP server(s) for current documentation
4172. Verifying with perplexity for recent changes (especially .NET 10+)
4183. Documenting MCP sources in the finding
419
420**Stale Data Warning:**
421
422- microsoft-learn can return cached/outdated documentation
423- ALWAYS pair microsoft-learn with perplexity for version verification
424- Trust perplexity for version numbers and recently-released features
425
426## References
427
428**Official Documentation (via docs-management skill):**
429
430- Primary: "sub-agents" documentation
431- Related: "Agent SDK", "Task tool", "model selection"
432
433**Repository-Specific:**
434
435- Agent configurations: `.claude/settings.json`
436- Performance guidance: `.claude/memory/performance-quick-start.md`
437- Operational rules: `.claude/memory/operational-rules.md` (Agent Usage Principles section)
438
439## Version History
440
441- **v1.2.0** (2025-11-27): Color property documentation
442 - Added "Official YAML Frontmatter Reference" section with source reference to docs-management
443 - Added "Color Property (Undocumented)" section documenting available colors
444 - Added "Repository Color Standard" section with semantic color categories
445 - Added color keyword to Configuration registry
446 - Expanded Quick Decision Tree (19 entries, up from 17) with color entries
447- **v1.1.0** (2025-11-27): Audit and enhancement
448 - Added missing keyword registry entries (permissionMode, skills field, plugin agents, chaining, performance)
449 - Expanded Built-in Agents section (General-purpose, Plan, Explore, thoroughness levels)
450 - Added Test Scenarios section (5 scenarios)
451 - Added Related Skills section
452 - Expanded Quick Decision Tree (17 entries, up from 10)
453 - Added Plugin Agents and Performance Considerations to Topic Coverage
454 - Added Token Budget statement
455- **v1.0.0** (2025-11-26): Initial release
456 - Pure delegation architecture
457 - Comprehensive keyword registry
458 - Quick decision tree
459 - Topic coverage for all subagent features
460 - Troubleshooting quick reference
461
462---
463
464## Last Updated
465
466**Date:** 2025-11-28
467**Model:** claude-opus-4-5-20251101