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

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.

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
  1. Distinctive:

    Run in this order. Status per row: OK / FAIL / WARN / SKIP.

    line 29
  2. Very specific:

    Never repair the file yourself — report and let the user fix it or re-run setup.

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 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 (../.. from skills/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.

  1. node — run node --version in the shell. FAIL if the command is not found. Fix hint: install Node.js (LTS or newer); the syntax check below runs it.
  2. 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.
  3. 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 any codeswarm:my-* stack agents generated by onboard. FAIL if none; WARN if only the process agents and the clone's agents/ contains my-* files. Fix hint: plugin not installed or stale — /plugin install codeswarm@claude-code-swarm, or after a git pull or an onboard run: /reload-plugins (or restart Claude Code).
  4. Skills registered — check your available-skills list for codeswarm:swarm-director, codeswarm:repo-entry and codeswarm: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.
  5. Content sync (installed vs clone) — the version in plugin.json only 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 compare Get-FileHash output of both trees, excluding .git and node_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 pull in the clone, then /reload-plugins (or restart Claude Code).
  6. Config file — run node tools/validate-config.js --json from the plugin root (it resolves CLAUDE_CONFIG_DIR itself, falling back to ~/.claude). Exit 0 = PASS; exit 1 = FAIL, and the Detail column lists each reported key: value — hint verbatim (invalid values AND unknown keys — an unknown key is silently ignored by every reader, which is how rigor: "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; for issueTracker.tokenFile print only the path, never the file's contents). When lastSmokeVersion is 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).
  7. Workflow + hook syntax — two different checks, because the file kinds differ. Hooks and tools are standalone CJS: from the installed plugin root, node --check each file in hooks/ and tools/ (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 plain node --check CANNOT 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).
  8. my- contract (upstream never ships my-* files) — in the CLONE run git ls-tree -r --name-only HEAD -- agents skills workflows and filter for entries whose file or directory name starts with my- (agents/my-*.md, skills/my-*/, workflows/my-*.js). None tracked: OK. Some tracked: check git 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 shipping my-* files, which breaks onboard's shipped-vs-user name classification (swarm-onboard.js derives reserved names at runtime and deliberately treats my-* names in the plugin dirs as the user's own onboarded artifacts). Fix hint: report it upstream; hold off on git pull until fixed. If origin is the user's own fork, tracked my-* files are their committed onboarded artifacts: OK, detail "N own my-* artifacts committed". Untracked my-* files are always fine (fresh onboard output not yet committed). Clone path unknown: SKIP, same hint as check 5.
  9. 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'). A my-x next 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.
  10. 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 ## swarm section when present (it may override accessibility, retrospect, review dimensions), else (b) the global config file, else (c) the built-in default — and report key = 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 ## swarm key. 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:

#CheckStatusDetailFix
  • 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.

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.