doctor

doctor is a command for coding agents from akholod/consensus-review. It costs 29 tokens per session (659 once invoked), scanned A, original, MIT.

A diagnostic command for checking whether a consensus code-review setup is working. It checks the reviewers, code graph, contracts, and live tests, then explains how failures could weaken a review.

In plain words
What is it for?
Use it before a review to test the setup, find configuration or connection problems, and understand what each failed check means for the result.
Why use it?
A review can continue with missing components and still look complete, even though it may be less thorough. This command makes those hidden weaknesses visible.

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 consensus-review plugin — 8 commands, 5 agents 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/akholod/consensus-review/doctor
Clone the repo
git clone --depth 1 https://github.com/akholod/consensus-review

Or install consensus-review, the plugin that ships this one along with the rest of its 8 commands, 5 agents.

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/akholod/consensus-review/doctor.svg)](https://agentmods.dev/commands/akholod/consensus-review/doctor)
Your own site
<a href="https://agentmods.dev/commands/akholod/consensus-review/doctor"><img src="https://agentmods.dev/badge/commands/akholod/consensus-review/doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 659 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.00029 $0.00659
Opus 5 $0.00015 $0.00329
Sonnet 5 $0.00006 $0.00132
Haiku 4.5 $0.00003 $0.00066

Measured 4d ago against content hash cb009f6717f9, 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.

commands/doctor.md · 49 lines

How it starts

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

Run the diagnostic and present its output.

node "${CLAUDE_PLUGIN_ROOT}/scripts/doctor.mjs" [--offline] [--repo <path>] [--json]

Flags map straight through: offline--offline, repo=<path>--repo <path>, json--json. As everywhere in this plugin, a leading -- is also accepted.

What it is for

This review degrades silently, on purpose. An unavailable consultant marks its lane unavailable and the run continues. If every consultant fails, the floor case builds the report from the Claude lane alone and does not abort. gh missing falls back to fetching the diff by URL. Each of those is right at run time — a partial review beats none — but together they mean a misconfigured setup yields a report that looks complete and is quietly weaker.

So every check here reports what a non-PASS state does to a review, not just that something is off. That consequence line is the point of the command.

It checks function, not presence

codex --version succeeds with expired auth and with a schema codex would reject — the exact failure §6 of /consensus-review calls "a config bug to fix, not a clean review". So the live probe actually runs codex exec read-only against this plugin's real findings schema, with stdin closed, exactly as a review does. Likewise the claude probe sends the production discovery prompt and validates the envelope the adapter parses.

Live probes run by default and cost real calls (roughly a minute, two small model calls). Pass offline to skip them — the rest is instant and free, but stale auth cannot be detected without them, and the summary says so.

Sections

Section Catches
plugin version skew against the latest release; Node below the required 20
consultants codex missing (every review becomes single-source), pi, gh present and authenticated
code graph codegraph CLI, a graph in the repo, and whether that graph is older than the last commit — agents are told "absent/stale → grep" but cannot detect staleness from inside a review
contracts the five agents resolve and keep their read-only guarantee; generated prompt blocks match the canonical schema; which model each dimension runs on
workspace a git work tree with commits; .reviews/ writable and ignored — an unignored report becomes an untracked change the next review picks up
live the claude -p envelope, and codex accepting our schema

Read the full file on GitHub · 49 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 · 49 lines · 29 tokens per session scan A cb009f6717f9

Subscribe to this mod's changes

doctor is a command published in the GitHub repository akholod/consensus-review (3 stars, last pushed 15d ago), licensed MIT. It adds 29 tokens to every session and 659 once invoked, about $0.0001 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.