Spawning Plan
Design the optimal agent team for the task. Performant, precise, minimal.
Docs: https://code.claude.com/docs/en/agent-teams.md
Task: $ARGUMENTS
Step 1: Context Gathering (Silent — no user interaction)
A) Read environment:
CLAUDE.md — workflow rules, conventions, constraints
- Project manifests —
package.json, pyproject.toml, Cargo.toml, go.mod, etc.
- Directory structure —
src/, app/, packages/, test dirs, monorepo indicators
B) Inventory existing agents:
- Scan
~/.claude/agents/*.md — reuse matching agents instead of creating duplicates
C) Analyze task complexity:
- Work type: research, implementation, review, debugging, refactoring
- Scope: single-layer vs cross-layer
- Parallelism: can work split into independent streams?
- Complexity → team size: simple (2 agents), medium (3-4), complex cross-cutting (5-6, max 8)
Step 2: Ask Team Questions (AskUserQuestion Tool)
Ask 3-5 questions based on Step 1 findings. Not all apply every time — pick what matters.
Team Composition — "For this [work type] on [stack], I'm thinking [N] agents: [role list]. What would you change?"
Options: Perfect / Add role / Remove role / Different approach
Coordination — "How should agents work together?"
Options: Independent (no messaging) / Team (peer messaging) / Hub-spoke (lead coordinates)
Dependencies — "Work order?"
Options: All parallel / Sequential (A→B→C) / Mixed
Models — "Model allocation: opus (research), sonnet (implementation), haiku (scanning). Adjust?"
Options: As suggested / All opus / All sonnet / Custom
Agent Reuse (only if matching agents found in Step 1B) — "Found existing [agent-name] that handles [capability]. Reuse it?"
Options: Reuse / Create fresh / Both
Step 3: Output & Approval
Present clean TEAM PLAN:
## TEAM PLAN
Task: [description]
Pattern: [independent | team | hub-spoke]
Work Order: [parallel | sequential | mixed]
Agents: [count]
### Teammates
- Teammate 1: [Name] ([Role])
Description: [1-2 line expertise and specialization]
Model: [opus|sonnet|haiku]
Type: [general-purpose | feature-dev:code-X | reuse ~/.claude/agents/X.md]
Responsible for: [specific deliverable]
Depends on: [— | Teammate N]
- Teammate 2: [Name] ([Role])
Description: [1-2 line expertise and specialization]
Model: [opus|sonnet|haiku]
Type: [general-purpose | feature-dev:code-X]
Responsible for: [specific deliverable]
Depends on: [— | Teammate N]
- ...
### Research (injected into agent prompts)
- [key finding or best practice 1]
- [key finding or best practice 2]
Final Approval (AskUserQuestion Tool)
"Launch this team?"
- Deploy & Save — spawn agents and save as reusable skill
- Deploy Once — spawn agents, one-time
- Adjust — change something (iterate plan)
- Cancel — abort
Deploy & Save → save team as skill at ~/.claude/skills/<team-name>/SKILL.md for future use via /<team-name> [task]. Saved skill skips planning, bakes in agent definitions, uses $ARGUMENTS for task input.
Adjust → ask what to change → regenerate plan → ask again. Loop until approved.
Deploy Once → spawn immediately, no save.
Cancel → stop.
Spawning Execution
Based on chosen pattern:
- Independent: parallel Task tool calls, one per agent
- Team: TeamCreate → TaskCreate per agent → Task tool with
team_name → TaskUpdate for dependencies
- Hub-spoke: TeamCreate with lead agent (opus) that delegates via SendMessage
For detailed agent prompt structure, see references/agent-prompts.md.
1---2name: spawning-plan3description: "Spawning Plan. Use when user wants to spawn agents, create a team, or coordinate multiple agents. Automatically gathers context, asks team topology questions, outputs clean TEAM PLAN markdown, and gets user approval. 3 steps: context gathering → questions → present plan. **CRITICAL**: MUST NOT SPAWN AGENTS SKIPPING THIS SKILL, USE ALWAYS."4metadata:5 source: https://skillmd.com/skills/octaviusp/spawning-plan6---78# Spawning Plan910Design the optimal agent team for the task. Performant, precise, minimal.11Docs: https://code.claude.com/docs/en/agent-teams.md1213**Task:** `$ARGUMENTS`1415## Step 1: Context Gathering (Silent — no user interaction)1617**A) Read environment:**18- `CLAUDE.md` — workflow rules, conventions, constraints19- Project manifests — `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, etc.20- Directory structure — `src/`, `app/`, `packages/`, test dirs, monorepo indicators2122**B) Inventory existing agents:**23- Scan `~/.claude/agents/*.md` — reuse matching agents instead of creating duplicates2425**C) Analyze task complexity:**26- **Work type**: research, implementation, review, debugging, refactoring27- **Scope**: single-layer vs cross-layer28- **Parallelism**: can work split into independent streams?29- **Complexity → team size**: simple (2 agents), medium (3-4), complex cross-cutting (5-6, max 8)3031## Step 2: Ask Team Questions (AskUserQuestion Tool)3233Ask 3-5 questions based on Step 1 findings. Not all apply every time — pick what matters.34351. **Team Composition** — "For this [work type] on [stack], I'm thinking [N] agents: [role list]. What would you change?"36 Options: Perfect / Add role / Remove role / Different approach37382. **Coordination** — "How should agents work together?"39 Options: Independent (no messaging) / Team (peer messaging) / Hub-spoke (lead coordinates)40413. **Dependencies** — "Work order?"42 Options: All parallel / Sequential (A→B→C) / Mixed43444. **Models** — "Model allocation: opus (research), sonnet (implementation), haiku (scanning). Adjust?"45 Options: As suggested / All opus / All sonnet / Custom46475. **Agent Reuse** *(only if matching agents found in Step 1B)* — "Found existing `[agent-name]` that handles [capability]. Reuse it?"48 Options: Reuse / Create fresh / Both4950## Step 3: Output & Approval5152Present clean TEAM PLAN:5354```55## TEAM PLAN5657Task: [description]58Pattern: [independent | team | hub-spoke]59Work Order: [parallel | sequential | mixed]60Agents: [count]6162### Teammates6364- Teammate 1: [Name] ([Role])65 Description: [1-2 line expertise and specialization]66 Model: [opus|sonnet|haiku]67 Type: [general-purpose | feature-dev:code-X | reuse ~/.claude/agents/X.md]68 Responsible for: [specific deliverable]69 Depends on: [— | Teammate N]7071- Teammate 2: [Name] ([Role])72 Description: [1-2 line expertise and specialization]73 Model: [opus|sonnet|haiku]74 Type: [general-purpose | feature-dev:code-X]75 Responsible for: [specific deliverable]76 Depends on: [— | Teammate N]7778- ...7980### Research (injected into agent prompts)81- [key finding or best practice 1]82- [key finding or best practice 2]83```8485### Final Approval (AskUserQuestion Tool)8687```88"Launch this team?"89- Deploy & Save — spawn agents and save as reusable skill90- Deploy Once — spawn agents, one-time91- Adjust — change something (iterate plan)92- Cancel — abort93```9495**Deploy & Save** → save team as skill at `~/.claude/skills/<team-name>/SKILL.md` for future use via `/<team-name> [task]`. Saved skill skips planning, bakes in agent definitions, uses `$ARGUMENTS` for task input.9697**Adjust** → ask what to change → regenerate plan → ask again. Loop until approved.9899**Deploy Once** → spawn immediately, no save.100101**Cancel** → stop.102103### Spawning Execution104105Based on chosen pattern:106- **Independent**: parallel Task tool calls, one per agent107- **Team**: TeamCreate → TaskCreate per agent → Task tool with `team_name` → TaskUpdate for dependencies108- **Hub-spoke**: TeamCreate with lead agent (opus) that delegates via SendMessage109110For detailed agent prompt structure, see [references/agent-prompts.md](references/agent-prompts.md).