infrastructure-doctor

infrastructure-doctor is a skill for Claude Code, Codex from docxology/template. It costs 79 tokens per session (1,211 once invoked), scanned A, original, Apache-2.0.

A repository health checker that diagnoses infrastructure problems and can apply audited repairs. It saves backups before changes and provides an undo command for reversible repairs.

In plain words
What is it for?
Use it to diagnose a repository, preview possible fixes, apply safe or more extensive repairs, undo the latest repair, or inspect repair history.
Why use it?
It helps identify why a local project or fresh checkout is not working while keeping a record of changes and a way to reverse them.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to diagnose a repository, preview possible fixes, apply safe or more extensive repairs, undo the latest repair, or inspect repair history.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/docxology/template/doctor
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.

Any agent
npx skills add docxology/template --skill doctor
Clone the repo
git clone --depth 1 https://github.com/docxology/template

Made for: Claude Code, Codex.

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 infrastructure-doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/docxology/template/doctor/github.svg)](https://agentmods.dev/skills/docxology/template/doctor)
Your own site
<a href="https://agentmods.dev/skills/docxology/template/doctor"><img src="https://agentmods.dev/badge/skills/docxology/template/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.

agentmods 80×15 button for infrastructure-doctor

Your own site · 80×15
<a href="https://agentmods.dev/skills/docxology/template/doctor"><img src="https://agentmods.dev/badge/skills/docxology/template/doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,211 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00079 $0.01211
Opus 5.5 $0.00032 $0.00484
Sonnet 5.5 $0.00016 $0.00242
Haiku 4.5 $0.00008 $0.00121

Measured 11d ago against content hash 6c6c0af9f9dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 11d ago.

The scan reads SKILL.md. This mod also ships 14 executable files (__init__.py, __main__.py, cli.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

infrastructure/doctor/SKILL.md · 118 lines

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:

  1. Paths in plan.affected_paths are resolved and confirmed to be inside the repo and outside .doctor/.
  2. Every existing path is copied byte-for-byte into .doctor/backups/<action_id>/ and its SHA-256 is recorded.
  3. The registered handler for plan.action_kind runs (delete_paths, chmod, write_file, run_uv_sync).
  4. Post-mutation hashes are taken; the result is appended to .doctor/actions.jsonl as a single JSON line.
  5. If the handler raises, the journal still records the attempt with applied=false and error populated — audit is never silently lost.

Read the full file on GitHub · 118 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. 11d ago Changed 6c6c0af9f9dc
  2. 1mo ago First seen · 118 lines · 79 tokens per session scan A 9bdf79083ae2

Subscribe to this mod's changes

infrastructure-doctor is a skill published in the GitHub repository docxology/template (20 stars, last pushed yesterday), licensed Apache-2.0. It adds 79 tokens to every session and 1,211 once invoked, about $0.0003 per session on Opus 5.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.

Related

Other skills, from other repositories

browser-trace

Capture a full DevTools-protocol trace of any browser automation — CDP firehose, screenshots, and DOM dumps — then bisect the stream into per-page searchable buckets. Use when the user wants to debug a failed run, audit network/console/DOM activity, attach a trace to an in-progress session, or feed structured per-page…

mxyhi/ok-skills · 88 tokens

orca-replay

Answer questions about an earlier agent run from its recording rather than from memory, and replay or fork that run. Use when the user asks why a previous run did something, which step changed a file or broke the build, whether yesterday's failure still reproduces, or whether a different model would have got it right.

mxyhi/ok-skills · 67 tokens

auto-service-technician

Use when a task needs senior auto-service-technician judgment — diagnosing a check-engine-light or drivability complaint from DTCs and live data, deciding whether a code-named part actually needs replacing or the fault lies upstream, scoping a flat-rate repair order and labor time, choosing warranty vs. customer-pay…

wonsukchoi/domain-experts · 81 tokens

commercial-industrial-electronics-repairer

Use when a task needs the judgment of a Commercial and Industrial Electronics Repairer — diagnosing a VFD fault trip on a production line, tracing a PLC I/O fault back to the sensor, the wiring, or the ladder logic, selecting arc-flash PPE for live-panel diagnostic work, triaging multiple simultaneous down-lines by…

wonsukchoi/domain-experts · 89 tokens

computer-user-support-specialist

Use when a task needs the judgment of a Computer User Support Specialist — triaging an inbound ticket's severity and SLA clock before troubleshooting it, verifying a caller's identity before any password/MFA/account-state change, walking a live incident through a structured troubleshooting sequence instead of guessing…

wonsukchoi/domain-experts · 102 tokens

control-valve-installer-repairer

Use when a task needs the judgment of a Control and Valve Installer/Repairer — sizing a control valve's Cv against actual process flow, diagnosing a limit-cycling control loop as valve stiction versus a bad PID tune, running an FCI 70-2 seat-leakage or API 598 pressure test, calibrating a positioner/actuator after a…

wonsukchoi/domain-experts · 107 tokens