agent-swarm: Instructions file for Claude Code

CLAUDE.md

agent-swarm CLAUDE.md is an instructions file for Claude Code from desplega-ai/agent-swarm. It costs 6,151 tokens per session, scanned A, original, MIT.

A set of instructions for working on the Agent Swarm project, including its architecture, commands, code-search method, and development rules. Agent Swarm coordinates several coding agents.

In plain words
What is it for?
Use it when developing or reviewing the Agent Swarm codebase, starting its server, searching its code, or checking architectural constraints.
Why use it?
It keeps changes consistent with rules about databases, API keys, prompts, and worker communication.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

This is desplega-ai/agent-swarm's own configuration. It tells Claude Code how to work on agent-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 agent-swarm configures →

About the project

Agent Swarm is a self-hosted operating system for coordinating AI agents as a company-wide workforce. A lead agent assigns work to workers running in isolated containers, while shared memory, tools, schedules, workflows, and review gates preserve and manage that work. The catalogue entries provide agents, commands, skills, hooks, and other extensions for operating the system.

desplega-ai/agent-swarm · 1,160 stars · on GitHub · agent-swarm.dev

Reuse

Borrowing it

Nothing to install: this file belongs to desplega-ai/agent-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/desplega-ai/agent-swarm/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/desplega-ai/agent-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 agent-swarm CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/desplega-ai/agent-swarm/claude-md/github.svg)](https://agentmods.dev/instructions/desplega-ai/agent-swarm/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/desplega-ai/agent-swarm/claude-md"><img src="https://agentmods.dev/badge/instructions/desplega-ai/agent-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 agent-swarm CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/desplega-ai/agent-swarm/claude-md"><img src="https://agentmods.dev/badge/instructions/desplega-ai/agent-swarm/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,151 This file is loaded in full into every session.
When invoked 6,151 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.06151 $0.06151
Opus 5.5 $0.02460 $0.02460
Sonnet 5.5 $0.01230 $0.01230
Haiku 4.5 $0.00615 $0.00615

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

Security

Grade A, and why

agent-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 3d 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 · 220 lines

How it starts

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

Agent Swarm

Multi-agent orchestration for Claude Code, Codex, Gemini CLI. Bun + TypeScript, bun:sqlite (WAL), Biome, Ink CLI.

Setup: CONTRIBUTING.md. Server: bun run start:http.

Architecture invariants

  • The API server (src/http.ts, src/server.ts, src/tools/, src/http/) is the sole owner of the database (SQLite, or Postgres when DATABASE_URL is set; runbooks/postgres.md). Worker-side code (src/commands/, src/hooks/, src/providers/, src/prompts/, src/cli.tsx, src/claude.ts) NEVER imports src/be/db or bun:sqlite: it calls the API over HTTP with the swarm API key and the X-Agent-ID header. CI: scripts/check-db-boundary.sh.
  • Read the swarm API key with getApiKey() from src/utils/api-key.ts (precedence AGENT_SWARM_API_KEY > API_KEY), NEVER from process.env. CI: scripts/check-api-key-boundary.sh.
  • System prompt and task prompt text goes through the prompt-template registry in src/prompts/. To add a prompt section, add or update a registered template and resolve it from the call site, instead of concatenating strings in runners, hooks or providers.
  • Use Bun, not Node, npm, pnpm or vite: Bun.serve() for HTTP/WebSocket, bun:sqlite for SQLite (API server only), Bun.file() for file I/O, Bun.$ for shell. Bun loads .env by itself.

Pull requests

Every PR, from anyone, fills .github/pull_request_template.md: keep its **Why:**, **Risk:** and **Urgency:** lines and its ## headings. gh pr create --body and --fill skip the template, so write the body to a file, check it, then pass the file:

bun scripts/check-pr-body.ts --title "<conventional title>" --body-file /tmp/pr-body.md
gh pr create --title "<conventional title>" --body-file /tmp/pr-body.md

A red PR Body check blocks the merge. Editing the description re-runs it, with no push. Section rules: the "writing a pull request description" block below.

Read the full file on GitHub · 220 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. 3d ago Changed · +1 lines · +10 tokens per session 00706ab282f8
  2. 7d ago Changed · +37 tokens per session 397dcc830599
  3. 10d ago Changed · +77 tokens per session a2227108fdc0
  4. 13d ago Changed · -234 lines · -5,438 tokens per session 75e859cb47f3
  5. 16d ago Changed · +2 lines · +109 tokens per session 9be8b3bb819c
  6. 17d ago Changed · +9 tokens per session dfa3e43cc061
  7. 21d ago Changed · +67 tokens per session 15dae789f8e9
  8. 22d ago Changed · +1 lines · +331 tokens per session 739fdcfd89eb
  9. 25d ago Changed · +8 lines · +144 tokens per session 1dea3d1b7441
  10. 27d ago First seen · 442 lines · 10,805 tokens per session scan A a37661a86d7b

Subscribe to this mod's changes

agent-swarm CLAUDE.md is an instructions file published in the GitHub repository desplega-ai/agent-swarm (1,160 stars, last pushed today), licensed MIT. It adds 6,151 tokens to every session, about $0.0246 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-30.

Related

agent-swarm CLAUDE.md compared with instructions from other repositories

agent-swarm CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-swarm CLAUDE.mddesplega-ai/agent-swarmInstructions file1.2ktodayMITA6,151Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,303GitHub Copilot
deno copilot-instructions.mddenoland/denoInstructions file109kyesterdayMITA3,077GitHub Copilot