doctor

doctor is a command for Claude Code from px0-ai/px0. It costs 0 tokens per session (615 once invoked), scanned A, original, MIT.

A diagnostic command that checks whether an application is configured correctly and reports exact fixes for problems it finds.

In plain words
What is it for?
Use it after setup or updates, in scripts, or in hooks; JSON output is available for tools that need to process the results.
Why use it?
It replaces vague setup errors with specific checks and repair commands, including issues with credentials, versions, locks, schemas, and connections.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

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/px0-ai/px0/doctor
Clone the repo
git clone --depth 1 https://github.com/px0-ai/px0

Made for: Claude Code.

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/px0-ai/px0/doctor.svg)](https://agentmods.dev/commands/px0-ai/px0/doctor)
Your own site
<a href="https://agentmods.dev/commands/px0-ai/px0/doctor"><img src="https://agentmods.dev/badge/commands/px0-ai/px0/doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 615 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.1 $0.00000 $0.00615
Opus 5 $0.00000 $0.00308
Sonnet 5 $0.00000 $0.00123
Haiku 4.5 $0.00000 $0.00061

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

docs/commands/doctor.md · 74 lines

How it starts

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

px0 doctor

Check that everything is wired up, and for anything that is not, print the exact command that fixes it. A red line you cannot act on is the whole complaint doctor exists to answer.

Implemented by px0/doctor.py.

px0 doctor [--quick] [--json]

Options

--quick

Skip the checks that need a live subprocess or a filesystem walk.

  • Input: flag, no value. Default off.
  • Use it in a hook or a prompt where the full pass would be too slow. This is the mode px0 update runs to confirm an upgrade.

--json

Print the results as JSON, and nothing else.

  • Input: flag, no value. Default off.
  • Each check carries ok, detail, and — when it failed — fix.
px0 doctor
px0 doctor --quick
px0 doctor --json | jq -r '.checks | to_entries[] | select(.value.ok == false) | .key'

The checks

Check What it confirms
credentials .state/credentials.toml is mode 0600 — names the chmod and the path if not
versions The version manifest opens and is consistent
locks No stale process lock is left behind
schema The store's schema version matches this binary's
connections How many connector connections are configured
workflows Every workflow file parses
unreferenced_guidelines Guideline files no workflow inlines
guideline_descriptions Guideline files with no description in their frontmatter, which a build cannot match a new workflow against
update Whether a newer px0 is available
daemon Whether the daemon is running
harness The configured coding agent is on PATH and responds
index qmd's version against the pinned one, and whether its local models have been consented to
private_folder How much the private folder is holding back from retrieval

private_folder is reported even when healthy, because the exclusion is invisible in normal use: a brain pointed at a vault with its own work/ folder can have all of it quietly missing from every search. See px0 brain.

Read the full file on GitHub · 74 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. 6d ago First seen · 74 lines · 0 tokens per session scan A 8ae413028b59

Subscribe to this mod's changes

doctor is a command published in the GitHub repository px0-ai/px0 (249 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 615 tokens. 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.