swarm: Instructions file for Claude Code

CLAUDE.md

swarm CLAUDE.md is an instructions file for Claude Code from ra3orblade/swarm. It costs 3,556 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Swarm, a local control system that coordinates AI coding-agent sessions across repositories. It tracks tasks, shared resources, workspaces, processes, rules, and verification checks through a dashboard and command-line tools.

In plain words
What is it for?
Use it when developing Swarm, updating its dashboard, command-line interface, agent-session tracking, task claims, resource management, or enforcement rules.
Why use it?
It gives agents the project rules and current status needed to make safe, compatible changes to a system that manages other coding sessions.

Instructions file for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions Codex.

This is ra3orblade/swarm's own configuration. It tells Claude Code how to work on swarm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything swarm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ra3orblade/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ra3orblade/swarm/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ra3orblade/swarm

Made for: Claude Code.

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 CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ra3orblade/swarm/claude-md/github.svg)](https://agentmods.dev/instructions/ra3orblade/swarm/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ra3orblade/swarm/claude-md"><img src="https://agentmods.dev/badge/instructions/ra3orblade/swarm/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swarm CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ra3orblade/swarm/claude-md"><img src="https://agentmods.dev/badge/instructions/ra3orblade/swarm/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,556 This file is loaded in full into every session.
When invoked 3,556 The same file — it is already loaded in full.
Security scan A 0 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.03556 $0.03556
Opus 5.5 $0.01422 $0.01422
Sonnet 5.5 $0.00711 $0.00711
Haiku 4.5 $0.00356 $0.00356

Measured 2d ago against content hash 350e65cac326, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swarm CLAUDE.md scanned grade A with 0 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 55 lines

How it starts

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

CLAUDE.md

Guidance for Claude Code working in this repository.

What this is

Swarm — an open-source (Apache-2.0), local-first control plane for AI-agent development on any repository. One daemon watches every Claude Code session on the machine (via hooks, stream-json, and MCP), keeps a ledger of task claims, worktrees, runtime resources and verification gates, enforces rules as hook denials instead of prose, and streams everything to a dashboard. It is repo-agnostic: it must never require files inside a monitored repository; state lives in ~/.swarm/.

Docs-first: start at docs/00-index.md; the user-facing surface (dashboard, CLI, MCP tools, and the in-session surface Claude Code renders — status line, permission cards, rewrites, wake) is specified in docs/08-interface.md. Nothing is built from a doc still marked draft without flagging it. Open questions are OQ-N in docs/07-open-questions.md; decisions are recorded there as > **Decision:**, never inline in chat only. Task IDs in docs/06-roadmap.md are immutable; flip status the same turn work lands.

Status

M0 + M0.8 + M0.9 done; M1 claims / resources / process registry (swarm serve/proc) / task source and M2 rules (incl. write rules) + Incidents view landed (2026-08-22, v0.4.0); M1 + M2 complete 2026-08-22 (auto-renew M1.2, handoffs + SessionStart context M1.3, gates M2.2); M3.1 swarm run (daemon/src/runner.ts) landed; M3.2 permission broker (store.evaluateTool shared with the hook) and M3.3 run-from-dashboard landed 2026-08-22; M3 complete. SQLite-backed (~/.swarm/swarm.db). Reads Claude Code transcripts for tokens/cost/reasoning, not just hooks — the dashboard at http://127.0.0.1:7777 shows every Claude Code session on the machine live (hooks installed user-wide via swarm install), with a project sidebar and Fleet / Board / PRs / Timeline / Spend / Stats views plus session detail. Config is ~/.swarm/config.toml + optional <repo>/.swarm.toml (core/src/config.ts, docs/13); rules v2 (core/src/rules.ts guardBash for Bash, guardWrite for file tools / Bash cwd against claimed worktrees) return ask/deny on PreToolUse and record incident.opened (ack via incident_acks); task source is core/src/tasks.ts; process registry is core/src/processes.ts + packages/cli/src/procs.ts; runtime resources are core/src/resources.ts; PRs come from gh/glab via daemon/src/forge.ts. Dashboard is plain HTML/JS in packages/web/public (index.html, app.js, viz.js, table.js — the shared data-grid), served by the daemon. Three generated files sit beside them — menus.js (React island running @react-fancy-menus/core), fm.css, icons.js (Phosphor subset) — produced by bun run build:web (packages/web/tools/build.ts, runs on postinstall). Icons are pixelarticons everywhere (the subset is listed in packages/web/tools/build.ts); menus are described as data in app.js (menuSpec) and rendered by src/menus.tsx. The dashboard is React (M11, OQ-6 decision 2026-08-27): it lives in packages/web/src, is bundled by Bun.build into public/dashboard.js + dashboard.css, and serves /. The vanilla app.js is retired; viz.js and table.js remain in public/ only because the team dashboard (packages/team) is still a vanilla page that loads them from there. Read packages/web/src/README.md before touching it — the conventions there (selectors return snapshot slices, columns at module scope, never wrap an <svg>, reuse the stylesheet's class names) each exist because breaking one produced a bug. bun run check:classes fails on a className with no rule behind it.

Read the full file on GitHub · 55 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. 2d ago Changed 350e65cac326
  2. 5d ago Changed · +493 tokens per session e0c3fc5539ef
  3. 28d ago Changed a0e4582d2c12
  4. 1mo ago Changed · +157 tokens per session 457ca15b2222
  5. 1mo ago Changed · +20 tokens per session 3867daa6e1ab
  6. 1mo ago Changed · +3 lines · +383 tokens per session c785b3ac953e
  7. 2mo ago First seen · 52 lines · 2,503 tokens per session scan A e52db390aea0

Subscribe to this mod's changes

swarm CLAUDE.md is an instructions file published in the GitHub repository ra3orblade/swarm (14 stars, last pushed 3d ago), licensed Apache-2.0. It adds 3,556 tokens to every session, about $0.0142 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens