agentleFS
ekamphuis82ekamphuis82/claude-code-swarm/skills/swarm-setup/SKILL.md

swarm-setup

Skill0 starsChanged 5 months agoMITView on GitHub

Re-runnable configuration dialogue for the codeswarm plugin — shows the current config when present, asks the seven setup questions (always-on, top model, accessibility level, retrospect mode, rigor, ad hoc specialists, issue tracker) and writes ~/.claude/codeswarm.json. Run it any time settings change, e.g. after a subscription change.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Show current config first: Read the config path. If the file exists, print its values as a compact table (for issueTracker.tokenFile print …

    line 23
  2. Very specific:

    When true, every new session starts with a one-line directive to route substantive coding work through the swarm director.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/codeswarm:swarm setup — configuration (re-runnable)

You (the main session) run this inline — no agents, no workflow script. The result is exactly ONE file:

~/.claude/codeswarm.json — that is $HOME/.claude/codeswarm.json (macOS/Linux) or %USERPROFILE%\.claude\codeswarm.json (Windows). When the CLAUDE_CONFIG_DIR environment variable is set, the file lives at $CLAUDE_CONFIG_DIR/codeswarm.json instead. The SessionStart hook and the swarm director read exactly this path — write nowhere else.

Re-runnable by design: running setup again shows the current values, re-asks every question and overwrites the file with the new answers. Typical reason to re-run: a subscription change (raise or drop the top-model cap).

Flow

  1. Show current config first. Read the config path. If the file exists, print its values as a compact table (for issueTracker.tokenFile print only the path — NEVER the file contents) and use them as the defaults for the questions below. If absent, say this is first-time setup and use the stated defaults.
  2. Ask the seven questions below — one at a time, short answers, always offering the default.
  3. Write the file with the Write tool, exact shape as in "File shape" below. Pretty-print (2-space indent). Carry over a lastSmokeVersion key when the existing file has one — it is director bookkeeping for the update canary (see codeswarm:swarm-director), not a setup question; overwriting setup must not erase it.
  4. Validate what you wrote — run node tools/validate-config.js from the plugin root. Exit 0 = done. Non-zero: the write is wrong (a typo'd key is silently ignored by every reader, which is exactly how rigor: "standard" went unnoticed for months) — fix the file and re-run until it exits 0 before confirming to the user.
  5. Confirm: print the written path and the final values (token file path only, never token contents). Mention: alwaysOn takes effect on the next session (the SessionStart hook reads it); /codeswarm:swarm doctor displays the active config; re-run /codeswarm:swarm setup any time.

The seven questions

  1. Always-on mode? — key alwaysOn, true/false, default false. When true, every new session starts with a one-line directive to route substantive coding work through the swarm director. When false, the swarm only engages when mentioned or via /codeswarm:swarm. Cost: on routes more work through the multi-agent swarm — higher token use than working inline; off keeps the swarm opt-in.
  2. Top model — key topModel, default null. Three kinds of value, present them in this order:
    • null — top-tier agent calls (implementers, finders, synthesis, review gates) carry no model and inherit the session model. Whatever model the user is running the session on is what the top tier uses.
    • a family alias — "opus" / "sonnet" / "haiku" / "fable". This tracks the LATEST release of that family: "opus" runs Opus 5.5 today and auto-moves to a newer Opus when one ships. Recommended for "always use the best Opus" without re-editing config. Use "sonnet" to cap top-tier cost on a limited subscription.
    • a pinned id — e.g. "claude-opus-4-8" / "claude-opus-4-7". Freezes the top tier to that exact version (reproducibility, or staying on a version you have validated); it will NOT auto-upgrade. Any model name Claude Code accepts is valid. Mechanical/verify tiers are unaffected either way. There is no synthetic "latest" keyword — the family alias IS the latest-tracking value. Cost: the top tier is the single biggest per-agent spend; a family cap like "sonnet" cuts it substantially, null/"opus" spends the most.
  3. Accessibility level — key accessibility, one of "off", "A", "AA", "AAA", default "AA" (the industry norm — a default, not a mandate). Controls whether the wcag dimension sits in the default review set and which WCAG 2.2 level the auditors apply (contrast bars 3.0 / 4.5 / 7.0 shift with the level; AAA adds the stricter criteria). A target repo's ## swarm profile can override this per repo (repo wins). Cost: off drops the wcag finder from the default review — one fewer finder agent per review; A/AA/AAA cost the same, they only change strictness.
  4. Retrospect mode — key retrospect, one of "full", "light", "off", default "full". full = the post-build architecture retrospect judges coherence, package hygiene, naming and DX; light = breaking architecture findings only, no DX/naming nits; off = the phase is skipped. Per-repo ## swarm override wins. The retrospect never auto-fixes in any mode. Cost: full adds a whole-build architecture pass (one extra agent) at the end of each build; light is cheaper, off spends nothing. Note: retrospect runs ONLY under full rigor — on the default lite rigor this setting has no cost because the phase is skipped entirely.
  5. Rigor — key rigor, one of "lite", "full", default "lite". The default verification depth. lite (default): a build is implement + one independent test per task (no adversarial review, no retrospect); a review is single-lens verify with no severity check — roughly 1.5–2x raw cost. The independent tester still gates correctness; you trade away the adversarial review and the retrospect. full: adds the adversarial review + retrospect (build) and the graded 2-lens + severity verify (review), ~3–4x. Recommend leaving it on lite and escalating a single run with --thorough (or --rigor=full) when a bug would be expensive; set full only if most of your work is high-stakes.
  6. Ad hoc specialists? — key adHocSpecialists, true/false, default false; recommend true to users who also want to use their generated my-* stack agents outside swarm runs (a common and sanctioned use — the agents are theirs). When true, the session directives and newly generated my-* descriptions permit spawning a stack specialist directly for small single-scope tasks; multi-step or review-gated work still routes through the director. Existing my-* files are never rewritten by this setting — hand-edit the description line, or delete the file and re-run onboard (onboard never overwrites existing files), to update agents generated before the switch. Cost: none by itself. Direct use skips the swarm's verification layers on purpose — that is the trade: cheaper small tasks, no independent verify on them.
  7. Issue tracker — key issueTracker, default { "kind": "none" }. none = findings stay in-chat. gitlab / github = the director MAY (opt-in per run, batched after a workflow) file confirmed findings as issues.
    • gitlab: also ask apiBase (default https://gitlab.com/api/v4) and a token FILE PATH for tokenFile.
    • github: ask whether the gh CLI is installed and authenticated — yes: omit tokenFile (the CLI carries auth); no: ask a token FILE PATH for tokenFile (REST fallback).
    • Token safety (hard rule): NEVER let the user paste a token into the chat. The conversation is stored in transcripts/history. Ask for the PATH to a token file the user creates themselves; verify it exists (test -f / Test-Path) without ever printing its contents. If a token does get pasted anyway: do not use or store it, tell the user to treat it as compromised and rotate it, then continue with a file path.

File shape (write exactly these keys)

{
  "version": 1,
  "alwaysOn": false,
  "topModel": null,
  "accessibility": "AA",
  "retrospect": "full",
  "rigor": "lite",
  "adHocSpecialists": false,
  "issueTracker": { "kind": "none" }
}

issueTracker variants:

{ "kind": "gitlab", "apiBase": "https://gitlab.com/api/v4", "tokenFile": "/home/me/.gitlab-token" }
{ "kind": "github" }
{ "kind": "github", "tokenFile": "/home/me/.github-token" }

Who reads this file

  • hooks/session-start.js — alwaysOn (three-stage session nudge) and adHocSpecialists (directive wording).
  • hooks/swarm-router.js — file existence as the opt-in gate, and adHocSpecialists (routing-line wording).
  • The swarm director (codeswarm:swarm-director) — all other keys, at triage time, wired into workflow args (see its "Config file" section).
  • /codeswarm:swarm doctor — displays the active config as one status row.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.