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.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- repo-entrySkill
- swarm-directorSkill
- swarm-doctorSkill
- swarm-greenfieldSkill
- swarm-issuesSkill
- swarm-resumeSkill
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
- Very specific: line 23
Show current config first: Read the config path. If the file exists, print its values as a compact table (for issueTracker.tokenFile print …
- Very specific: line 48
When true, every new session starts with a one-line directive to route substantive coding work through the swarm director.
≈ “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.
Files
/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
- Show current config first. Read the config path. If the file exists,
print its values as a compact table (for
issueTracker.tokenFileprint 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. - Ask the seven questions below — one at a time, short answers, always offering the default.
- Write the file with the Write tool, exact shape as in "File shape"
below. Pretty-print (2-space indent). Carry over a
lastSmokeVersionkey when the existing file has one — it is director bookkeeping for the update canary (seecodeswarm:swarm-director), not a setup question; overwriting setup must not erase it. - Validate what you wrote — run
node tools/validate-config.jsfrom 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 howrigor: "standard"went unnoticed for months) — fix the file and re-run until it exits 0 before confirming to the user. - Confirm: print the written path and the final values (token file path
only, never token contents). Mention:
alwaysOntakes effect on the next session (the SessionStart hook reads it);/codeswarm:swarm doctordisplays the active config; re-run/codeswarm:swarm setupany time.
The seven questions
- Always-on mode? — key
alwaysOn,true/false, defaultfalse. 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. - Top model — key
topModel, defaultnull. 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.
- 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## swarmprofile can override this per repo (repo wins). Cost:offdrops the wcag finder from the default review — one fewer finder agent per review;A/AA/AAAcost the same, they only change strictness. - 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## swarmoverride wins. The retrospect never auto-fixes in any mode. Cost:fulladds a whole-build architecture pass (one extra agent) at the end of each build;lightis cheaper,offspends nothing. Note: retrospect runs ONLY under full rigor — on the defaultliterigor this setting has no cost because the phase is skipped entirely. - 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 onliteand escalating a single run with--thorough(or--rigor=full) when a bug would be expensive; setfullonly if most of your work is high-stakes. - Ad hoc specialists? — key
adHocSpecialists,true/false, defaultfalse; recommendtrueto users who also want to use their generatedmy-*stack agents outside swarm runs (a common and sanctioned use — the agents are theirs). When true, the session directives and newly generatedmy-*descriptions permit spawning a stack specialist directly for small single-scope tasks; multi-step or review-gated work still routes through the director. Existingmy-*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. - 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 askapiBase(defaulthttps://gitlab.com/api/v4) and a token FILE PATH fortokenFile.github: ask whether theghCLI is installed and authenticated — yes: omittokenFile(the CLI carries auth); no: ask a token FILE PATH fortokenFile(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) andadHocSpecialists(directive wording).hooks/swarm-router.js— file existence as the opt-in gate, andadHocSpecialists(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.
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
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.

