Use PROACTIVELY when creating specialized Claude Code sub-agents for task delegation...
Automates creation of Claude Code sub-agents with proper configuration and proactive behavior.
Trigger Phrases:
Use Cases:
Follow this structured process for consistent, high-quality agents:
Identify what the agent should accomplish:
Example:
- Intent: Review code for security vulnerabilities
- Trigger: Security-related requests, audit requests
- Success: Findings reported with confidence scores
Define the expertise the agent embodies:
Example:
- Persona: Senior security engineer with penetration testing background
- Perspective: Cautious, assumes hostile input
- Style: Concise findings with exploit paths
Structure capabilities and constraints:
Structure order:
1. Prohibitions (safety rails)
2. Capabilities (what it does)
3. Output format (structured response)
4. Examples (when to use / when NOT)
Reduce prompt size without losing clarity:
Generate the agent name:
[domain]-[action] or [action]-[target]security-reviewer, test-generator, migration-validatorProvide dual-example training:
### When TO Use
<example>
user: "[request that should trigger]"
assistant: [Invokes agent]
<reasoning>Why this triggers</reasoning>
</example>
### When NOT to Use
<example>
user: "[request that should NOT trigger]"
assistant: [Does NOT invoke]
<reasoning>Why this doesn't trigger</reasoning>
</example>
For straightforward agents, use this condensed process:
---
name: agent-name
description: Use PROACTIVELY to [action] when [condition]
tools: Read, Grep, Glob # Omit for all tools
model: sonnet # Omit to inherit
---
Pattern from: Claude Code version evolution
Track changes to enable rollback and understand evolution:
---
name: my-agent
changelog:
- "0.3.0: Added anti-pattern examples"
- "0.2.0: Enhanced with dual-example pattern"
- "0.1.0: Initial release"
---
Versioning Guidelines:
Keep changelog in frontmatter for quick reference; detailed notes can go in separate CHANGELOG.md.
| Model | Use Case |
|---|---|
| inherit | Same as main conversation (default) |
| sonnet | Balanced performance |
| opus | Maximum capability |
| haiku | Fast/economical |
| Pattern | Tools | Use Case |
|---|---|---|
| Read-only | Read, Grep, Glob | Safe analysis |
| Code ops | Read, Edit, Write | Modifications |
| Execution | Bash | Running commands |
| All | * | Full access (cautious) |
| Location | Path | Use Case |
|---|---|---|
| Project | .claude/agents/ | Team-shared, versioned |
| User | ~/.claude/agents/ | Personal, all projects |
data/models.yaml - Model optionsdata/tools.yaml - Available toolstemplates/agent-template.md - Prompt structureexamples/ - Sample agents (code-reviewer, debugger)Use the [agent-name] sub-agent to [task]
Perform action matching the description to test auto-delegation.
# Check file
cat .claude/agents/[agent-name].md | head -10
# Verify location
ls .claude/agents/
Version: 0.1.0 | Author: Connor
Docs: https://docs.claude.com/en/docs/claude-code/sub-agents