About env-doctor
env-doctor is a skill for checking and safely remediating a project's execution environment. It uses `.agents/environment.md` as its specification, avoids system-wide changes and production secrets, and reports readiness or blockers.
Key features
- 01Manifest-based environment checks
- 02Runtime and service probes
- 03Project-scoped remediation
- 04Synthetic test secret handling
- 05Human and runner report formats
Use cases
- 01Check declared tools and services before work
- 02Boot project services and sync dependencies
- 03Verify test datastore setup
- 04Report environment blockers safely
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ venhdev/ skills --skill env-doctorAfter installing, type/env-doctorin Claude Code to confirm it loaded.
Details
From the project READMEenv-doctor — Execution Environment Diagnostics & Remediation
Operating Invariants
- Idempotent Local Boundary: Confine remediation strictly to project-scoped actions (declared dependency sync, local service boot, test datastore migration, synthetic test secrets); forbid system-wide mutations (
sudo,brew), host PATH tampering, or remote secret fetching. Halt withUNRESOLVEDfor port collisions, missing daemons, or destructive actions. - Zero-Secret Exposure: Never inspect or copy production secret files (
.env*except.env.example); inject deterministic mocks into.env.testor environment stubs. - Manifest SSOT Grounding: Read
.agents/environment.mdas the authoritative specification. Treat omissible sections (services for pure libraries, external datastores) asPASSwhen absent. - Adaptive Invocation Output: Render the full Canonical Output Contract when invoked by a human; output only a single-line Micro-Summary token (
READYorUNRESOLVED: <blocker>) when called by an autonomous runner.
Domain Rubric
1. Dimension Audit & Probing Discipline
Cross-reference declared manifests against host runtimes and execution wrappers (pnpm, cargo, uv). Execute declared service readiness probes (socket, HTTP /healthz, database ping) with exponential backoff (max 15s); forbid treating process state (Up) as readiness. Verify test datastore migrations, fixtures, and synthetic .env.test stubs.
Canonical Output Contract
# Environment Health Report: <Scope> · <READY | STAGED | UNRESOLVED>
Basis: .agents/environment.md
| Dimension | Declared / Target | Active / Detected | State |
| :--- | :--- | :--- | :--- |
| **Toolchain** | <Target runtime version> | <Active version / wrapper> | <PASS | FAIL> |
| **Services** | <Declared services or N/A> | <Probe outcome or Standalone>| <PASS | FAIL> |
| **Datastore** | <Target test datastore> | <Migration & seed status> | <PASS | FAIL> |
| **Test Stubs** | <Test env / secrets> | <Stubs presence (.env.test)> | <PASS | FAIL> |
*(omit if clean)* ## Applied Remediation
- **[<Auto | Staged>] <Action>**: <Command and outcome or pending approval>
*(omit if READY)* Gap: <Root cause blocker and required human action.>
Autonomous Micro-Token Contract:
READY | runtime: <version> | services: <healthy|standalone> | fixtures: verified
(On failure, output UNRESOLVED: <single-sentence blocker>).
Routing
- Environment is READY, proceed to task decomposition → (via /split-tasks).
- Environment is READY, proceed to code implementation → (via /forge).
- Environment is READY, proceed to root-cause diagnosis → (via /diagnose).
- Missing service architecture requires design decision → (via /architect-decision).
Execution Protocol
- Read
.agents/environment.mdand probe declared host tools, runtimes, services, and fixtures. Short-circuit toREADYif all pass. - Execute safe auto-remediations (boot declared services, sync dependencies, run test datastore migrations/fixtures). Re-probe health; report
READYor halt turn withUNRESOLVEDon blockers.