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.
npx skills add Mark-Life/agent-skills --skill harness-doctorgit clone --depth 1 https://github.com/Mark-Life/agent-skillsWrote 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/skills/mark-life/agent-skills/harness-doctor)<a href="https://agentmods.dev/skills/mark-life/agent-skills/harness-doctor"><img src="https://agentmods.dev/badge/skills/mark-life/agent-skills/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/skills/mark-life/agent-skills/harness-doctor"><img src="https://agentmods.dev/badge/skills/mark-life/agent-skills/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.00085 | $0.02490 |
| Opus 5 | $0.00043 | $0.01245 |
| Sonnet 5 | $0.00017 | $0.00498 |
| Haiku 4.5 | $0.00009 | $0.00249 |
Grade A, and why
harness-doctor scanned grade A 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 11d 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 directorieslowAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
As the last step of every run, after the fix list, read `~/.claude/settings.json` and report the retention window: Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Harness Doctor
Harness Doctor is the fleet view over the agent's own history. It mines the last $days of agent transcripts across every project on this machine and answers one question — where did the wall-clock, the tokens, and the repeated corrections go, and what change stops the bleeding. It reads the whole session tree, workflow and subagent transcripts included, and turns it into five fact tables plus a ranked fix list. The waste is invisible from inside any single session: a command that costs 9 seconds is nothing until you see it ran 1,400 times.
This is a user-invoked command (/harness-doctor); the window in days arrives as $days. When it is empty, use 30 — the templates below already do.
How to run
The auditor is zero-dependency with no build step, shipped twice: scripts/audit.ts and scripts/audit.py. They take the same flags and write the same tables — pick whichever runtime exists. Detect with command -v node bun python3 on macOS/Linux, or where node bun python on Windows, then run from the skill's scripts/ dir:
node audit.ts --days "${days:-30}" # Node >= 22.18 (native TS type-stripping)
bun run audit.ts --days "${days:-30}" # Bun
npx tsx audit.ts --days "${days:-30}" # older Node, no install needed
python3 audit.py --days "${days:-30}" # no JS runtime at all
The summary goes to stdout; progress goes to stderr, so node audit.ts --format json > facts.json stays clean. In md mode the last stdout line is the work dir holding the fact tables — --no-tables writes none and prints none.
Three more flags carry the work: --project <substr> narrows to project dirs matching the substring (repeatable); --top <n> sets rows per ranking (default 15), but --format md clamps every table to 25 rows whatever --top says, so ask for a deeper table with --format json; --format json emits the machine shape documented in reference/stats.md. The rarer ones — --out, --root, --no-tables, --no-redact, --pricing — are in the CLI table in reference/stats.md. --no-redact writes prompts and command output verbatim, secrets included: pass it only when the user asks for it by name.
What ships with it
32 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- reference/angles.md 12 KB
- reference/retention.md 4.5 KB
- reference/stats.md 14 KB
- scripts/audit.py 4.8 KB runs code
- scripts/audit.ts 5.6 KB runs code
- scripts/lib/__init__.py 274 B runs code
- scripts/lib/aggregate_commands.py 11 KB runs code
- scripts/lib/aggregate_human.py 9.6 KB runs code
- scripts/lib/aggregate_projects.py 3.2 KB runs code
- scripts/lib/aggregate-commands.ts 13 KB runs code
- scripts/lib/aggregate-human.ts 10 KB runs code
- scripts/lib/aggregate-projects.ts 3.9 KB runs code
- scripts/lib/aggregate.py 15 KB runs code
- scripts/lib/aggregate.ts 15 KB runs code
- scripts/lib/cost.py 4.2 KB runs code
- scripts/lib/cost.ts 5.5 KB runs code
- scripts/lib/format.ts 2.2 KB runs code
- scripts/lib/normalize.py 13 KB runs code
- scripts/lib/normalize.ts 11 KB runs code
- scripts/lib/redact.py 6.4 KB runs code
- scripts/lib/redact.ts 7.2 KB runs code
- scripts/lib/render.py 16 KB runs code
- scripts/lib/render.ts 15 KB runs code
- scripts/lib/scan.py 17 KB runs code
- scripts/lib/scan.ts 17 KB runs code
- scripts/lib/stats.py 4.3 KB runs code
- scripts/lib/stats.ts 5.0 KB runs code
- scripts/lib/types.py 1.9 KB runs code
- scripts/lib/types.ts 15 KB runs code
- scripts/node.shims.d.ts 1.9 KB runs code
- scripts/package.json 166 B
- scripts/tsconfig.json 300 B
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.
- 11d ago First seen · 107 lines · 85 tokens per session scan A 31e2946e727b
harness-doctor is a skill published in the GitHub repository Mark-Life/agent-skills (2 stars, last pushed 26d ago), licensed MIT. It adds 85 tokens to every session and 2,490 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A 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 skills, from other repositories
ralplan
Consensus planning entrypoint that auto-gates vague ralph/autopilot/team requests before execution.
remember
Review reusable project knowledge and decide what belongs in project memory, notepad, or durable docs.
embedding-strategies
Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.
docx-comment-reply
Reply to comments (批注) in Word .docx/.doc files: extract comment context, draft replies, write threaded replies back, and validate OOXML.
explaining-machine-learning-models
Explain trained machine learning models through feature attribution, local explanations, and behavior summaries. Use as an explicit/manual helper once a model already exists, not for training ownership, leakage auditing, or general ML strategy selection.
moai-ref-ui-polish
UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…