doctor

doctor is a command for Codex from OthmanAdi/MDDesign. It costs 47 tokens per session (790 once invoked), scanned B, original, Apache-2.0.

A diagnostic command for MDDesign, a tool that checks whether a development setup is ready to use. It tests required programs, project checks, installed skills, hooks, and temporary-file writing.

In plain words
What is it for?
Checking a new installation, troubleshooting broken MDDesign workflows, and confirming the setup before publishing or reporting an issue.
Why use it?
It helps locate setup problems and prints a suggested fix for each failed check. This avoids investigating each dependency manually.

Command for Codex

Part of the mddesign plugin — 5 skills, 10 commands, 5 agents, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/othmanadi/mddesign/doctor
Clone the repo
git clone --depth 1 https://github.com/OthmanAdi/MDDesign

Made for: Codex.

Or install mddesign, the plugin that ships this one along with the rest of its 5 skills, 10 commands, 5 agents, 4 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 doctor

README.md
[![agentmods](https://agentmods.dev/badge/commands/othmanadi/mddesign/doctor.svg)](https://agentmods.dev/commands/othmanadi/mddesign/doctor)
Your own site
<a href="https://agentmods.dev/commands/othmanadi/mddesign/doctor"><img src="https://agentmods.dev/badge/commands/othmanadi/mddesign/doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 790 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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 $0.00047 $0.00790
Opus 5 $0.00023 $0.00395
Sonnet 5 $0.00009 $0.00158
Haiku 4.5 $0.00005 $0.00079

Measured 3d ago against content hash 235b07d34207, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

doctor scanned grade B with 1 finding 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 3d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Read `~/.claude/settings.json`.
.codex/commands/doctor.md · 81 lines

How it starts

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

/mddesign:doctor

Diagnostic mode. Goes deeper than /mddesign:compose. Use when something is not working, or before reporting a bug.

What I run

Six probes. Each prints OK or FAIL: <one-line cause> → <fix>.

Probe 1: Toolchain

  • node --version (need v18+)
  • npx --version
  • bash --version
  • On Windows: powershell.exe -Command '$PSVersionTable.PSVersion'

Fail mode: print install link for Node + note that Git Bash ships with Git for Windows.

Probe 2: @google/design.md linter exec

  • Create a temp dir with a known-valid DESIGN.md (same minimal sample as /mddesign:setup).
  • Run npx --yes @google/design.md lint DESIGN.md.
  • Verify exit code is 0.

Fail mode: print the actual stderr. Most common cause is an offline/proxy block on npm registry.

Probe 3: Required skills present

  • planning-with-files SKILL.md present in any of: ~/.claude/skills/, ~/.agents/skills/, ~/.claude/plugins/cache/.
  • code-memory-router SKILL.md (optional but warn if missing).

Fail mode: redirect to /mddesign:setup.

Probe 4: Hooks registered

  • Read ~/.claude/settings.json.
  • Verify enabledPlugins contains an mddesign@*: true entry, OR
  • Verify the user has manually enabled the plugin via /plugin install.

Fail mode: print the exact enabledPlugins snippet to add.

Probe 5: Scratch tier writable

  • mkdir -p .agents/memory/scratch && touch .agents/memory/scratch/.probe && rm .agents/memory/scratch/.probe.

Fail mode: usually a permissions issue in the project dir. Print chmod-style fix on Unix, or tell user to check the project folder is not read-only on Windows.

Probe 6: Hook scripts executable + responding

  • Locate plugin install path: ls $HOME/.claude/plugins/cache/*/mddesign/*/hooks/session-start/ (best-effort).
  • Run preamble.sh or preamble.ps1 in dry mode and capture stdout.
  • Verify it printed the [MDDesign] active. banner.

Fail mode: print the path it tried, the actual stdout, and whether the file exists.

Output format

Read the full file on GitHub · 81 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. 3d ago First seen · 81 lines · 47 tokens per session scan B 235b07d34207

Subscribe to this mod's changes

doctor is a command published in the GitHub repository OthmanAdi/MDDesign (13 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 47 tokens to every session and 790 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.