doctor
Skill1 starsChanged 3 months agoMITView on GitHub
Foundry health check (/foundry:doctor) — a thin, seven-check probe (the v0.25.0 test-suite realignment shrank this from a 2,900-line drop-in-check registry to one file). Checks the plugin manifest loads, hooks.json parses with every referenced hook script present, every skills/*/SKILL.md frontmatter YAML-parses, the stack-profile lock (if any) resolves, the operator registry resolves, and the control-plane preflight (no dangling repos{} path, no ancestor manifest already governing this project dir). Plus five advisory-only lines never counted toward RED — permissions-policy, agent-teams, branches, statusline (which names the first missing piece of the token-bar wiring), and retired-artifacts (what the updater's sweep would remove under --cleanup). Fails CLOSED for an operator-invoked check (exit non-zero on any hard failure); the --session-start cadence is advisory (fail-open, never wedges a session). Trigger when the operator says "/foundry:doctor", "foundry health check", or to diagnose why a session looks unhealthy.
81 other projects use a version of this.
Adopted by
Most recently taken up by
- JanSzewczyk/spec-driven-developmenttheir own version, first seen Nov 8, 2026
- stunt-double/stuntdouble-mcptheir own version, first seen Nov 8, 2026
- aaroncohn/openspec-conductor-powerupstheir own version, first seen Nov 8, 2026
- hydra-db/hydradb-claude-codetheir own version, first seen Nov 8, 2026
- woosikkim/oh-my-claudecode-slimtheir own version, first seen Nov 8, 2026
- Ubuntu-Buddha/claude-code-stranger-dangertheir own version, first seen Nov 8, 2026
Used with
Projects with it also use uninstall, cancel and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkilluninstall
Uninstall a community skill that was installed via the hub. Confirms before deleting files, refuses to touch first-party plugin skills, and logs every action. Use when the user wants to fully remove a community skill ("uninstall [skill]", "remove this skill") rather than just disable it.
Also in 6 projects that use this
woosikkimSkillcancel
Clear any stale OMC-Slim state
Also in 3 projects that use this
BlockSkillopen
Open markdown documents in Penpal for collaborative review. Use when you want a human to review a document, plan, or research artifact.
Also in 3 projects that use this
QinghongLinSkilleditor
Read analyst.json and detective.json, make all editorial decisions — what the blog argues, which findings matter, narrative arc and section structure. No visual design. Outputs editor.md (prose) and editor.json (structure with edt_xx IDs).
Also in 3 projects that use this
AnthropicSkillstatus
Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.
Also in 15 projects that use this
MicrosoftSkillreport
Turn an exploration (threads, findings, charts) into a single Markdown report — note, blog post, executive summary, KPI dashboard, slide brief, or multi-section analytical report, with embedded charts.
Also in 5 projects that use this
Other versions81 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 81
- Yeachan-Heo/oh-my-codex★ 34ksame name
- jihe520/MathModelAgent★ 6.2ksame name
- spotify/portal-ai-plugins★ 2.8ksame name
- fakechris/obsidian_vault_pipeline★ 165same name
- NoobyGains/godmode★ 118same name
- Rich627/whatsapp-claude-plugin★ 114same name
- bluzir/claude-code-design★ 102same name
- jjanczur/tyran★ 81same name
- svy04/ballast★ 73same name
- Hainrixz/agente-pagokit★ 68same name
71 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository71 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- amendSkill
- auditSkill
- authorize-releaseSkill
- authorizeSkill
- certify-localSkill
- certify-stagingSkill
- coherence-checkSkill
- command-deckSkill
- contextSkill
- cut-releaseSkill
- dashboards-as-codeSkill
- data-tier-cutoverSkill
- decommission-gateSkill
- deploy-statusSkill
- dispatchSkill
- drift-sweepSkill
- env-hygieneSkill
- extract-specSkill
- fleetSkill
- grounding-conformanceSkill
- id-applySkill
- id-architectSkill
- id-baselineSkill
- id-discoverSkill
- id-documentSkill
- id-driftSkill
- id-impactSkill
- id-implementSkill
- id-importSkill
- id-planSkill
- id-promoteSkill
- id-reviewSkill
- id-rollbackSkill
- id-simulateSkill
- id-syncSkill
- id-testSkill
- id-validateSkill
- id-verifySkill
- indexSkill
- infra-sandboxed-applySkill
- initSkill
- intakeSkill
- learn-captureSkill
- learn-distillSkill
- merge-when-greenSkill
- mode-autonomousSkill
- mode-interactiveSkill
- modeSkill
- post-upgradeSkill
- releaseSkill
- relockSkill
- report-citation-graphSkill
- reposSkill
- research-captureSkill
- research-firstSkill
- revertSkill
- sd-debugSkill
- sd-discoverSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 0 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 61 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
After editing hooks/hooks.json, any skills/*/SKILL.md frontmatter, or a stack-profile lock.
- Very specific: line 22
Before a release, as a cheap sanity pass (the binding pre-cut gate is foundry-release-acceptance.py, which itself requires DOCTOR-GREEN — …
- Very specific: line 43
ONLY difference is an OLDER version of the same profile id this installed plugin ships (the normal state right after a plugin update) is …
- Very specific: line 74
Never RED: flipping the flag is an adopter opt-in — see docs/how-to/agent-teams.md.
- Very specific: line 78
Never RED: the updater reports them every run and removes them only under --cleanup.
- Very specific: line 79
Every updater remedy the doctor prints names npx update-agentic-workspace@<v>, where <v> is this plugin's own cli-update/package.json …
“Common” is measured: kept by at least 6 in 10 of the 61 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/foundry:doctor
The Foundry self-diagnostic — a thin, seven-check probe (the v0.25.0 test-suite realignment;
foundry-doctor.py shrank from a 2,900-line drop-in-check registry, --selftest CLIs and all, to
one file). The
load-bearing behavioral assertions this file used to re-discover from the retired per-check
registry now live in the one pytest suite (tests/), run by CI on every PR —
foundry-doctor.py is a cheap, fast, every-session-safe probe, not the enforcement floor. The
real merge-side enforcement is the native floor (.github/workflows/ci.yml + the btb-gates
lane signal — Tier B advisory) plus hooks/foundry-git-discipline.sh's deterministic gh clause.
doctor is a mistake-catcher for the operator, not a merge gate.
When to trigger
- Operator: "/foundry:doctor", "is Foundry healthy?", "why does my session look off?".
- After editing
hooks/hooks.json, anyskills/*/SKILL.mdfrontmatter, or a stack-profile lock. - Before a release, as a cheap sanity pass (the binding pre-cut gate is
foundry-release-acceptance.py, which itself requiresDOCTOR-GREEN— seeskills/release/SKILL.md's pre-cut acceptance gate).
Procedure
Run the doctor:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/foundry-doctor.py"The seven checks, every run: 0.
python-deps(v1.18.2) — every module the plugin'srequirements.txtdeclares (yaml,jsonschema) is importable by this interpreter. A missing one names the pinned updater, which installs what is missing into the user site. Runs first: the other probes need both.manifest—.claude-plugin/plugin.jsonloads as JSON and carries aversion.hooks—hooks/hooks.jsonparses as JSON and every referenced hook command script exists on disk.skills-frontmatter— every shippedskills/*/SKILL.mdfrontmatter YAML-parses (a colon-in-a-plain-scalar defect class that is cheap to catch here, expensive live).stack-profile-lock—.foundry/stack-profile.lock(if present) resolves against the shippedpacks/tree; absent lock isok("not applicable"), not a failure. A lock whose ONLY difference is an OLDER version of the same profile id this installed plugin ships (the normal state right after a plugin update) is ADVISORY —lock behind the profile version this plugin ships (<id> <old>→<new>) — runpython3 "${CLAUDE_PLUGIN_ROOT}/scripts/foundry-stack-profile.py" --relock`` (AC-V118C-6). Any other mismatch — an id the plugin does not ship, a downgrade, a same-version content change, an unreadable lock — stays RED.operator-registry—.claude/foundry-operators.jsonresolves viafoundry_authz.control-plane(feat-foundry-control-plane-preflight, AC-CPP-1/-2/-3/-3b) — no danglingrepos{}path in this project's own manifest, and no ancestor.claude/foundry-project.jsonalready names or governs this project directory as a hosted repo — a mistake-catcher, not a floor.
The standalone
permission-floordrift probe (feat-foundry-doctor-permission-floor-check, AC-DPF-1..8) was retired by subtraction-wave (autonomy-continuation R4, AC-SUB-1c). Nothing replaces it, and nothing needs to: since v1.18.0 the floor writes only its deny rows, and the plugin's own scripts run through thefoundry-plugin-scripts-allow.pyPreToolUse hook (Bash rules naming a script path never matched a real invocation — measured).Plus advisory-only lines, rendered the same way but never counted toward
DOCTOR-RED:permissions-policy(feat-foundry-authorization-capability-preflight-at-dispatch, AC-CPD-4 — replaces the R1 drift-only advisory, feat-foundry-authorization-standing-grants- as-policy AC-SGP-6) — runsscripts/foundry-capability-preflight.pyover every atom of every ACTIVE release under.foundry/releases/*/release.yaml, printingpreflight over <n> active atom(s): <d> denied[, <c> not pre-granted]— only a capability a DENY rule would refuse is a blocker; not pre-granted means the session's permission mode decides at run time — followed by; policy absent|in-sync|drift (<k>) (.foundry/permissions.yaml vs .claude/settings.json), the same derivationfoundry-permissions-compile.py --checkruns, naming the two files compared. ADVISORY only on a denial or drift. Never RED.agent-teams(feat-agent-teams-enablement, AC-ATE-4) —agent-teams: on (settings env)oragent-teams: off, derived from whether the effective settings files'envblock setsCLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSto"1"(~/.claude/settings.json, then the project's.claude/settings.json, then.claude/settings.local.json, ascending precedence). Never RED: flipping the flag is an adopter opt-in — seedocs/how-to/agent-teams.md.retired-artifacts(hotfix-v1.17.4, ER #236) —retired-artifacts: none presentor<n> present (<paths>) — runnpx update-agentic-workspace@<v>--cleanup``: files an earlier release wrote and no current release reads, from the catalogue the CLI ships (cli/retired-artifacts.json). Never RED: the updater reports them every run and removes them only under--cleanup. Every updater remedy the doctor prints namesnpx update-agentic-workspace@<v>, where<v>is this plugin's owncli-update/package.jsonversion — never the bare name, which can run a stale npx cache (AC-V118C-8). Thestatuslineline reads theinstalled_plugins.jsonrecord whoseprojectPathis this project, then the user-scope record — never another project's.branches(branch-and-worktree-discipline, AC-BWD-3) —branches: <n> merged-not-deleted, <m> stale worktrees, computed by importingscripts/foundry-worktree-gc.py's own classifier (ancestry-only, no liveghcall — this stays a cheap, offline, every-run probe) over the session's own project dir. The line says what it measured (ER #244):(ancestry only; squash-merged branches need the gc's gh check), plus; <n> ref(s) outside the glob set — widen with --includewhen the built-in prefixes dropped any — on a squash-merge repo ancestry alone reads 0, so run the gc itself for a live count. Readsn/a (not a git checkout)when it is not one. ADVISORY when<n>> 0 (it names the gc's--dry-runthen--apply);okat 0. Never RED: a repo-wide sweep is an operator/agent action (--apply,ask-tiered), never a doctor-enforced one — seedocs/how-to/branching-and-cleanup.md.
Each probe is individually crash-proof — an unexpected exception inside one check is reported as that check's own RED result (
probe crashed: <type>: <detail>), never an uncaught traceback, so a single broken probe can never mask the others or wedge the advisory--session-startcadence.- Interpret:
DOCTOR-GREEN→ all seven checks passed.DOCTOR-RED(exit 1) → at least one hard check failed; the[XX ]-marked line names it. Fix the named defect (edit the manifest / hooks.json / the offending skill frontmatter / re-lock the stack profile / fix the operator registry / resolve the named control-plane finding) and re-run.
--session-start— advisory cadence, never blocks. Wired into the SessionStart hook; on a failure it prints aWARNING:to stderr (naming the real merge-side floor) and always exits 0 — it never wedges a session, unlike the operator-invoked form above.--heal— a documented no-op.foundry-doctor.py --healprintsfoundry doctor --heal: no-op (wiring auto-heal retired)and exits 0. The wiring-hash-pin auto-heal machinery it used to drive (.foundry/wiring-hash.pin,TRUSTED_ADVANCE/TAMPER/STALEclassification) was retired along withfoundry-wiring-hash.pyandfoundry-merge-gate.py— there is no wiring-hash check in the seven above and nothing for--healto do. It is kept callable only so a SessionStart hook or a muscle-memory/foundry:doctor --healfrom an older session does not hard-error.--repo <owner/repo>— accepted for back-compat, unused. The branch-protection required-status check this flag used to drive was retired withfoundry-merge-gate.py; the flag is still accepted (so an existing invocation does not error) but has no effect.
Inputs
- The Foundry plugin tree (
.claude-plugin/plugin.json,hooks/hooks.json,skills/*/SKILL.md). .foundry/stack-profile.lock(if present) + the shippedpacks/tree..claude/foundry-operators.json(operator registry).- This project's own manifest + any ancestor
.claude/foundry-project.json(control-plane). ~/.claude/settings.json+.claude/settings.json+.claude/settings.local.json(advisory-onlyagent-teamsline, ascending precedence).- The session's own project dir's git refs/worktrees, read-only, via
scripts/foundry-worktree- gc.py's classifier (advisory-onlybranchesline;n/awhen the project dir is not a git repo).
Outputs
- A per-check table (
[ok ]/[XX ]/[skip]per check) + aDOCTOR-GREEN/DOCTOR-REDverdict (exit 0 / 1).
Anti-patterns
- Treating a DOCTOR-GREEN as proof the merge floor is sound. It checks seven structural
invariants, not the merge-time floor —
.github/workflows/ci.yml+btb-gatesown that. - Treating
--session-start's advisory WARNING as an enforcement signal. It fails open by design; the real enforcement is at merge time, not session start. - Expecting
--heal/--repoto do anything. Both are documented no-ops/back-compat shims — see steps 4/5 above.
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.

