claudemd-doctor

claudemd-doctor is a command for Claude Code from sdsrss/claudemd. It costs 75 tokens per session (708 once invoked), scanned A, original, MIT.

A diagnostic command for checking whether a claudemd installation and its supporting files are healthy.

In plain words
What is it for?
It runs installation health checks and can optionally prune a specified number of backup directories, while reporting maintenance candidates for review.
Why use it?
It helps reveal missing dependencies, configuration or hook drift, backup issues, and problems in the project's memory-maintenance checks.

Command 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 claudemd plugin — 16 commands, 6 hooks shipped together

Good fit It runs installation health checks and can optionally prune a specified number of backup directories, while reporting maintenance candidates for review.

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 sdsrss/claudemd
Claude Code
/plugin install claudemd

Made for: Claude Code.

Or install claudemd, the plugin that ships this one along with the rest of its 16 commands, 6 hooks.

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 claudemd-doctor

README.md
[![agentmods](https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-doctor/github.svg)](https://agentmods.dev/commands/sdsrss/claudemd/claudemd-doctor)
Your own site
<a href="https://agentmods.dev/commands/sdsrss/claudemd/claudemd-doctor"><img src="https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-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 claudemd-doctor

Your own site · 80×15
<a href="https://agentmods.dev/commands/sdsrss/claudemd/claudemd-doctor"><img src="https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 708 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.00075 $0.00708
Opus 5 $0.00037 $0.00354
Sonnet 5 $0.00015 $0.00142
Haiku 4.5 $0.00007 $0.00071

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

Security

Grade A, and why

claudemd-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 4d 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.

commands/claudemd-doctor.md · 17 lines

What it actually says

Usage: /claudemd-doctor or /claudemd-doctor --prune-backups=5

Run: node ${CLAUDE_PLUGIN_ROOT}/scripts/doctor.js $ARGS

Surface the checks list with [✓] / [△] / [✗] prefixes based on the ok field. If pruned is non-empty, list the removed backup directories. If pruneSkippedLegacy is non-empty, say so separately: those are pre-0.68.3 spec-shaped dirs sitting in the personal backup namespace — the prune deliberately neither deleted them nor counted them toward N, and the backup-namespace-legacy check above explains why the user has to sort them by hand. Reporting only pruned hides the half of the story that needs a decision.

For memory-tag-specificity check (added v0.9.35): when ok=false, present the candidate list, group by memory file, and cite spec §11-EXT Tag-specificity (SHOULD, v6.11.11). Suggest the rename pattern shown in the detail (impactimpact-analysis, etc.). Advisory only — operator decides per case.

For memory-index-size (added v0.35.0): each MEMORY.md is judged against the 12KB soft default, or against a budget it declares itself with a whole-line HTML comment — <!-- index-budget: 32KB --> — anywhere outside a code block (added v0.74.2). Declare one when the overage is a decision rather than a backlog: the tags are the routing keys the §11 hint hook matches on, so compressing them buys bytes by spending recall, and feedback_* entries with no recent hits are usually safety rules whose quiet is normal. The declared number is printed in the line it makes green, so raising it stays visible; it is capped at 16× the default, and a malformed declaration (28 with no unit, 28 KB with a space, an unclosed comment) fails the check rather than reverting to the default in silence.

For the three memory-maintenance:* checks (added v0.30.0, plan E2 — wrong-layer memory placement fails silently): promote lists claude-mem-lite lessons cited ≥3× and alive ≥30d (high-frequency recall = de-facto durable knowledge → candidate MEMORY.md entry); recall-repatriation lists durable recall_*.md plugin-absent fallback files older than 30d (migrate into mem-lite or delete); stale lists durable files >90d with zero keyword mentions in the telemetry window (review tags per §11-EXT or retire). All three are candidates only — never migrate/delete automatically; migration is a §5-scoped write and the operator's call. promote degrades gracefully (skipped: …) when the mem-lite DB or node:sqlite is unavailable.

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. 4d ago Changed · +2 lines · +10 tokens per session 7ea3514c467a
  2. 9d ago First seen · 15 lines · 65 tokens per session scan A ea7a06025ee2

Subscribe to this mod's changes

claudemd-doctor is a command published in the GitHub repository sdsrss/claudemd (2 stars, last pushed today), licensed MIT. It adds 75 tokens to every session and 708 once invoked, about $0.0004 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.