plan-doctor

plan-doctor is a command for Claude Code from OthmanAdi/planning-with-files. It costs 59 tokens per session (352 once invoked), scanned A, original, MIT.

A diagnostic command that checks whether the planning system can find plans, inject hooks, verify edits, and complete installation checks.

In plain words
What is it for?
It helps diagnose plan resolution, hook injection, file-attestation state, installation surfaces, and hook timing; it does not fix problems automatically.
Why use it?
It makes silent planning failures visible when hooks do not run or a new installation behaves unexpectedly.

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 planning-with-files plugin — 6 skills, 15 commands, 10 hooks shipped together

Good fit It helps diagnose plan resolution, hook injection, file-attestation state, installation surfaces, and hook timing; it does not fix problems automatically.

Compare 6 commands from other repositories ↓
About the project

OthmanAdi/planning-with-files is a planning system that stores an AI coding agent's task plan, findings, and progress in project files so the work can be recovered after context resets, crashes, or compaction. It is for long-running coding tasks across many agent tools, including Claude Code, Codex CLI, and Cursor. The catalogue entries are the project's commands, hooks, skills, plugin, and instruction for maintaining those planning files.

OthmanAdi/planning-with-files · 26,736 stars · on GitHub · skills.sh

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 OthmanAdi/planning-with-files
Claude Code
/plugin install planning-with-files

Made for: Claude Code.

Or install planning-with-files, the plugin that ships this one along with the rest of its 6 skills, 15 commands, 10 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 plan-doctor

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/othmanadi/planning-with-files/plan-doctor"><img src="https://agentmods.dev/badge/commands/othmanadi/planning-with-files/plan-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 352 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.00059 $0.00352
Opus 5 $0.00030 $0.00176
Sonnet 5 $0.00012 $0.00070
Haiku 4.5 $0.00006 $0.00035

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

Security

Grade A, and why

plan-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 9d 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/plan-doctor.md · 21 lines

What it actually says

Run the planning-with-files self-check against the current project directory.

Steps:

  1. Run the doctor script from the project root:
    • Linux/macOS/Git Bash: sh ${CLAUDE_PLUGIN_ROOT}/scripts/plan-doctor.sh
    • Windows without Git Bash on PATH: locate Git Bash via git.exe (its usr\bin\sh.exe sibling) and run the same script with it.
  2. Report the PASS/WARN/FAIL lines to the user verbatim — they are designed to be read as-is.
  3. If any line reports FAIL, explain the matching remediation:
    • resolver FAIL → inspect .planning/.active_plan content and plan dir names.
    • injection FAIL with a resolving plan → the hooks are silently dark; upgrading past v3.6.0 fixes the Windows-native-coreutils realpath cause. Also check PLANNING_DISABLED.
    • tamper WARN → re-approve with /plan-attest if the plan edit was intentional.
  4. Do not attempt automatic fixes; this command is diagnostic only.

Why this exists: the mechanisms this skill relies on (hook injection, plan resolution) exit 0 and stay silent by design when something is off, so a broken install looks identical to "no plan yet". The doctor makes the difference visible in one pass.

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. 9d ago First seen · 21 lines · 59 tokens per session scan A b108ad5ea847

Subscribe to this mod's changes

plan-doctor is a command published in the GitHub repository OthmanAdi/planning-with-files (26,736 stars, last pushed today), licensed MIT. It adds 59 tokens to every session and 352 once invoked, about $0.0003 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-30.