Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/kimsanguine/hplannpx agentmods add commands/kimsanguine/hplan/harness-doctorWrote 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.
[](https://agentmods.dev/commands/kimsanguine/hplan/harness-doctor)<a href="https://agentmods.dev/commands/kimsanguine/hplan/harness-doctor"><img src="https://agentmods.dev/badge/commands/kimsanguine/hplan/harness-doctor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/kimsanguine/hplan/harness-doctor"><img src="https://agentmods.dev/badge/commands/kimsanguine/hplan/harness-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.01024 |
| Opus 5 | $0.00026 | $0.00512 |
| Sonnet 5 | $0.00010 | $0.00205 |
| Haiku 4.5 | $0.00005 | $0.00102 |
Grade B, and why
harness-doctor 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 10d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat .claude/settings.json 2>/dev/null || cat ~/.claude/settings.json 2>/dev/null How it starts
The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/harness-doctor
Runs 5 deterministic checks and reports [ PASS ], [ WARN ], or [ FAIL ] per item.
Instructions
You are running the hplan installation health check.
Execute all 5 checks in sequence. Do not skip any check. Collect all results, then output the summary block.
Check 1 — Claude Code Hook Registration
cat .claude/settings.json 2>/dev/null || cat ~/.claude/settings.json 2>/dev/null
- PASS: Output contains
gate_guard.pyunderPreToolUsehooks - WARN:
settings.jsonnot found — hook may not be registered - FAIL: File found but
gate_guard.pynot inPreToolUse
Remedy if WARN/FAIL: add the hook path to .claude/settings.json under hooks.PreToolUse.
Check 2 — gate_guard.py Execution
echo '{"tool_input": {"file_path": "docs/PRD.md"}}' \
| python3 hplan/hooks/gate_guard.py
echo "exit=$?"
- PASS:
exit=2— gate_guard blocked the write as expected (no checkpoint present) - WARN:
exit=0— gate_guard ran but did not block (checkpoint may already exist) - FAIL: Any Python error or
hplan/hooks/gate_guard.pynot found
Note: exit=2 is the correct behavior here. The hook is designed to block writes to protected files until harness/build-gate/checkpoint.json shows status: "approved".
Check 3 — Checkpoint State
python3 -c "
import json, pathlib, sys
cp = pathlib.Path('harness/build-gate/checkpoint.json')
if not cp.exists():
print('MISSING')
sys.exit(0)
try:
d = json.loads(cp.read_text())
print(d.get('status', 'NO_STATUS'))
except Exception as e:
print(f'PARSE_ERROR: {e}')
"
- PASS (approved): Project has passed the Build Gate — writes to PRD/spec files are unblocked
- PASS (MISSING): No checkpoint yet — normal for a project that hasn't run
/harness-buildyet - WARN (CONDITIONAL_GO / other status): Gate was run but not fully approved
- FAIL (PARSE_ERROR):
checkpoint.jsonis malformed — delete it and re-run/harness-build
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.
- 10d ago First seen · 127 lines · 51 tokens per session scan B 94459afa7518
harness-doctor is a command published in the GitHub repository kimsanguine/hplan (2 stars, last pushed 24d ago), licensed MIT. It adds 51 tokens to every session and 1,024 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
openehr-explain
One-stop router that explains or looks up any openEHR thing — auto-detects an archetype, a template, an RM/AM/BASE type, an RM structural concept, an ADL idiom, an AQL query or keyword, or a terminology code (replaces /archetype-explain, /template-explain, /type-spec, /rm-structure, /adl-idiom, /terminology).
start-design-plan
Start collaborative design process with brainstorming and planning.
start-implementation-plan
Create implementation plan from design document.
co-change
List files that historically co-change with a target (git log heuristic; COCHANGE-style).
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.