doctor

doctor is a command for Claude Code from Jose-Ribeir/claude-code-review-gate. It costs 72 tokens per session (1,818 once invoked), scanned A, original, Apache-2.0.

A read-only diagnostic command for a Git push review gate. A push review gate is a check that reviews changes before Git sends them to a remote repository.

In plain words
What is it for?
Use it to check the Claude reviewer, Python, Git, hook setup, active adapters, and version mismatches, then report what needs attention.
Why use it?
The gate can silently stop working if required programs, hooks, or versions are missing, allowing pushes to proceed without review.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

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 review-gate plugin — 1 skill, 1 command, 2 agents, 3 hooks shipped together

Good fit Use it to check the Claude reviewer, Python, Git, hook setup, active adapters, and version mismatches, then report what needs attention.

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 Jose-Ribeir/claude-code-review-gate
Claude Code
/plugin install review-gate

Made for: Claude Code.

Or install review-gate, the plugin that ships this one along with the rest of its 1 skill, 1 command, 2 agents, 3 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/jose-ribeir/claude-code-review-gate/doctor.svg)](https://agentmods.dev/commands/jose-ribeir/claude-code-review-gate/doctor)
Your own site
<a href="https://agentmods.dev/commands/jose-ribeir/claude-code-review-gate/doctor"><img src="https://agentmods.dev/badge/commands/jose-ribeir/claude-code-review-gate/doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 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,818 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.00072 $0.01818
Opus 5 $0.00036 $0.00909
Sonnet 5 $0.00014 $0.00364
Haiku 4.5 $0.00007 $0.00182

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

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 · 133 lines

How it starts

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

review-gate — doctor

Diagnose whether the push gate can actually run on this machine, and report it plainly. Read only — never install, modify, or repair anything. Say what is wrong and what the user should run; let them decide.

This exists because of one hard constraint: a hook that fails to launch, times out, or dies abnormally is treated by Claude Code as non-blocking. If the gate cannot start, pushes are simply not reviewed, and nothing announces it. That failure is undetectable from inside the hook, so it has to be checkable on demand. That is this command.

What to check

Run these and collect the results. Prefer one Bash call per group; keep going if a command fails — a failure is a result.

1. Prerequisites

  • claude --version — the reviewer shells out to this. Missing ⇒ the gate fails open by design (there is no gate without the tool).
  • A working Python 3: try python3 -c "import sys; print(sys.version)", then python, then py. Ignore any interpreter whose path contains WindowsApps — those are Store alias stubs that resolve but cannot execute. Missing ⇒ the gate now fails closed (blocks pushes) as of 0.3.0.
  • git --version.
  • On Windows only: is Git Bash present? Check bash --version, and note the path — a bash.exe under System32 is WSL, not Git Bash. Also look for bin\bash.exe or usr\bin\bash.exe next to git.exe's install root, since Git for Windows' "command line only" option keeps bash off PATH while Claude Code can still use it.

2. Plugin wiring (the default adapter)

  • Read ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json and report version.
  • Read ${CLAUDE_PLUGIN_ROOT}/hooks/hooks.json. Confirm there is a PreToolUse entry matching Bash (it carries if: "Bash(git *)", which is best-effort only — the adapters re-check the command themselves, so treat a missing or different if as cosmetic, not a fault), and report each entry's timeout.
  • Confirm there is also a PostToolUse entry matching Bash. This is the adapter that puts non-blocking findings into the session's context after a push; without it, a warn verdict is recorded but never surfaced to the model. It deliberately has no if clause and a short timeout (30s) — it only reads a file. Flag a large timeout here as wrong, not as safe.
  • List pending-* in the plugin data dir ($CLAUDE_PLUGIN_DATA, else ~/.claude/plugins/data/review-gate-local). These are reviews recorded but not yet reported — the mechanism that lets findings survive a push that failed. A handful is normal and they expire after an hour. Many, all stale, means delivery is not running: check the PostToolUse entry above.
  • Check all four adapter scripts exist and are readable: ${CLAUDE_PLUGIN_ROOT}/scripts/gate-hook.sh, gate-hook.ps1, post-hook.sh, and post-hook.ps1.
  • Confirm each hook timeout is greater than OCR_TIMEOUT (default 1800). If not, say so loudly: Claude Code kills the hook at its own deadline regardless, and a killed hook is non-blocking — i.e. a silent fail-open.

Read the full file on GitHub · 133 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 Changed · +28 lines cf64c99945df
  2. 8d ago First seen · 105 lines · 72 tokens per session scan A 67e3075f0524

Subscribe to this mod's changes

doctor is a command published in the GitHub repository Jose-Ribeir/claude-code-review-gate (3 stars, last pushed 5d ago), licensed Apache-2.0. It adds 72 tokens to every session and 1,818 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.