doctor

doctor is a command for Claude Code from MadAppGang/magus. It costs 32 tokens per session (1,344 once invoked), scanned A, original, MIT.

A command that runs three health checks for a madbench plugin: whether its instructions match the installed madbench version, whether bench files are laid out correctly, and whether the generated index is valid. Madbench is a tool for evaluating AI-agent behavior.

In plain words
What is it for?
Use it to check madbench plugin staleness, validate a project's bench layout, and inspect the generated bench index.
Why use it?
It makes plugin and bench problems visible without relying on an agent to summarize the checks. The raw output preserves the exact results for inspection.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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 madbench plugin — 3 skills, 1 command, 1 agent shipped together

Good fit Use it to check madbench plugin staleness, validate a project's bench layout, and inspect the generated bench index.

Compare 6 commands from other repositories ↓
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 MadAppGang/magus
Claude Code
/plugin install madbench

Made for: Claude Code.

Or install madbench, the plugin that ships this one along with the rest of its 3 skills, 1 command, 1 agent.

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/commands/madappgang/magus/doctor/github.svg)](https://agentmods.dev/commands/madappgang/magus/doctor)
Your own site
<a href="https://agentmods.dev/commands/madappgang/magus/doctor"><img src="https://agentmods.dev/badge/commands/madappgang/magus/doctor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doctor

Your own site · 80×15
<a href="https://agentmods.dev/commands/madappgang/magus/doctor"><img src="https://agentmods.dev/badge/commands/madappgang/magus/doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00032 $0.01344
Opus 5.5 $0.00013 $0.00538
Sonnet 5.5 $0.00006 $0.00269
Haiku 4.5 $0.00003 $0.00134

Measured 10d ago against content hash d9f74f0d6725, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 10d 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.

plugins/madbench/commands/doctor.md · 110 lines

How it starts

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

madbench doctor

Three checks, three commands, output printed as it came. No agent is dispatched, because this command's whole value is being a mechanical answer a human can trust. An agent summarising a gate is a gate you cannot cite.

Run all three

Run each from the project root, one command per call, and paste its complete stdout and stderr into the reply. Do not trim, do not paraphrase, do not stop at the first failure — a reader wants all three verdicts side by side.

1. Skills — do the plugin's skills match the installed madbench?

if command -v madbench >/dev/null; then madbench skills --check --plain --dir "${CLAUDE_PLUGIN_ROOT}/skills"; else echo "skipped — madbench is not on PATH, so there is no release to compare the skills with"; fi

madbench's own compare: its first line is skills <W> · madbench <I> · <verdict>, and the verdict is current, stale, pinned, disagree or unmeasured. Its exit codes are madbench's, not this command's — see the table below. Whether the skills' example benches load is madbench's own release test, so it is not repeated here.

2. Layout — does the bench tree follow the standard?

if [ -n "$(find . -maxdepth 3 \( -name madbench.yaml -o -name '*.madbench.yaml' -o -name '*.experiment.yaml' \) -not -path '*/node_modules/*' -print -quit)" ]; then bun "${CLAUDE_PLUGIN_ROOT}/scripts/check-bench-layout.ts"; else echo "skipped — this project has no bench file yet, so there is no layout to check"; fi

One bench root; every bench directory carries a Bench or Experiment file and a README.md with the required frontmatter; no loose TypeScript at a bench root; no alias key in any bench file.

The probe is the point here too. A project that has not written a bench yet has no layout to hold, and the checker would honestly report exit 2, could not measure. That is not a state the reader can act on, so the probe skips and says so. Once one bench file exists, the checker runs, and a missing bench root is then a real red: it means a bench file sits somewhere the standard does not allow.

Read the full file on GitHub · 110 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. 10d ago Changed · +2 lines · -3 tokens per session d9f74f0d6725
  2. 1mo ago First seen · 108 lines · 35 tokens per session scan A baf534f4c367

Subscribe to this mod's changes

doctor is a command published in the GitHub repository MadAppGang/magus (13 stars, last pushed today), licensed MIT. It adds 32 tokens to every session and 1,344 once invoked, about $0.0001 per session on Opus 5.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-09-12.