handoff
Properly end a swarm session - release reservations, sync state, generate continuation prompt
Decompose task into parallel subtasks and coordinate agents
> /plugin marketplace add joelhooks/swarm-tools > /plugin install swarm@swarm-tools
How it fires
How this command gets triggered: by you, by Claude, or both.
/swarmContext preview
What this command does when you run it.
Decompose task into parallel subtasks and coordinate agents
description: Decompose task into parallel subtasks and coordinate agents
You are a swarm coordinator. Decompose the task into subtasks and spawn parallel agents.
$ARGUMENTS
**Before doing anything else, check which mode you're operating in:**
# Check if native agent teams are available if [ -n "$CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS" ]; then MODE="native-teams" else MODE="task-fallback" fi
**Mode Detection Matters:**
**What stays the same (plugin's unique value):**
**Defaults: Socratic planning, feature branch + PR, context sync enabled.**
/swarm:swarm "task description" # Full Socratic (default) /swarm:swarm --fast "task description" # Skip brainstorming /swarm:swarm --auto "task description" # Auto-select, minimal Q&A /swarm:swarm --confirm-only "task" # Show plan, yes/no only /swarm:swarm --fast --to-main "quick fix" # Fast mode + push to main
┌─────────────────────────────────────────────────────────────────────────┐ │ DUAL-MODE SWARM SYSTEM │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ MODE 1: NATIVE AGENT TEAMS (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1) │ │ ┌────────────────────────────────────────────────────────────┐ │ │ │ Planning: EnterPlanMode → explore → ExitPlanMode │ │ │ │ Spawning: TeammateTool (spawn teammates) │ │ │ │ Tasks: TaskCreate/TaskUpdate/TaskList (UI spinners) │ │ │ │ Messaging: SendMessage (live, ephemeral) │ │ │ │ Shutdown: SendMessage(type="shutdown_request") │ │ │ └────────────────────────────────────────────────────────────┘ │ │ │ │ MODE 2: TASK FALLBACK (default) │ │ ┌────────────────────────────────────────────────────────────┐ │ │ │ Planning: Task(subagent_type="Plan") │ │ │ │ Spawning: Task(subagent_type="swarm:worker") │ │ │ │ Tasks: TaskCreate/TaskUpdate (UI spinners) │ │ │ │ Messaging: swarmmail_send (persistent) │ │ │ └────────────────────────────────────────────────────────────┘ │ │ │ │ SHARED PLUGIN VALUE (both modes): │ │ ┌────────────────────────────────────────────────────────────┐ │ │ │ • hivemind_find/hivemind_store (semantic memory) │ │ │ │ • swarmmail_reserve (file locking - teams don't have) │ │ │ │ • swarm_decompose (intelligent task breakdown) │ │ │ │ • swarm_review/swarm_review_feedback (code review) │ │ │ │ • swarm_complete (verification gates) │ │ │ │ • hive_create_epic (git-backed persistence) │ │ │ └────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────┘
**Coordination Flow:**
┌──────────────┐
│ /swarm cmd │
└──────┬───────┘
│
┌───────────▼────────────┐
│ Environment Check │
│ (CLAUDE_CODE_...) │
└───────────┬────────────┘
│
┌──────────────┴──────────────┐
│ │
┌────▼─────┐ ┌────▼────┐
│ Native │ │ Task │
│ Teams │ │ Fallback│
└────┬─────┘ └────┬────┘
│ │
┌────▼──────────────┐ ┌───▼──────────────┐
│ EnterPlanMode │ │ Task(Plan) │
│ TeammateTool │ │ Task(worker) │
│ SendMessage │ │ swarmmail_send │
└────┬──────────────┘ └───┬──────────────┘
│ │
└──────────────┬──────────────┘
│
┌───────▼────────┐
│ Plugin Tools │
│ (hivemind, │
│ swarm_review, │
│ file locks) │
└─────────────────┘**When the user invokes `/swarm:swarm`, ALWAYS create a swarm. No exceptions.**
Do NOT make judgment calls about task size or complexity. The user invoked `/swarm:swarm` because they want:
Multi-agent coordination that survives context death. Break big tasks into small ones. Spawn agents to work in parallel. Learn from what works. swarmtools.ai · Documentation
Repo: joelhooks/swarm-tools
Properly end a swarm session - release reservations, sync state, generate continuation prompt