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 agentmods add skills/docxology/template/doctornpx skills add docxology/template --skill doctorgit clone --depth 1 https://github.com/docxology/templateWrote 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/docxology/template/doctor)<a href="https://agentmods.dev/skills/docxology/template/doctor"><img src="https://agentmods.dev/badge/skills/docxology/template/doctor.svg" alt="Measured on agentmods" 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 | $0.00079 | $0.01211 |
| Opus 5 | $0.00039 | $0.00606 |
| Sonnet 5 | $0.00016 | $0.00242 |
| Haiku 4.5 | $0.00008 | $0.00121 |
Grade A, and why
infrastructure-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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Doctor Module
Repository-level "doctor mode": a diagnostic engine plus an automated, audited resolution engine. The doctor never leaves the patient worse off — every mutation is snapshotted before it runs and can be reversed by a single undo command.
Quick start
# Diagnose only (read-only).
uv run python -m infrastructure.doctor
# Same, JSON for an agent.
uv run python -m infrastructure.doctor --json diagnose
# Show what would be fixed (no changes).
uv run python -m infrastructure.doctor fix --plan
# Apply the safest set of fixes.
uv run python -m infrastructure.doctor fix --apply
# Allow `uv sync` and other moderate-therapy fixes.
uv run python -m infrastructure.doctor fix --apply --moderate
# Allow radical fixes (e.g. delete orphan output directories — still backed up).
uv run python -m infrastructure.doctor fix --apply --aggressive
# Reverse the most recent applied, reversible action.
uv run python -m infrastructure.doctor undo --last
# Reverse one specific action (see `history`).
uv run python -m infrastructure.doctor undo --action-id <id>
# Inspect the journal.
uv run python -m infrastructure.doctor history
# Agent-facing capability manifest.
uv run python -m infrastructure.doctor capabilities
# Stable-text robot manual.
uv run python -m infrastructure.doctor robot-docs
Safety contract
Every fix flows through infrastructure.doctor.safety.mutate(plan, state). That function is the only code in this module that writes to the filesystem on behalf of a fixer. It guarantees:
- Paths in
plan.affected_pathsare resolved and confirmed to be inside the repo and outside.doctor/. - Every existing path is copied byte-for-byte into
.doctor/backups/<action_id>/and its SHA-256 is recorded. - The registered handler for
plan.action_kindruns (delete_paths,chmod,write_file,run_uv_sync). - Post-mutation hashes are taken; the result is appended to
.doctor/actions.jsonlas a single JSON line. - If the handler raises, the journal still records the attempt with
applied=falseanderrorpopulated — audit is never silently lost.
What ships with it
18 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.
- __init__.py 3.0 KB runs code
- __main__.py 178 B runs code
- AGENTS.md 5.5 KB
- cli.py 13 KB runs code
- detectors/__init__.py 185 B runs code
- detectors/AGENTS.md 546 B
- detectors/hygiene.py 6.8 KB runs code
- detectors/layout.py 8.3 KB runs code
- detectors/README.md 719 B
- detectors/registry.py 2.7 KB runs code
- detectors/state.py 11 KB runs code
- detectors/tooling.py 3.7 KB runs code
- fixers.py 11 KB runs code
- models.py 8.1 KB runs code
- README.md 6.1 KB
- reporter.py 5.0 KB runs code
- safety.py 20 KB runs code
- scorecard.py 4.0 KB runs code
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.
- 5d ago First seen · 118 lines · 79 tokens per session scan A 9bdf79083ae2
infrastructure-doctor is a skill published in the GitHub repository docxology/template (19 stars, last pushed today), licensed Apache-2.0. It adds 79 tokens to every session and 1,211 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-30.
Other skills, from other repositories
planning-with-files
Persistent file-based planning for multi-step AI-agent work. Keeps taskplan.md, findings.md, and progress.md on disk; lifecycle hooks inject selected project planning context. Automatic recovery reads project planning files only. Explicit session-catchup.py --metadata reads same-project local agent session records and…
aviation-inspector
Use when a task needs the judgment of an Aviation Inspector — determining whether an air carrier's fleet is in compliance with an Airworthiness Directive across a maintenance-records sample, deciding where the FAA's compliance-and-enforcement ladder places a finding (compliance action vs. Letter of Correction vs.…
aerospace-engineering-technician
Use when a task needs the judgment of an Aerospace Engineering and Operations Technologist/Technician — verifying an installed fastener's preload against a drawing's torque callout via the T=K·D·F relationship, reducing strain-gauge data from a structural proof-load test into stress and checking it against an…
agricultural-sciences-professor
Use when a task needs the judgment of a tenure-track or tenured Agricultural Sciences faculty member at a land-grant university — deciding whether to submit a grant this cycle versus wait, allocating time across the teaching/research/extension appointment split, diagnosing a stalled graduate student or field trial, or…
aircraft-mechanic
Use when a task needs the judgment of a certificated aircraft mechanic — triaging a maintenance discrepancy, deciding whether an item can be MEL-deferred or grounds the aircraft, working out an Airworthiness Directive's compliance deadline, reviewing a torque/safety-wire job before sign-off, or writing a…
animal-breeder
Use when a task needs the judgment of a livestock geneticist/animal breeder — selecting a sire against EPDs or genomic data, screening a proposed mating for inbreeding risk, deciding AI versus natural service, timing an estrus-synchronization protocol, or defending a breeding-goal tradeoff to a herd owner.