with one click
swarm-create
Create a new swarm team from a Beads epic with N worker agents
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Create a new swarm team from a Beads epic with N worker agents
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Argus — all-in-one information gathering & reconnaissance toolkit. 135 modules covering network infrastructure, web app analysis, and security/threat intelligence. Use for domain recon, subdomain enum, SSL analysis, tech stack detection, vulnerability scanning, and OSINT.
Manage secrets via Bitwarden CLI (bw). Use when pulling secrets into a shell session, creating/updating Secure Notes from .env files, listing vault items, or setting up Bitwarden on a new machine. Secrets live in Bitwarden, get loaded into memory on demand, and die with the shell session — no files on disk.
Develop a thorough, step-by-step specification for a given idea
Set up a recurring build tracker cron job for any GitHub repo. Runs a zero-LLM shell script to detect stale PRs, stale assigned issues, and phase progress, then posts to a Discord channel only when there's something actionable. Use when asked to "track this build every N hours", "prod agents on a project", "set up a build monitor", "watch this repo for stale work", or similar. The tracker is cheap to run — script does all the work, the agent only speaks when findings exist.
Run long-running coding tasks in cloud environments (Claude Code or Codex), with session teleporting and automatic PR creation.
Delegate coding tasks to subagents or run Claude Code/Codex in tmux sessions. Use the Task tool for focused multi-step coding work. Use tmux for long-running interactive sessions, parallel worktree-based fixes, and PR reviews. NOT for simple single-file edits — do those directly.
| name | swarm-create |
| description | Create a new swarm team from a Beads epic with N worker agents |
| user-invocable | true |
Create a tmux-persistent multi-agent swarm team for parallel task execution.
/swarm-create --epic <epic-id> --agents <count> [--isolation <mode>] [--dry-run]
| Argument | Required | Default | Description |
|---|---|---|---|
--epic | Yes | - | Beads epic ID to create swarm from |
--agents | No | 2 | Number of worker agents (max 4) |
--isolation | No | (ask user) | Isolation mode: shared or worktree |
--dry-run | No | false | Show what would be created without executing |
Default: Shared Mode - For most swarm operations, shared mode is recommended. Worktree mode adds complexity (merge step) and is only needed when agents might modify the same files. Shared mode worked well for the 6-phase Pulse Comments implementation (~$12-15 cost, 20 mins).
You MUST ask the user which isolation mode they want if not specified.
Use the AskUserQuestion tool:
question: "How should agents be isolated?"
header: "Isolation"
options:
- label: "Shared Branch (Recommended)"
description: "All agents work in same directory on independent files. Faster, no merge step, but requires careful task partitioning to avoid conflicts."
- label: "Git Worktrees"
description: "Each agent gets own git worktree and branch. Full isolation, agents commit independently, merge at end. Slower startup, handles conflicts better."
| Mode | Pros | Cons | Best For |
|---|---|---|---|
| shared | Fast startup, no merge step | Risk of file conflicts | Well-partitioned tasks, small teams |
| worktree | Full isolation, safer | Slower startup, merge step needed | Large teams, overlapping files |
When you receive this command:
Parse Arguments
EPIC_ID="$ARGUMENTS" # Extract --epic value
AGENT_COUNT=2 # Extract --agents value or default
ISOLATION_MODE="" # Extract --isolation value if provided
DRY_RUN=false # Check for --dry-run flag
Ask About Isolation Mode (if not specified)
If --isolation was not provided, use AskUserQuestion to ask the user.
Validate Epic (if not dry-run)
# Check epic exists in Beads
bd show "$EPIC_ID" --json || echo "Epic not found"
Create Beads Swarm (if not dry-run)
# Create swarm structure from epic
bd swarm create "$EPIC_ID" --json
Initialize Team Directory
source ~/.claude/utils/swarm-lib.sh
# Create team with isolation mode
TEAM_ID=$(swarm_create_team "$EPIC_ID" "$AGENT_COUNT" "$ISOLATION_MODE")
echo "Created team: $TEAM_ID"
Spawn Leader
# Start leader in tmux
LEADER_SESSION=$(swarm_spawn_leader "$TEAM_ID")
echo "Leader spawned: $LEADER_SESSION"
Spawn Worker Agents
for i in $(seq 1 $AGENT_COUNT); do
AGENT_SESSION=$(swarm_spawn_agent "$TEAM_ID" "agent-$i")
echo "Agent spawned: $AGENT_SESSION"
sleep 2 # Stagger spawning
done
Verify & Report
# Get status
swarm_get_status "$TEAM_ID" | jq .
echo ""
echo "========================================"
echo "Swarm Created: $TEAM_ID"
echo "========================================"
echo "Epic: $EPIC_ID"
echo "Isolation: $ISOLATION_MODE"
echo "Leader: ${TEAM_ID}-leader"
echo "Agents: $AGENT_COUNT"
echo ""
echo "Commands:"
echo " Attach to leader: tmux attach -t ${TEAM_ID}-leader"
echo " Check status: /swarm-status $TEAM_ID"
if [[ "$ISOLATION_MODE" == "worktree" ]]; then
echo " Merge worktrees: swarm-lib.sh merge-worktrees $TEAM_ID"
fi
echo " Shutdown: /swarm-shutdown $TEAM_ID"
echo "========================================"
When --dry-run is specified, show what would happen without executing:
DRY RUN: Would create swarm from epic: bd-epic-123
Isolation Mode: worktree
Would create:
- Team directory: ~/.claude/swarm/swarm-XXXXXXXXXX/
- Team file: ~/.claude/swarm/swarm-XXXXXXXXXX/team.json
- Inbox files:
- inbox/leader.jsonl
- inbox/agent-1.jsonl
- inbox/agent-2.jsonl
- Shared directory: ~/.claude/swarm/swarm-XXXXXXXXXX/shared/
- Worktrees (if worktree mode):
- worktrees/agent-1/ (branch: swarm-XXXXXXXXXX-agent-1)
- worktrees/agent-2/ (branch: swarm-XXXXXXXXXX-agent-2)
Would spawn tmux sessions:
- swarm-XXXXXXXXXX-leader (Team Leader)
- swarm-XXXXXXXXXX-agent-1 (Worker)
- swarm-XXXXXXXXXX-agent-2 (Worker)
Would run:
bd swarm create bd-epic-123
No changes made.
# Ask about isolation mode (recommended)
/swarm-create --epic bd-epic-platform-rebuild --agents 3
# Explicit shared mode (fast, for independent tasks)
/swarm-create --epic bd-epic-123 --agents 3 --isolation shared
# Explicit worktree mode (isolated, for overlapping files)
/swarm-create --epic bd-epic-123 --agents 3 --isolation worktree
# Dry run to preview
/swarm-create --epic bd-epic-123 --agents 2 --dry-run
When using worktree isolation, after the swarm completes:
# 1. Shutdown the swarm (agents stop)
/swarm-shutdown $TEAM_ID
# 2. Merge all agent branches back to main
bash ~/.claude/utils/swarm-lib.sh merge-worktrees $TEAM_ID
# 3. Review the merged changes
git log --oneline -10
git diff HEAD~5
# 4. Commit or amend as needed
git commit --amend -m "feat: combined swarm output"
The swarm integrates with Beads task tracking:
bd swarm create generates task DAG with dependenciesbd ready --unassigned to find available tasksbd update <id> --assignee <agent>bd close <id>| Error | Resolution |
|---|---|
| Epic not found | Verify epic ID exists: bd show <epic-id> |
| tmux not available | Install tmux: brew install tmux |
| jq not available | Install jq: brew install jq |
| Max agents exceeded | Limit is 4 workers per team |
| Session already exists | Previous swarm not cleaned up - run /swarm-shutdown |
| Worktree conflict | Branch already exists - delete with git branch -D |
| Merge conflict | Resolve manually then git merge --continue |
~/.claude/swarm/{team-id}/
+-- team.json # Team metadata (isolation_mode: "shared")
+-- inbox/
| +-- leader.jsonl # Leader's message inbox
| +-- agent-1.jsonl # Agent 1's inbox
| +-- agent-2.jsonl # Agent 2's inbox
+-- shared/
+-- (shared context files)
~/.claude/swarm/{team-id}/
+-- team.json # Team metadata (isolation_mode: "worktree")
+-- inbox/
| +-- leader.jsonl
| +-- agent-1.jsonl
| +-- agent-2.jsonl
+-- shared/
+-- worktrees/
+-- agent-1/ # Git worktree (branch: {team-id}-agent-1)
| +-- (full repo copy)
+-- agent-2/ # Git worktree (branch: {team-id}-agent-2)
+-- (full repo copy)