skills/repo-doctor/SKILL.md
Audit any repo against the agentic-quality doctrine — score entry docs, structure, and enforcement gates, then map each finding to its fix. Triggers on: repo doctor, repo audit, agentic quality, is this repo agent-friendly, doc drift, stale AGENTS.md, monorepo structure, nested CLAUDE.md.
npx skillsauth add 0xDarkMatter/claude-mods repo-doctorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scores a repository against the agentic-quality doctrine — the cross-repo standard in rules/agentic-quality.md for code, comments, docs, and structure that a cold agent session can navigate. The rule says what good looks like; this skill measures a repo against it and maps each gap to its fix.
Read-only. The scorer never writes; remediation is always a separate, deliberate step.
python scripts/repo-doctor.py # audit cwd, human panel
python scripts/repo-doctor.py --repo X:/path/to/repo # audit another repo
python scripts/repo-doctor.py --json | jq .data.grade # machine-readable
python scripts/repo-doctor.py --strict # CI gate: exit 10 below B
Six dimensions, 0–5 each, weighted into a letter grade:
| Dimension | Measures | Weight |
|---|---|---|
| entry_docs | AGENTS.md/CLAUDE.md present · Landmines section · length budget (~250 lines) · freshness in commits-since-touched | 2.0 |
| docs_health | README · docs/ index when >6 files · ghost links in the index | 1.5 |
| comments | contract blocks on the largest source files · section markers in files >400 lines | 2.0 |
| structure | monster files (>800 warn, >1500 crit; generated exempt) · repo-root junk | 2.0 |
| enforcement | tests · CI · single check entry point · invariant gate scripts | 1.5 |
| doc_pairing | fraction of recent feat/fix commits touching a *.md in the same commit | 1.0 |
Full rubric — what each check means, thresholds, and the fix for every finding: references/scoring-rubric.md.
--json under .data.facts.--json and tabulate grades.| Finding | Owner |
|---|---|
| Missing/weak AGENTS.md, multi-platform doc mess | doc-scanner (generate/consolidate), template: assets/AGENTS-template.md |
| Missing docs index | Write from assets/docs-index-template.md |
| Monster file needs splitting | refactor-ops (extract-module patterns, circular-dep cautions) |
| Monster file is justified | Guard comment + section map + a scripts/check-* invariant gate (pattern in references/comment-doctrine.md) |
| Missing/weak comments | references/comment-doctrine.md — contract blocks, WHY-only, guard comments, citations |
| Decisions undocumented | adr-ops |
| Stale PLAN/roadmap | project-planner |
| Code-level debt (duplication, dead code, security) | techdebt — deliberately NOT scored here |
| New repo from scratch | scaffold + the two templates in assets/ |
Boundary: repo-doctor audits repo-level conventions; techdebt scans code-level
debt; review/code-review judge diffs. Don't blur the three.
AGENTS.md vs CLAUDE.md — AGENTS.md is the single source of truth (open standard, read by all agent tooling). CLAUDE.md is legitimate only as a pointer or as Claude-specific deltas maintained in lockstep. The scorer flags apparent duplication; the decision tree and the one known-good dual-file pattern are in references/entry-docs.md.
Nested entry docs — nest only where a subsystem has its own contract (design-system package, determinism-bound engine, per-tool CLI); root file carries an ownership table linking each. Anatomy, length budgets, Landmines guidance, freshness discipline: same reference.
For large multi-subsystem repos the audit shifts: the root entry doc is judged as a
router (invariants + ownership table), each contracted package needs its own entry
doc and check, and cross-package invariants need mechanical gates, not prose. The
full playbook — boundaries, navigation aids, extraction signals, parallel-agent
(worktree) interplay, and the split-the-repo decision — is
references/monorepo-structure.md. Run the scorer
per-package as well as at root; a healthy root with a failing core package is the
common monorepo blind spot.
| Resource | What it owns |
|---|---|
| scripts/repo-doctor.py | The scorer: six dimensions, findings, grade; --json envelope claude-mods.repo-doctor/v1; --strict CI gate |
| references/scoring-rubric.md | Every check: what it measures, threshold, why, and the fix |
| references/comment-doctrine.md | Contract blocks, WHY-only inline, guard comments, section markers, format-at-site, citations — with good/bad examples |
| references/entry-docs.md | AGENTS.md anatomy + Landmines, AGENTS-vs-CLAUDE decision, nesting policy, freshness discipline |
| references/monorepo-structure.md | Structuring very large monorepos for agentic development |
| assets/AGENTS-template.md | Entry-doc skeleton with mandatory Landmines section |
| assets/docs-index-template.md | docs/00_INDEX.md skeleton with the two anti-rot rules baked in |
data-ai
Router for parallel or recurring agent work across six skills. Covers: parallel agents, fan out work, delegate to workers, run overnight, scheduled loop, land branches, mixed-model fleet, orchestrate workers, background agents at scale. Triggers on: which skill for parallel work, fan out agents, spawn workers, run this overnight, schedule a loop, land my branches, heterogeneous fleet, delegate to cheaper model, autonomous loop.
tools
Heterogeneous cross-provider fleet - GLM (z.ai), Codex (OpenAI), Grok (xAI), Anthropic Sonnet/Opus/Haiku - from one session, porting the native Workflow tool's patterns (adversarial verify, judge panels, journal resume) to OS-process workers. Triggers: fleetflow, heterogeneous/mixed-model fleet, codex worker, grok worker, cross-provider fan-out, cross-model verify.
development
Application/game-scale three.js: ES modules, GLTF pipeline (DRACO/KTX2/meshopt), AnimationMixer, physics (rapier/cannon-es), react-three-fiber, and performance at scale (InstancedMesh, LOD, draw calls). Triggers on: three.js, GLTFLoader, r3f, game loop, WebGL memory leak, boids.
development
Recolour, vectorise, and theme any SVG to a brand palette with a zero-dependency studio that emits a copy-paste CSS filter. Triggers on: recolour svg, brand tint an svg, duotone svg, recolour a diagram, cloudcraft/draw.io/figma svg to brand, svg css filter, png to svg, vectorise a logo, image trace.