doctor

doctor is a command for coding agents from OPTIMETA/PAIDEIA. It costs 63 tokens per session (1,045 once invoked), scanned A, original, MIT.

A diagnostic command for the Paideia installation and course workspace. It checks whether required software, course folders, settings, permissions, and connections to OCR and local AI tools are ready to use.

In plain words
What is it for?
Run it to check Python packages, PDF tools, Tesseract OCR, the Ollama service and Qwen model, course metadata, writable paths, error logs, and statusline configuration.
Why use it?
It shows why a command may fail after installation or cloning and can optionally repair permission-free problems. The checks adjust to the selected OCR engine and the presence of a course workspace.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the paideia plugin — 6 skills, 18 commands 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/optimeta/paideia/doctor
Clone the repo
git clone --depth 1 https://github.com/OPTIMETA/PAIDEIA

Or install paideia, the plugin that ships this one along with the rest of its 6 skills, 18 commands.

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/optimeta/paideia/doctor.svg)](https://agentmods.dev/commands/optimeta/paideia/doctor)
Your own site
<a href="https://agentmods.dev/commands/optimeta/paideia/doctor"><img src="https://agentmods.dev/badge/commands/optimeta/paideia/doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 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,045 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 $0.00063 $0.01045
Opus 5 $0.00032 $0.00522
Sonnet 5 $0.00013 $0.00209
Haiku 4.5 $0.00006 $0.00104

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

plugins/paideia/commands/doctor.md · 47 lines

How it starts

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

Output language

Read INTERFACE_LANG from .course-meta (default en). All user-facing prose must be in that language. Keep in English regardless: file paths, slash command names, OCR engine names (claude, ollama, tesseract), package names, and shell commands the user must copy-paste.

What this does

doctor answers one question: can paideia actually run here? It checks the install (Python deps, poppler, tesseract + kor langdata, Ollama daemon + qwen3-vl:8b) and, when run inside a course folder, the workspace too (the directory skeleton, .course-meta, errors/log.md, writable paths, and the statusline / SessionStart wiring in .claude/settings.json).

It runs in two modes automatically:

  • Course mode.course-meta is present in CWD → full check. OCR-dependency severity is graded against OCR_ENGINE: poppler is required for every engine, but tesseract only blocks ollama/tesseract, and the Ollama daemon/model only block ollama. Python deps are graded the same way — pdf2image/pillow are core (blocking), pytesseract blocks only ollama/tesseract, and reportlab/pypdf/pdfplumber are warn-level (cheatsheet PDF / ad-hoc PDF ops only).
  • Global mode — no .course-meta → system dependencies only, then points the user at /paideia:init-course. This is the "cloned but can't run" first line of defense.

Procedure

Arguments: $ARGUMENTS

  1. Run the diagnostic. Use the script in the plugin (it reads INTERFACE_LANG and OCR_ENGINE from .course-meta on its own):

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

    If the user passed --fix, add it — CLAUDE_PLUGIN_ROOT must be in the environment (it is, inside a slash command) so the wiring repair can resolve absolute script paths:

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

    The script's exit code encodes overall status: 0 = all clear, 1 = usable with warnings, 2 = blocking issues.

  2. Relay the report in $INTERFACE_LANG. The script already prints localized lines with copy-paste fix commands — surface them as-is; do not re-translate the shell commands. Lead with the bottom-line status (✓ all clear / ⚠ warnings / ✗ blocking).

Read the full file on GitHub · 47 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. 4d ago First seen · 47 lines · 63 tokens per session scan A dcb343d221f3

Subscribe to this mod's changes

doctor is a command published in the GitHub repository OPTIMETA/PAIDEIA (91 stars, last pushed 1mo ago), licensed MIT. It adds 63 tokens to every session and 1,045 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.