spawn
What it does
This skill launches the parallel agents for a session that has already been set up. It is for people who want each agent to try a different strategy on the same task.
When to use it
- βWhen a session is set up and the agents are ready to start working.
- βWhen you want each agent to try a different strategy on the same task.
- βWhen you want the agents to follow an optimizer, refactorer, test writer or bug fixer pattern.
Skill link
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/spawn/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βLaunch the agents for the latest session using the refactorer template.β
5 new skills a week. 1 minute to read.
How it works
The agent loads the session settings and starts the agents with dispatch prompts, one per worktree. When a template is chosen, it uses that template's pattern and gives each agent a different strategy.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
/agenthub:spawn β Launch Parallel Agents
Spawn N subagents that work on the same task in parallel, each in an isolated git worktree.
Usage
/agenthub:spawn # Spawn agents for the latest session
/agenthub:spawn 20260317-143022 # Spawn agents for a specific session
/agenthub:spawn --template optimizer # Use optimizer template for dispatch prompts
/agenthub:spawn --template refactorer # Use refactorer template
Templates
When --template <name> is provided, use the dispatch prompt from ../agenthub/references/agent-templates.md instead of the default prompt below. Available templates:
| Template | Pattern | Use Case |
|---|---|---|
optimizer |
Edit β eval β keep/discard β repeat x10 | Performance, latency, size reduction |
refactorer |
Restructure β test β iterate until green | Code quality, tech debt |
test-writer |
Write tests β measure coverage β repeat | Test coverage gaps |
bug-fixer |
Reproduce β diagnose β fix β verify | Bug fix with competing approaches |
When using a template, replace all {variables} with values from the session config. Assign each agent a different strategy appropriate to the template and task β diverse strategies maximize the value of parallel exploration.
What It Does
- Load session config from
.agenthub/sessions/{session-id}/config.yaml - For each agent 1..N:
- Write task assignment to
.agenthub/board/dispatch/ - Build agent prompt with task, constraints, and board write instructions
- Write task assignment to
- Launch ALL agents in a single message with multiple Agent tool calls:
Agent(
prompt: "You are agent-{i} in hub session {session-id}.
Your task: {task}
Read your full assignment at .agenthub/board/dispatch/{seq}-agent-{i}.md
Instructions:
1. Work in your worktree β make changes, run tests, iterate
2. Commit all changes with descriptive messages
3. Write your result summary to .agenthub/board/results/agent-{i}-result.md
Include: approach taken, files changed, metric if available, confidence level
4. Exit when done
Constraints:
- Do NOT read or modify other agents' work
- Do NOT access .agenthub/board/results/ for other agents
- Commit early and often with descriptive messages
- If you hit a dead end, commit what you have and explain in your result",
isolation: "worktree"
)
- Update session state to
runningvia:
python {skill_path}/scripts/session_manager.py --update {session-id} --state running
Critical Rules
- All agents in ONE message β spawn all Agent tool calls simultaneously for true parallelism
- isolation: "worktree" is mandatory β each agent needs its own filesystem
- Never modify session config after spawn β agents rely on stable configuration
- Each agent gets a unique board post β dispatch posts are numbered sequentially
After Spawn
Tell the user:
- {N} agents launched in parallel
- Each working in an isolated worktree
- Monitor with
/hub-status - Evaluate when done with
/agenthub:eval
FAQ
Why does each agent get a different strategy?
Different strategies explore more options in parallel, which makes the final comparison more useful.
Where do the agents work?
Each one works in its own isolated git worktree.
What templates can I use?
Optimizer, refactorer, test writer and bug fixer.
Details
Original description by the author
Use to launch the competing agents for an initialized AgentHub session in isolated worktrees.
Popularity
- GitHub stars
- 29k
- Ranking position
- #9535
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-launcher-orchestrator
29kHelps your agent plan, build, test and schedule a Claude managed agent in your own account, step by step, starting from one clear goal.
grade-iterate
29kLets your agent grade a managed AI agent's work against a rubric and improve it in a fixed number of rounds, so it never loops forever.
interview
29kLets your agent interview you about an AI agent idea and turn your answers into a simple build plan before anything is launched.
run-without-you
29kHelps your agent set up a managed AI agent to run on a schedule or when an event happens, with the cron timing checked before launch.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.