New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Launch N parallel subagents in isolated git worktrees

/hub:spawn — Launch Parallel Agents

by alirezarezvani · MIT license · ★ 26,349 on GitHub · updated Aug 30

/hub:spawn — Launch Parallel Agents cover

Launch N parallel subagents in isolated git worktrees to compete on the session task. Use when the user runs /hub:spawn or asks to start the competing agents for an initialized AgentHub session.

---
name: "spawn"
description: "Launch N parallel subagents in isolated git worktrees to compete on the session task. Use when the user runs /hub:spawn or asks to start the competing agents for an initialized AgentHub session."
command: /hub:spawn
---

# /hub:spawn — Launch Parallel Agents

Spawn N subagents that work on the same task in parallel, each in an isolated git worktree.

## Usage

```
/hub:spawn                                    # Spawn agents for the latest session
/hub:spawn 20260317-143022                    # Spawn agents for a specific session
/hub:spawn --template optimizer               # Use optimizer template for dispatch prompts
/hub:spawn --template refactorer              # Use refactorer template
```

Overview

Spawn N subagents that work on the same task in parallel, each in an isolated git worktree.

What you get

  • 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
  • Launch ALL agents in a single message with multiple Agent tool calls:
  • Update session state to running via:
Manual install (npx, ZIP)
Claude Codenpx skills add alirezarezvani/claude-skills --skill spawn -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \ | tar -xz -C ~/.claude/skills --strip-components=4 claude-skills-19392f7a0826/engineering/agenthub/skills/spawn
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/cdd1d08f59e1c5131ed9/spawn.zip" -OutFile "$env:TEMP\spawn.zip"; Expand-Archive "$env:TEMP\spawn.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.3 KB
Read the files here
alirezarezvani/19392f71 file
Shared references2SKILL.md reads these from elsewhere in the repo. Not in the ZIP.Get them on GitHub ↗
SKILL.md
Show the full text84 lines

/hub:spawn — Launch Parallel Agents

Spawn N subagents that work on the same task in parallel, each in an isolated git worktree.

Usage

/hub:spawn                                    # Spawn agents for the latest session
/hub:spawn 20260317-143022                    # Spawn agents for a specific session
/hub:spawn --template optimizer               # Use optimizer template for dispatch prompts
/hub: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

  1. Load session config from .agenthub/sessions/{session-id}/config.yaml
  2. For each agent 1..N:
    • Write task assignment to .agenthub/board/dispatch/
    • Build agent prompt with task, constraints, and board write instructions
  3. 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"
)
  1. Update session state to running via:
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:hub-status
  • Evaluate when done with /hub:eval
1---
2name: "spawn"
3description: "Launch N parallel subagents in isolated git worktrees to compete on the session task. Use when the user runs /hub:spawn or asks to start the competing agents for an initialized AgentHub session."
4command: /hub:spawn
5---
6 
7# /hub:spawn — Launch Parallel Agents
8 
9Spawn N subagents that work on the same task in parallel, each in an isolated git worktree.
10 
11## Usage
12 
13```
14/hub:spawn # Spawn agents for the latest session
15/hub:spawn 20260317-143022 # Spawn agents for a specific session
16/hub:spawn --template optimizer # Use optimizer template for dispatch prompts
17/hub:spawn --template refactorer # Use refactorer template
18```
19 
20## Templates
21 
22When `--template <name>` is provided, use the dispatch prompt from `../agenthub/references/agent-templates.md` instead of the default prompt below. Available templates:
23 
24| Template | Pattern | Use Case |
25|----------|---------|----------|
26| `optimizer` | Edit → eval → keep/discard → repeat x10 | Performance, latency, size reduction |
27| `refactorer` | Restructure → test → iterate until green | Code quality, tech debt |
28| `test-writer` | Write tests → measure coverage → repeat | Test coverage gaps |
29| `bug-fixer` | Reproduce → diagnose → fix → verify | Bug fix with competing approaches |
30 
31When 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.
32 
33## What It Does
34 
351. Load session config from `.agenthub/sessions/{session-id}/config.yaml`
362. For each agent 1..N:
37 - Write task assignment to `.agenthub/board/dispatch/`
38 - Build agent prompt with task, constraints, and board write instructions
393. Launch ALL agents in a **single message** with multiple Agent tool calls:
40 
41```
42Agent(
43 prompt: "You are agent-{i} in hub session {session-id}.
44 
45Your task: {task}
46 
47Read your full assignment at .agenthub/board/dispatch/{seq}-agent-{i}.md
48 
49Instructions:
501. Work in your worktree — make changes, run tests, iterate
512. Commit all changes with descriptive messages
523. Write your result summary to .agenthub/board/results/agent-{i}-result.md
53 Include: approach taken, files changed, metric if available, confidence level
544. Exit when done
55 
56Constraints:
57- Do NOT read or modify other agents' work
58- Do NOT access .agenthub/board/results/ for other agents
59- Commit early and often with descriptive messages
60- If you hit a dead end, commit what you have and explain in your result",
61 isolation: "worktree"
62)
63```
64 
654. Update session state to `running` via:
66```bash
67python {skill_path}/scripts/session_manager.py --update {session-id} --state running
68```
69 
70## Critical Rules
71 
72- **All agents in ONE message** — spawn all Agent tool calls simultaneously for true parallelism
73- **isolation: "worktree"** is mandatory — each agent needs its own filesystem
74- **Never modify session config** after spawn — agents rely on stable configuration
75- **Each agent gets a unique board post** — dispatch posts are numbered sequentially
76 
77## After Spawn
78 
79Tell the user:
80- {N} agents launched in parallel
81- Each working in an isolated worktree
82- Monitor with `/hub:hub-status`
83- Evaluate when done with `/hub:eval`
84 
View all files on GitHub →

Details

Updated
Aug 30, 2026
License
MIT
Stars on the repo
★ 26,349
Checked
Source
alirezarezvani/claude-skills ↗
Creator
alirezarezvani · 363 listings
View creator

Similar skills

See all →
SkillTests in real browsers via Chrome DevTools MCPBrowser testing with devtoolsaddyosmani/agent-skills · by addyosmaniTests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.★ 98.7k GitHub starsMCPThis MCP server attempts to exercise all the featuresEverything MCP Servermodelcontextprotocol/servers · by modelcontextprotocolThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test…★ 90.5k GitHub starsMCPA Model Context Protocol server that provides web contentFetch MCP Servermodelcontextprotocol/servers · by modelcontextprotocolA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content…★ 90.5k GitHub starsMCPNode.js server implementing Model Context ProtocolFilesystem MCP Servermodelcontextprotocol/servers · by modelcontextprotocolNode.js server implementing Model Context Protocol (MCP) for filesystem operations.★ 90.5k GitHub starsSkillAbout libraries, frameworks, API referencesContext7 MCPupstash/context7 · by upstashThis skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.★ 62.3k GitHub starsSkillUses Chrome DevTools via MCP for efficient debuggingChromeDevTools/chrome-devtools-mcp · by ChromeDevToolsUses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to `--slim` mode (MCP configuration).★ 52.4k GitHub stars

More from alirezarezvani

SkillResume a paused experiment/ar:ar-resume — Resume Experimentalirezarezvani/claude-skills · by alirezarezvaniResume a paused experiment. Checkout the experiment branch, read results history, continue iterating. Use when the user runs /ar:ar-resume or asks to pick up a previously started autoresearch experiment.★ 26.3k GitHub starsSkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboardalirezarezvani/claude-skills · by alirezarezvaniShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.★ 26.3k GitHub starsSkillStart an autonomous experiment loop with user-selected/ar:loop — Autonomous Experiment Loopalirezarezvani/claude-skills · by alirezarezvaniStart an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling. Use when the user runs /ar:loop or asks to run an autoresearch experiment continuously on a schedule.★ 26.3k GitHub starsSkillRun a single experiment iteration/ar:run — Single Experiment Iterationalirezarezvani/claude-skills · by alirezarezvaniRun a single experiment iteration. Edit the target file, evaluate, keep or discard. Use when the user runs /ar:run or asks for one manual autoresearch iteration.★ 26.3k GitHub starsSkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experimentalirezarezvani/claude-skills · by alirezarezvaniSet up a new autoresearch experiment interactively. Collects domain, target file, eval command, metric, direction, and evaluator. Use when the user runs /ar:setup or asks to start optimizing a file with the autoresearch loop.★ 26.3k GitHub starsSkill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberationalirezarezvani/claude-skills · by alirezarezvani/cs:boardroom <brief> — 6-phase multi-role deliberation across the C-suite with Phase 2 isolation, critic pre-screen, and synthesis. Outputs a board memo. Use when a decision spans multiple executive domains — e.g. a pricing change touching finance, positioning, and product, or a raise-vs-cut runway call.★ 26.3k GitHub stars