swarm CLAUDE.md

swarm CLAUDE.md is an instructions file for Claude Code from ra3orblade/swarm. It costs 2,503 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.

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.

agentmods
npx agentmods add instructions/ra3orblade/swarm/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,503 This file is loaded in full into every session.
When invoked 2,503 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.02503 $0.02503
Opus 5 $0.01252 $0.01252
Sonnet 5 $0.00501 $0.00501
Haiku 4.5 $0.00250 $0.00250

Measured 6d ago against content hash e52db390aea0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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 · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 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) 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 · 52 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. 6d 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 (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,503 tokens to every session, about $0.0125 per session on Opus 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.