
Swarm
- Updated February 4, 2026
- primeinc/swarm
swarm is a Claude Code skill in the AI & Agent Building category. Multi-agent coordination for Claude Code (delegates to swarm CLI)
Key points
- swarm
- AI & Agent Building
- AI-coding skill
Swarm by the numbers
- Data as of Jul 7, 2026 (Skillselion catalog sync)
/plugin marketplace add primeinc/swarm/plugin install swarm@swarm-toolsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Last updated | February 4, 2026 |
|---|---|
| Repository | primeinc/swarm ↗ |
What it does
Multi-agent coordination for Claude Code (delegates to swarm CLI)
README.md
Claude Code Swarm Plugin
Multi-agent coordination for Claude Code. Enables parallel task decomposition, worker spawning, and agent-to-agent communication.
Installation
1. Install the swarm CLI (required)
The plugin delegates to the swarm CLI for all operations:
bun add -g opencode-swarm-plugin
# or
npm install -g opencode-swarm-plugin
Verify installation:
swarm --version
2. Install the plugin from marketplace
# Add the swarm-tools marketplace
claude /plugin add-marketplace https://github.com/joelhooks/opencode-swarm-plugin
# Install the swarm plugin
claude /plugin install swarm@swarm-tools
3. Restart Claude Code
The plugin's MCP server will start automatically.
Usage
Slash Commands
| Command | Description |
|---|---|
/swarm <task> |
Decompose task into parallel subtasks and spawn workers |
/hive |
Query and manage tasks (cells) in the hive tracker |
/inbox |
Check swarm mail inbox for messages from other agents |
/status |
Check swarm coordination status |
/handoff |
End session with proper cleanup and handoff notes |
Example: Running a Swarm
/swarm refactor the auth module to use JWT tokens
This will:
- Analyze the task and decompose into parallelizable subtasks
- Create an epic with child tasks in the hive tracker
- Spawn worker agents for each subtask
- Coordinate file reservations to prevent conflicts
- Review worker output before completion
Tools
The plugin exposes 25 tools via MCP:
Hive (Task Management)
hive_cells- Query cells with filtershive_create- Create a new cellhive_create_epic- Create epic with subtaskshive_close- Close a cell with reasonhive_query- Query with advanced filtershive_ready- Get next unblocked cellhive_update- Update cell status/description
Hivemind (Memory)
hivemind_find- Semantic search across memorieshivemind_store- Store a memory with embeddinghivemind_get- Retrieve memory by IDhivemind_stats- Memory system statistics
Swarmmail (Agent Coordination)
swarmmail_init- Initialize agent sessionswarmmail_inbox- Check inbox for messagesswarmmail_send- Send message to other agentsswarmmail_reserve- Reserve files for editingswarmmail_release- Release file reservations
Swarm (Orchestration)
swarm_decompose- Generate decomposition promptswarm_status- Get swarm status by epic IDswarm_plan_prompt- Strategy-specific planningswarm_validate_decomposition- Validate decompositionswarm_spawn_subtask- Prepare subtask for spawningswarm_review- Generate review promptswarm_review_feedback- Send review feedbackswarm_progress- Report progressswarm_complete- Mark subtask complete
Hooks
The plugin registers lifecycle hooks:
| Hook | Action |
|---|---|
SessionStart |
Initialize session context |
UserPromptSubmit |
Track user prompts |
PreCompact |
Save state before context compaction |
SessionEnd |
Cleanup and sync |
Skills
always-on-guidance
Rule-oriented guidance for Claude Code agents. Loaded automatically.
swarm-coordination
Multi-agent coordination patterns. Use when spawning workers or coordinating parallel tasks.
Agents
| Agent | Type | Purpose |
|---|---|---|
coordinator |
Foreground | Orchestrates swarm decomposition and worker spawning |
worker |
Foreground | Executes subtasks with file reservations |
background-worker |
Background | Handles tasks without MCP tool access |
Architecture
┌─────────────────────────────────────────────────────────┐
│ Claude Code │
├─────────────────────────────────────────────────────────┤
│ Plugin (this package) │
│ ├── MCP Server (bin/mcp-server.js) │
│ │ └── Shells out to: swarm tool <name> --json │
│ ├── Commands (/swarm, /hive, /inbox, etc.) │
│ ├── Skills (always-on-guidance, swarm-coordination) │
│ ├── Agents (coordinator, worker) │
│ └── Hooks (SessionStart, PreCompact, etc.) │
├─────────────────────────────────────────────────────────┤
│ swarm CLI (globally installed) │
│ ├── Hive tracker (.hive/ directory) │
│ ├── Hivemind semantic memory (LibSQL + Ollama) │
│ └── Swarmmail coordination (embedded event store) │
└─────────────────────────────────────────────────────────┘
Why This Architecture?
The main OpenCode swarm plugin bundles native dependencies (@libsql/client) which causes issues when Claude Code copies plugins to its cache. This plugin avoids bundling by delegating all tool execution to the globally installed swarm CLI.
Benefits:
- No native dependency issues
- Single source of truth (the CLI)
- Automatic updates when CLI is updated
- Tiny plugin size (~600KB bundled)
Development
# Install dependencies
bun install
# Build the MCP server bundle
bun run build
# Type check
bun run typecheck
License
MIT