spawning-plan
npx skills add https://github.com/octaviusp/spawning-plan-skill --skill spawning-plan
Agent 安装分布
Skill 文档
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.