world-class-doctor-mode-for-cli-tools
Made by JeffAdd or upgrade a CLI tool's doctor subcommand: agent-ergonomic, idempotent, reversible, backup-aware, routed through a single mutate() chokepoint with capabilities reflection, robot-docs, fixtures, and per-run scoring artifact. Use when: "add doctor", "upgrade doctor", "make CLI agent-friendly", "absorb playbook into doctor", "self-healing CLI", or any broken CLI state needing safe auto-remediation. Language-agnostic; 24-axiom kernel; ≥700 on 10-dim rubric.
Works With
Quality and Utility come from canonical skill metadata. Community ratings appear separately as stars when subscriber reviews exist.
Subscribe to download
Public previews are available, but downloads, CLI sync, and premium content require an active subscription.
Sign In to Subscribe- Full skill content with deterministic versioning
- CLI sync + local search index
- Access to Jeffrey’s premium library
Save to your account
Saved skills live in your cloud list. Run jsm sync on each machine to pull them locally.
What's New with this Skill
2Updates, enhancements, and release notes for this skill.
Enhanced: world-class-doctor-mode-for-cli-tools, Phase 0 mining that reports failures and keeps its quotes
cass-mine.sh turned every failed or timed-out search into zero findings with exit 0, and its excerpt and date fields were always empty. Failures now exit 2 with an error log, excerpts and dates are filled in, and seven broken links to sibling skills resolve.
- A failed or timed-out cass search is logged and counted instead of becoming zero findings.
- cass-mine.sh exits 2 when any query got no complete answer, and IO-CONTRACTS.md documents the code.
- Findings now carry the matching excerpt and its date instead of null.
- Duplicate findings are removed by session location, so one line is no longer repeated once per query.
- Seven links to sibling skills that pointed one directory too deep or too shallow now resolve.
Phase 0 runs the 13 canonical CASS queries and writes cass_findings.jsonl. Every failed search used to become {"hits": []}, so a broken or timed-out cass produced "0 hits" for all 13 queries and exit 0, which Phase 1 reads as "no prior failure modes".
Each query now runs under cass's own time budget, plus an outer timeout where one exists. An answer that failed, hung or timed out is logged to cass_errors.log and counted, and the script exits 2 when any query got no complete answer. IO-CONTRACTS.md and SKILL.md document the new exit code. Findings now request snippet and created_at,
New: world-class-doctor-mode-for-cli-tools, make a CLI's doctor subcommand a contract a future agent can rely on
When an agent runs into a broken CLI with no human nearby, the tool's doctor subcommand is what stands between recovery and a stuck session. This skill upgrades any CLI's diagnose/repair surface so problems are detected before any fix runs, every mutation is backed up byte-for-byte and paired with an explicit inverse, and every run emits a scorecard the next pass can beat.
- The One Rule: detect-then-fix, never fix-then-detect. Every mutation goes through a single mutate() chokepoint that takes a verbatim backup, records the action, and ships an explicit inverse. doctor undo <run-id> is a true byte-for-byte revert or the fix doesn't merge.
- Per-run scoring artifact (scorecard.json) graded on a 10-dimension rubric with ≥700 as the polish bar. Each pass writes an uplift diff against the previous one, and no surface may regress by more than 50 points.
- 15 project patterns with ready recipes, including single-binary, multi-binary, daemon, distributed, installer, TUI, AI-agent, build-system, compliance, and meta-doctor; pick the closest fit and follow the steps.
- Language-agnostic playbook: Rust, Go, Python, TS/Node, Bun, Deno, Ruby, C/C++, Zig, Elixir, JVM, Swift, and Bash. 18 subagents handle the high-cost work, among them fixture-author, archaeologist, integration-wirer, and fresh-eyes.
- Absorbs any manual repair playbook into the binary as <tool> doctor --fix, turning each documented failure mode into a (detector, fixer, fixture, regression-test) tuple wired through the chokepoint.
- Robot surface by default: <tool> doctor capabilities --json, doctor health, doctor robot-docs, doctor undo <run-id>. Agents can introspect what the doctor handles without parsing English.
Pointed at any CLI repo, this skill either adds a doctor subcommand or upgrades an existing one until it is idempotent, reversible, backup-aware, and built for an AI agent as the caller: a non-interactive Claude, Codex, or Gemini in a sandbox with no TTY, no network, and no human to ask.
Every run emits .doctor/runs/<ISO8601>__<id>/{report,scorecard}.json plus actions.jsonl, backups/, and undo.sh, so the next pass can measure uplift. Every fixable failure mode in the project's bug tracker, git history, or prior-incident memory is converted into a (detector, fixer, fixture, regressio