swarm

swarm is a skill for Claude Code, Codex from cj-vana/claude-swarm. It costs 47 tokens per session (9,810 once invoked), scanned D, original, MIT.

A skill for coordinating several Claude Code worker sessions on one coding task. It gives the sessions separate roles, shared rules, and saved progress.

In plain words
What is it for?
Planning and monitoring parallel coding work, applying behavioral constraints, and continuing across long sessions or context limits.
Why use it?
It helps divide complex features, large refactors, and multi-step work into parallel pieces while keeping worker behavior and progress organized.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions Claude Code.

Good fit Planning and monitoring parallel coding work, applying behavioral constraints, and continuing across long sessions or context limits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cj-vana/claude-swarm/skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cj-vana/claude-swarm --skill skill
Clone the repo
git clone --depth 1 https://github.com/cj-vana/claude-swarm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swarm

README.md
[![agentmods](https://agentmods.dev/badge/skills/cj-vana/claude-swarm/skill.svg)](https://agentmods.dev/skills/cj-vana/claude-swarm/skill)
Your own site
<a href="https://agentmods.dev/skills/cj-vana/claude-swarm/skill"><img src="https://agentmods.dev/badge/skills/cj-vana/claude-swarm/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,810 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.09810
Opus 5 $0.00023 $0.04905
Sonnet 5 $0.00009 $0.01962
Haiku 4.5 $0.00005 $0.00981

Measured 8d ago against content hash a337c707d45c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade D, and why

swarm scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **Prohibited tools**: rm -rf, sudo, chmod 777, etc.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

grep -q "^\.claude/" .gitignore 2>/dev/null || echo ".claude/" >> .gitignore

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Prohibited tools**: rm -rf, sudo, chmod 777, etc.
skill/SKILL.md · 1,281 lines

How it starts

The opening of the file, as written. The whole thing — 1,281 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Claude Swarm Skill

This skill enables autonomous, multi-hour coding sessions using the claude-swarm MCP server with protocol-based behavioral governance.

Overview

The orchestrator pattern separates concerns:

  • Orchestrator (you): Plans work, monitors progress, handles decisions
  • Workers: Focused Claude Code sessions that implement individual features
  • Protocols: Behavioral constraints that govern what workers can/cannot do

Complete Workflow (Step-by-Step)

Follow these phases in order for every swarm session:

Phase 0: Repository Readiness Check

Before starting any feature work, ensure the repository is ready:

1. ENSURE GITIGNORE (CRITICAL - always do this first):
   Check if .gitignore contains swarm state files. If not, add them:

   Required entries:
   .claude/
   claude-progress.txt
   init.sh

   Run this to add missing entries:
   grep -q "^\.claude/" .gitignore 2>/dev/null || echo ".claude/" >> .gitignore
   grep -q "^claude-progress.txt" .gitignore 2>/dev/null || echo "claude-progress.txt" >> .gitignore
   grep -q "^init.sh" .gitignore 2>/dev/null || echo "init.sh" >> .gitignore

   **Why:** Swarm state files must NEVER be committed. They contain session-specific
   data, absolute paths, worker logs, and will cause merge conflicts.

2. ANALYZE the repository:
   → setup_analyze(projectDir)

3. IF freshness score >= 50 (missing configurations):
   → setup_init(projectDir)
   → Monitor: setup_status(projectDir)
   → Wait for all setup workers to complete

4. IF freshness score < 50:
   → Proceed to Phase 1 (repo already configured)

Why: Ensures repos have CLAUDE.md, CI, and other essentials before feature work begins.

Phase 0.5: Session Recovery Check

Before starting a new session, check if a previous session crashed:

1. CHECK for crashed session:
   → resume_session(projectDir)
   - If crash detected: auto-recovers from checkpoint
   - If paused: resumes with pending features listed
   - If no session: proceed to Phase 1

2. IF recovered:
   → orchestrator_status(projectDir)
   → Decide: continue existing session or orchestrator_reset to start fresh

Read the full file on GitHub · 1,281 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 1,281 lines · 47 tokens per session scan D a337c707d45c

Subscribe to this mod's changes

swarm is a skill published in the GitHub repository cj-vana/claude-swarm (110 stars, last pushed 6mo ago), licensed MIT. It adds 47 tokens to every session and 9,810 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

hermes-claude-collaboration

MANDATORY first skill to load when Hermes needs to orchestrate Claude Code on local Windows via SSH+tmux. Covers session lifecycle, monitoring (capture-pane), R1/R2/R3 debate protocol, error recovery, and bulk file transfer. Trigger whenever: (1) user requests local file operations/code modifications/script runs/Git…

moyupeng0422/legal-tools · 130 tokens

sessions

Use when an AI agent or human needs to create, list, rename, or kill named tmux sessions with persistent metadata (repo, task, host) — turning anonymous tmux clutter into a labeled, queryable inventory of agent sessions. Wraps the tomoji sessions CLI.

elijahmuraoka/skills · 61 tokens

session-manager-driver

Drive the trusty-mpm session manager (binary tm) to spawn, observe, command, and decommission durable tmux-backed Claude Code sessions in isolated workspaces. Wraps the tm session CLI / REST API and provides the spawn → observe → answer → stop/resume/decommission loop. Critically, the DRIVER interprets the raw tmux…

bobmatnyc/claude-mpm · 100 tokens

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

python-feature-lifecycle

Guidance for package and feature lifecycle in the Agent Framework Python codebase, including stage meanings, feature-stage decorators, feature enums, and how to move APIs from one stage to the next.

microsoft/agent-framework · 43 tokens

python-development

Coding standards, conventions, and patterns for developing Python code in the Agent Framework repository. Use this when writing or modifying Python source files in the python/ directory.

microsoft/agent-framework · 35 tokens