doctor

doctor is a skill for Claude Code from lukasrepublic/agentic-foundry. It costs 155 tokens per session (1,433 once invoked), scanned A, original, MIT.

A lightweight health check for the Foundry coding-agent setup. It checks that the plugin manifest, hook configuration, skill instructions, and stack-profile settings are valid.

In plain words
What is it for?
Use it after changing hooks, skill files, or stack settings, before a release, or when the agent environment appears unhealthy.
Why use it?
It provides a quick way to find configuration mistakes before they disrupt a coding session or release process.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the foundry plugin — 81 skills, 8 agents, 8 hooks, 1 MCP server shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add lukasrepublic/agentic-foundry
Claude Code
/plugin install foundry

Made for: Claude Code.

Or install foundry, the plugin that ships this one along with the rest of its 81 skills, 8 agents, 8 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/doctor.svg)](https://agentmods.dev/skills/lukasrepublic/agentic-foundry/doctor)
Your own site
<a href="https://agentmods.dev/skills/lukasrepublic/agentic-foundry/doctor"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 155 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,433 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00155 $0.01433
Opus 5 $0.00077 $0.00717
Sonnet 5 $0.00031 $0.00287
Haiku 4.5 $0.00015 $0.00143

Measured 5d ago against content hash ebf4637b8ba4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

doctor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/doctor/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/foundry:doctor

The Foundry self-diagnostic — a thin, five-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, any skills/*/SKILL.md frontmatter, 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 requires DOCTOR-GREEN — see skills/release/SKILL.md's pre-cut acceptance gate).

Procedure

  1. Run the doctor:

    python3 "${CLAUDE_PLUGIN_ROOT}/scripts/foundry-doctor.py"
    

    The five checks, every run:

    1. manifest.claude-plugin/plugin.json loads as JSON and carries a version.
    2. hookshooks/hooks.json parses as JSON and every referenced hook command script exists on disk.
    3. skills-frontmatter — every shipped skills/*/SKILL.md frontmatter YAML-parses (a colon-in-a-plain-scalar defect class that is cheap to catch here, expensive live).
    4. stack-profile-lock.foundry/stack-profile.lock (if present) resolves against the shipped packs/ tree; absent lock is ok ("not applicable"), not a failure.
    5. operator-registry.claude/foundry-operators.json resolves via foundry_authz.

    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-start cadence.

Read the full file on GitHub · 88 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 88 lines · 155 tokens per session scan A ebf4637b8ba4

Subscribe to this mod's changes

doctor is a skill published in the GitHub repository lukasrepublic/agentic-foundry (1 stars, last pushed yesterday), licensed MIT. It adds 155 tokens to every session and 1,433 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

verifying-external-behavior

Confirms what a third-party library, remote API, build backend, or scraped document actually does before writing code that depends on it — throwaway probes that run in seconds, permissive clients that forward wrong arguments instead of rejecting them, per-endpoint docs that don't generalize, response shapes that make…

AleksandarBisevac/claude-plugins · 138 tokens

codebase-navigator

Deep structural codebase comprehension, AST dependency graph traversal, symbol caller/callee tracing, and monorepo navigation strategies for massive codebases.

saitarrun/Devforge-ai · 33 tokens

root-cause-analysis

Hyper-scale root cause analysis (RCA), bisection, call-tree backtracking, and automated surgical remediation across massive million-file enterprise repositories.

saitarrun/Devforge-ai · 34 tokens

devflow

Full-lifecycle AI development workflow — auto-detects whether you need design, build, or fix mode, then enforces the right pipeline with hard gates at every stage. Fuses grill-with-docs, OpenSpec, and superpowers methodology.

AppleCG/devflow · 53 tokens

performance-optimization

Profile systems, identify bottlenecks, optimize code and infrastructure for speed, throughput, and resource efficiency.

saitarrun/Devforge-ai · 25 tokens

improve

Use after /audit flags problem areas, or directly on a smell/antipattern/family, to apply the smallest corrective refactor and verify it with the project's own detected commands. The FIX action reached from the audit report's Recommended Actions handoff (/fix-risks ). Resolves the selection against the glossary and…

odere-pro/claude-oop-excellence · 108 tokens