/implement-swarm
Implement from conversation context with parallel swarm
$ npx -y skills add GantisStorm/essentials-claude-code --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/implement-swarm
Context preview
What this command does when you run it.
Implement from conversation context with parallel swarm
Command definition
implement-swarm.mddescription: "Implement from conversation context with parallel swarm"
argument-hint: "<task description> [--workers N] [--model MODEL]"
allowed-tools: ["TaskCreate", "TaskUpdate", "TaskList", "TaskGet", "Task", "Bash"]
model: opus
Implement Swarm Command
Execute implementation from conversation context using parallel workers. All workers complete → done.
**Note:** Loop and swarm are interchangeable - swarm is just faster when tasks can run in parallel. Both enforce exit criteria and sync state.
**Source:** Conversation context + argument input + mentioned files.
Uses Claude Code's built-in Task Management System for dependency tracking and visual progress (`ctrl+t`).
Arguments
- `<task description>` (required): What to implement
- `--workers N` (optional): Max concurrent workers (default: 3)
- `--model MODEL` (optional): Model for workers: haiku, sonnet, opus (default: sonnet)
Instructions
Step 1: Create Task Graph Immediately
**ONLY use what's already available:**
- The user's argument input
- Conversation history (already in context)
**DO NOT:**
- Read files unless the user explicitly asks you to
- Grep or explore the codebase
- Use Glob to find files
Create tasks immediately from context. Include file paths in task descriptions so workers can read them during execution.
For each work item, create a task:
TaskCreate({
"subject": "Fix auth token validation",
"description": "Full implementation details from context",
"activeForm": "Fixing auth token validation"
})**Set dependencies with `addBlockedBy`** — identify which tasks depend on others completing first:
// Task 2 needs the type fix from task 1
TaskUpdate({
"taskId": "2",
"addBlockedBy": ["1"]
})A task with non-empty `blockedBy` shows as **blocked** in `ctrl+t`. When a blocking task is marked `completed`, it's automatically removed from the blocked list. A task becomes **ready** when its blockedBy list is empty.
Step 2: Spawn Workers
**Worker limit N** = `--workers` value or **3** if not specified. This is a queue — spawn up to N, then wait for completions before spawning more.
Mark each task `in_progress` before spawning its worker. Spawn up to N background workers in a **SINGLE message** (all Task calls in one response):
Task({
"description": "Task-1: Fix auth validation",
"subagent_type": "general-purpose",
"model": "sonnet",
"run_in_background": true,
"allowed_tools": ["Read", "Edit", "Write", "Bash", "Glob", "Grep"],
"prompt": "Execute this ONE task then exit:\n\nTask ID: 1\nSubject: Fix auth token validation\nDescription: <full details>\n\nSteps:\n1. Execute the task (read files, make changes, verify)\n2. Output ONLY a one-line summary\n3. Exit immediately"
})After all Task() calls return, output a status message like "3 workers launched. Waiting for completions." and **end your turn**. The system wakes you when a worker finishes.
Step 3: Process Completions
When a worker finishes, you are automatically woken. Then:
1. **TaskUpdate** — mark the finished worker's task as `completed` 2. **TaskList()** — see overall progress and find newly unblocked tasks 3. **Find ready tasks**: A task is ready when its status is `pending` AND its `blockedBy` list is empty. Completing a task automatically removes it from other tasks' `blockedBy` lists, potentially unblocking them. 4. Mark ready tasks `in_progress` and spawn new workers if slots available (respect worker limit N) 5. Output status and **end your turn** — you will be woken on the next completion
**Task lifecycle**: `pending` → (blocked until deps complete) → `in_progress` → `completed`
Repeat until all tasks completed → say **"Swarm complete"**
Visual Progress
Press `ctrl+t` to see task progress:
Tasks (2 done, 2 in progress, 3 open)
■ #3 Fix validation (Worker-1)
■ #4 Update tests (Worker-2)
□ #5 Integration > blocked by #3, #4
Context Tips
- Reference specific messages from conversation
- Use patterns agreed upon in discussion
- If anything is unclear, ask before spawning
Error Handling
| Scenario | Action | |----------|--------| | Context unclear | Ask for clarification | | Worker fails mid-task | Other workers continue | | All tasks blocked | Circular dependency | | Context compacted | TaskList → spawn ready tasks → end turn |
Stopping
- Workers self-terminate when no work remains
- Use `/cancel-swarm` to halt early
Example Usage
# After discussing a bug
/implement-swarm fix the auth bug we discussed
# With worker override
/implement-swarm refactor the API handlers --workers 5
# Cheaper workers for simple tasks
/implement-swarm update all the error messages --model haiku
Read more
description: "Implement from conversation context with parallel swarm" argument-hint: "<task description> [--workers N] [--model MODEL]" allowed-tools: ["TaskCreate", "TaskUpdate", "TaskList", "TaskGet", "Task", "Bash"] model: opus
Implement Swarm Command
Execute implementation from conversation context using parallel workers. All workers complete → done.
**Note:** Loop and swarm are interchangeable - swarm is just faster when tasks can run in parallel. Both enforce exit criteria and sync state.
**Source:** Conversation context + argument input + mentioned files.
Uses Claude Code's built-in Task Management System for dependency tracking and visual progress (`ctrl+t`).
Arguments
- `<task description>` (required): What to implement
- `--workers N` (optional): Max concurrent workers (default: 3)
- `--model MODEL` (optional): Model for workers: haiku, sonnet, opus (default: sonnet)
Instructions
Step 1: Create Task Graph Immediately
**ONLY use what's already available:**
- The user's argument input
- Conversation history (already in context)
**DO NOT:**
- Read files unless the user explicitly asks you to
- Grep or explore the codebase
- Use Glob to find files
Create tasks immediately from context. Include file paths in task descriptions so workers can read them during execution.
For each work item, create a task:
TaskCreate({
"subject": "Fix auth token validation",
"description": "Full implementation details from context",
"activeForm": "Fixing auth token validation"
})**Set dependencies with `addBlockedBy`** — identify which tasks depend on others completing first:
// Task 2 needs the type fix from task 1
TaskUpdate({
"taskId": "2",
"addBlockedBy": ["1"]
})A task with non-empty `blockedBy` shows as **blocked** in `ctrl+t`. When a blocking task is marked `completed`, it's automatically removed from the blocked list. A task becomes **ready** when its blockedBy list is empty.
Step 2: Spawn Workers
**Worker limit N** = `--workers` value or **3** if not specified. This is a queue — spawn up to N, then wait for completions before spawning more.
Mark each task `in_progress` before spawning its worker. Spawn up to N background workers in a **SINGLE message** (all Task calls in one response):
Task({
"description": "Task-1: Fix auth validation",
"subagent_type": "general-purpose",
"model": "sonnet",
"run_in_background": true,
"allowed_tools": ["Read", "Edit", "Write", "Bash", "Glob", "Grep"],
"prompt": "Execute this ONE task then exit:\n\nTask ID: 1\nSubject: Fix auth token validation\nDescription: <full details>\n\nSteps:\n1. Execute the task (read files, make changes, verify)\n2. Output ONLY a one-line summary\n3. Exit immediately"
})After all Task() calls return, output a status message like "3 workers launched. Waiting for completions." and **end your turn**. The system wakes you when a worker finishes.
Step 3: Process Completions
When a worker finishes, you are automatically woken. Then:
1. **TaskUpdate** — mark the finished worker's task as `completed` 2. **TaskList()** — see overall progress and find newly unblocked tasks 3. **Find ready tasks**: A task is ready when its status is `pending` AND its `blockedBy` list is empty. Completing a task automatically removes it from other tasks' `blockedBy` lists, potentially unblocking them. 4. Mark ready tasks `in_progress` and spawn new workers if slots available (respect worker limit N) 5. Output status and **end your turn** — you will be woken on the next completion
**Task lifecycle**: `pending` → (blocked until deps complete) → `in_progress` → `completed`
Repeat until all tasks completed → say **"Swarm complete"**
Visual Progress
Press `ctrl+t` to see task progress:
Tasks (2 done, 2 in progress, 3 open) ■ #3 Fix validation (Worker-1) ■ #4 Update tests (Worker-2) □ #5 Integration > blocked by #3, #4
Context Tips
- Reference specific messages from conversation
- Use patterns agreed upon in discussion
- If anything is unclear, ask before spawning
Error Handling
| Scenario | Action | |----------|--------| | Context unclear | Ask for clarification | | Worker fails mid-task | Other workers continue | | All tasks blocked | Circular dependency | | Context compacted | TaskList → spawn ready tasks → end turn |
Stopping
- Workers self-terminate when no work remains
- Use `/cancel-swarm` to halt early
Example Usage
# After discussing a bug /implement-swarm fix the auth bug we discussed # With worker override /implement-swarm refactor the API handlers --workers 5 # Cheaper workers for simple tasks /implement-swarm update all the error messages --model haiku
Loops, swarms, and teams powered by Claude Code's built-in Task System. Loop, swarm, and team are three execution modes. Loop runs sequentially. Swarm runs parallel subagents. Team spawns full Claude Code instances with shared contracts via Agent Teams.
Repo: GantisStorm/essentials-claude-code
Other commands on essentials-claude-code.
- /beads-converter
Convert plans to Beads - works with /beads-loop, /beads-swarm, or RalphTUI
Open command - /beads-loop
Execute beads iteratively until all tasks complete
Open command - /beads-swarm
Execute beads with parallel agent swarm (dependency-aware)
Open command - /bug-plan-creator
Deep bug investigation with architectural fix plan generation - works with any executor (loop or swarm)
Open command - /cancel-loop
Cancel any active loop
Open command - /cancel-swarm
Cancel any active swarm
Open command

