swarm-doctor
Skill0 starsChanged 5 months agoMITView on GitHub
Installation and configuration diagnostics for the codeswarm plugin — checks node, the Workflow tool, registered agents and skills, installed copy vs clone, the config file (when present), workflow-script syntax, the my- naming contract, custom-agent overlap and the effective per-repo config resolution, then prints one status table with a fix hint per failing row. Static checks only; run /codeswarm:swarm smoke for a live end-to-end proof.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- repo-entrySkill
- swarm-directorSkill
- swarm-greenfieldSkill
- swarm-issuesSkill
- swarm-resumeSkill
- swarm-setupSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Run in this order. Status per row: OK / FAIL / WARN / SKIP.
- Very specific: line 70
Never repair the file yourself — report and let the user fix it or re-run setup.
≈ “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 doctor — installation and config diagnostics
You (the main session) run every check below yourself, inline — no agents, no workflow script. Collect one row per check and print ONE compact status table, then the closing line. Nothing else.
Route note: doctor is reached through the director triage table ("doctor" →
load this skill). There is deliberately no separate commands/swarm-doctor.md
— /codeswarm:swarm doctor already flows through commands/swarm.md into the director,
so a triage row is the simpler route and keeps /codeswarm:swarm the single entrypoint.
Locating directories
- Installed plugin root: this skill's base directory is announced when the
skill loads; the plugin root is two levels up (
../..fromskills/swarm-doctor/). Resolve it to an absolute path first — checks 3–7 run against it. - Clone (marketplace source): the directory the user registered with
/plugin marketplace add. If you do not know it, ask the user for the path once; if they cannot say, mark check 5 SKIP with hint "clone path unknown".
Checks
Run in this order. Status per row: OK / FAIL / WARN / SKIP.
- node — run
node --versionin the shell. FAIL if the command is not found. Fix hint: install Node.js (LTS or newer); the syntax check below runs it. - Workflow tool — inspect your OWN tool list for a tool named
Workflow. FAIL if absent. Fix hint: this Claude Code version does not expose the Workflow tool; update Claude Code — without it the director cannot run any workflow script. If this row fails, still finish the remaining checks. - Agents registered — inspect the agent types available to your Agent
(subagent/Task) tool for
codeswarm:entries. Expect the five process agents (codeswarm:swarm-tester,codeswarm:swarm-reviewer,codeswarm:security-auditor,codeswarm:wcag-auditor,codeswarm:swarm-researcher) plus anycodeswarm:my-*stack agents generated by onboard. FAIL if none; WARN if only the process agents and the clone'sagents/containsmy-*files. Fix hint: plugin not installed or stale —/plugin install codeswarm@claude-code-swarm, or after agit pullor an onboard run:/reload-plugins(or restart Claude Code). - Skills registered — check your available-skills list for
codeswarm:swarm-director,codeswarm:repo-entryandcodeswarm:swarm-doctor(this skill — if you are reading it, it loaded). The workflow entries (codeswarm:swarm-build,-review,-refactor,-research,-drift,-smoke,-onboard) also appear here when the harness lists workflows as skills. FAIL when the director or repo-entry skill is missing. Fix hint: same as check 3. - Content sync (installed vs clone) — the
versioninplugin.jsononly changes when a release bumps it, so the installed copy can be content-stale while the number still matches. Staleness is therefore judged by content, not by the version number — compare the trees:diff -rq -x .git -x node_modules "<clone>" "<installed root>"(POSIX/git-bash; on PowerShell compareGet-FileHashoutput of both trees, excluding.gitandnode_modules— installed dependencies are not plugin content). Any differing or missing file: WARN "installed copy is stale", detail listing up to 3 differing paths. Fix hint:git pullin the clone, then/reload-plugins(or restart Claude Code). - Config file — run
node tools/validate-config.js --jsonfrom the plugin root (it resolvesCLAUDE_CONFIG_DIRitself, falling back to~/.claude). Exit 0 = PASS; exit 1 = FAIL, and the Detail column lists each reportedkey: value — hintverbatim (invalid values AND unknown keys — an unknown key is silently ignored by every reader, which is howrigor: "standard"went unnoticed for months); exit 2 = FAIL "config is not valid JSON". Never repair the file yourself — report and let the user fix it or re-run setup. Then read the config and report its values inline in the Detail column (whatever keys exist; forissueTracker.tokenFileprint only the path, never the file's contents). WhenlastSmokeVersionis present, compare it against the running Claude Code version (claude --version): mismatch = WARN "plumbing last smoke-tested on<old>", fix hint: run/codeswarm:swarm smoke. Missing file: WARN, detail "not configured — defaults apply". Fix hint: run/codeswarm:swarm setup(re-runnable; writes this file). - Workflow + hook syntax — two different checks, because the file kinds
differ. Hooks and tools are standalone CJS: from the installed plugin root,
node --checkeach file inhooks/andtools/(a broken hook script errors on every SessionStart/prompt, so it must be diagnosed here; a broken tool breaks the smoke bookkeeping). The workflow scripts are Workflow-harness modules (export const meta+ top-level return) that plainnode --checkCANNOT validate — whether it passes is node-version luck (v24 yes, v18 no); never run it on them. Their syntax gate is the test file:node --test "<plugin root>/workflows/syntax.test.mjs"(parses each script the way the harness does; no agents, nothing executed). FAIL listing the broken file(s). Fix hint: the installed copy is corrupt or a local edit broke it — restore from the clone and/reload-plugins(or restart Claude Code). - my- contract (upstream never ships
my-*files) — in the CLONE rungit ls-tree -r --name-only HEAD -- agents skills workflowsand filter for entries whose file or directory name starts withmy-(agents/my-*.md,skills/my-*/,workflows/my-*.js). None tracked: OK. Some tracked: checkgit remote get-url origin— if origin is the plugin's upstream repo (the repo the plugin was installed from, not the user's own fork), FAIL: upstream is shippingmy-*files, which breaks onboard's shipped-vs-user name classification (swarm-onboard.jsderives reserved names at runtime and deliberately treatsmy-*names in the plugin dirs as the user's own onboarded artifacts). Fix hint: report it upstream; hold off ongit pulluntil fixed. If origin is the user's own fork, trackedmy-*files are their committed onboarded artifacts: OK, detail "N own my-* artifacts committed". Untrackedmy-*files are always fine (fresh onboard output not yet committed). Clone path unknown: SKIP, same hint as check 5. - Custom-agent overlap — compare the
codeswarm:my-*agents in your registry against the non-codeswarm custom agents there (the user's own agents, other plugins'). Amy-xnext to a custom agent whose name or description clearly covers the same role/stack: WARN listing the pairs. Fix hint: pick one per lane — drop or ignore the duplicate, or re-run/codeswarm:swarm onboard(the director passes your existing agents, so the proposal marks overlap for you to resolve at the approval gate). No custom agents or no overlap: OK. Purely informational — overlap wastes attention and blurs dispatch, it breaks nothing. - Effective config (per-repo resolution) — the value the director would
actually use from the CURRENT working directory, per key. For each of
topModel,accessibility,retrospect,rigor,adHocSpecialists,issueTracker.kind: resolve (a) the current repo's CLAUDE.md## swarmsection when present (it may overrideaccessibility,retrospect, reviewdimensions), else (b) the global config file, else (c) the built-in default — and reportkey = value (repo|config|default)in the Detail column. WARN when the repo profile carries a key the director does not read (a typo there is silently ignored at triage time — this row is where it gets caught); fix hint: correct the## swarmkey. Not inside a repo or no CLAUDE.md: resolve from config/defaults only, note "no repo profile". Purely informational otherwise: OK.
Output
Exactly one markdown table, then one closing line:
| # | Check | Status | Detail | Fix |
- Detail: version numbers, counts, config values — terse facts only.
- Fix: only on FAIL/WARN/SKIP rows, the hint from the check above; leave OK rows' Fix cell empty.
Closing line (always, verbatim intent): doctor is static — it cannot prove
that agentType resolution works end to end. Suggest running /codeswarm:swarm smoke
for a live proof (one finder + one verifier through a real workflow against
the planted-bug fixture). That is why smoke and doctor both exist (spec
item 16): smoke was kept on purpose.
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.

