doctor-dev

doctor-dev is a command for coding agents from punt-labs/z-spec. It costs 5 tokens per session (1,021 once invoked), scanned B, original, MIT.

A diagnostic command for checking whether the Z formal-specification toolchain is available and healthy. It checks required programs, supporting files, and the current platform.

In plain words
What is it for?
Use it to inspect the availability of fuzz, probcli, and fuzz.sty, and to get development-environment setup suggestions when required components are absent.
Why use it?
It quickly shows which parts of the setup are missing or unusable, so you know what to install or repair before working on specifications.

Command

Part of the z-spec-dev plugin — 42 commands, 1 hook 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/punt-labs/z-spec/doctor-dev
Clone the repo
git clone --depth 1 https://github.com/punt-labs/z-spec

Or install z-spec-dev, the plugin that ships this one along with the rest of its 42 commands, 1 hook.

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-dev

README.md
[![agentmods](https://agentmods.dev/badge/commands/punt-labs/z-spec/doctor-dev.svg)](https://agentmods.dev/commands/punt-labs/z-spec/doctor-dev)
Your own site
<a href="https://agentmods.dev/commands/punt-labs/z-spec/doctor-dev"><img src="https://agentmods.dev/badge/commands/punt-labs/z-spec/doctor-dev.svg" alt="Measured on agentmods" height="20"></a>
Per session 5 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,021 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.00005 $0.01021
Opus 5 $0.00003 $0.00511
Sonnet 5 $0.00001 $0.00204
Haiku 4.5 $0.00001 $0.00102

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

Security

Grade B, and why

doctor-dev 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 5d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

— no `sudo texhash` step is needed or effective, since `TEXMFHOME` is not
plugin/commands/doctor-dev.md · 120 lines

How it starts

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

Z Environment Health Check

Run diagnostic checks on the Z specification toolchain and report results in a status table.

Checks

Run all checks, collecting results before producing output. Run independent checks in parallel where possible.

1. Platform (informational)

uname -s   # Darwin or Linux
uname -m   # arm64, x86_64, etc.

2. Required toolchain (fuzz, probcli, plugin version)

Call mcp__plugin_z-spec-dev_zspec__doctor. It returns {version, fuzz, probcli, healthy} — the plugin version string, the resolved fuzz and probcli binary paths (or null when absent), and an overall healthy flag for the required pair.

Report fuzz and probcli as presence, not version: installed (<path>) when the path field is set, not found when it is null. Do not report fuzz or probcli binary version strings — the tool does not provide them. (Binary versions return once DoctorReport is widened; that work is beaded.)

  • fuzz null: suggest Run /z-spec-dev:setup-dev fuzz.
  • probcli null: suggest Run /z-spec-dev:setup-dev probcli.

probcli handles both Z specifications (.tex) and B machines (.mch, .ref, .imp).

3. fuzz.sty (required)

kpsewhich fuzz.sty

If missing: suggest Run /z-spec-dev:setup-dev fuzz. That installs fuzz.sty into TEXMFHOME and refreshes that tree's filename database itself, unprivileged — no sudo texhash step is needed or effective, since TEXMFHOME is not the system tree texhash rebuilds.

4. Tcl/Tk (conditional — macOS only)

Only check on Darwin. Present if EITHER Homebrew has tcl-tk OR wish is on PATH (catches installs outside Homebrew). The probe always prints one line, so the status table populates even when brew is absent:

brew list tcl-tk >/dev/null 2>&1 || command -v wish >/dev/null 2>&1 && echo "Tcl/Tk: installed" || echo "Tcl/Tk: not found"

If it prints not found on macOS: suggest brew install tcl-tk.

5. elan (optional — for /z-spec-dev:prove-dev)

Read the full file on GitHub · 120 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. 5d ago First seen · 120 lines · 5 tokens per session scan B f1a4a20c7ca3

Subscribe to this mod's changes

doctor-dev is a command published in the GitHub repository punt-labs/z-spec (5 stars, last pushed yesterday), licensed MIT. It adds 5 tokens to every session and 1,021 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.