How to spawn subagents correctly. Use this reference when you need to delegate work to a specialized agent.
Delegates specialized tasks to subagents with optimal model selection (haiku/sonnet) for parallel work isolation. Use when needing exploration, implementation, or research with cost-efficient delegation.
/plugin marketplace add c-daly/agent-swarm/plugin install agent-swarm@fearsidhe-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Use the Task tool with these parameters:
{
"description": "3-5 word summary",
"prompt": "Detailed instructions for the agent",
"subagent_type": "Explore|Plan|general-purpose",
"model": "haiku|sonnet|opus"
}
| Need | Agent | Default Model | subagent_type |
|---|---|---|---|
| Find code/files | explorer | haiku | Explore |
| Web/doc research | researcher | haiku | general-purpose |
| Plan implementation | architect | sonnet | Plan |
| Write code | implementer | sonnet | general-purpose |
| Review changes | reviewer | sonnet | general-purpose |
| Fix bugs | debugger | sonnet | general-purpose |
| Git operations | git-agent | haiku | general-purpose |
Agents can downgrade their model when task is simpler than expected:
[In subagent prompt, agent can say:]
"This is straightforward - spawning with haiku instead of sonnet"
Model selection criteria:
| Complexity | Indicators | Model |
|---|---|---|
| trivial | Single pattern search, one file change, simple command | haiku |
| simple | Clear logic, existing pattern to follow, <50 lines | haiku or sonnet |
| medium | Some reasoning needed, multiple considerations | sonnet |
| complex | Architectural decisions, novel patterns, tricky edge cases | sonnet |
| very complex | Cross-cutting concerns, security implications | opus (rare, ask orchestrator) |
Rules:
Example:
Orchestrator spawns implementer (default: sonnet) to add a button.
Implementer sees: "Just adding one onClick handler to existing component."
Implementer says: "Trivial task, using haiku" and spawns sub-agent with haiku.
Every subagent prompt MUST include:
Explorer (finding code):
Find all authentication-related code.
Scope: src/ directory
Output: List of file:line references with one-line descriptions
Constraints: Don't read file contents, just locate. Use Serena tools.
Implementer (writing code):
Add input validation to the login form.
Scope: src/components/LoginForm.tsx only
Output: Summary of changes made
Constraints: Don't modify other files. Don't add new dependencies.
Follow existing patterns in the codebase.
Reviewer (checking code):
Review changes to authentication flow.
Scope: Files modified in current branch vs main
Output: PASS or NEEDS_CHANGES with specific issues
Constraints: Focus on bugs and security. Skip style issues.
When tasks are independent, spawn multiple in one message:
I'll spawn three subagents in parallel:
1. Explorer to find auth files
2. Explorer to find test files
3. Researcher to get latest JWT best practices
[Three Task tool calls in same message]
Subagents CAN spawn more subagents when:
Example: Explorer finds large codebase
Explorer finds 50 auth-related files. Instead of returning all:
1. Spawn 5 sub-explorers, each handling 10 files
2. Each sub-explorer returns summarized findings
3. Main explorer aggregates into final report
Model inheritance:
Depth limit: Max 3 levels deep to prevent runaway spawning
DON'T:
DO:
Subagents receive:
Subagents do NOT receive:
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.