Audit and fix agent-facing documentation by comparing docs to implementation, identifying broken links and stale references, surfacing undocumented conventions, and updating CLAUDE.md files. Use when CLAUDE.md may be stale, docs don't match code, or undocumented conventions exist.
70
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Audits and fixes agent-facing documentation by running parallel subagents to compare docs against the current codebase, then applies targeted fixes — one commit per finding.
Output: Tidy report artifact at docs/plans/YYYY-MM-DD-tidy-report.md
Use this skill when:
Don't use for:
/refactor)CRITICAL: Dispatch ALL 3 agents in a SINGLE message using multiple Task tool calls with run_in_background: true.
Three agents run in parallel — see agent prompts for full templates:
| Agent | Type | Investigates |
|---|---|---|
| CLAUDE.md Auditor | Explore | Structure, sections, best practices, cross-references |
| Reference Checker | Explore | Broken links, stale paths, outdated code references |
| Context Scout | Explore | Undocumented env vars, naming conventions, architectural patterns |
Example dispatch:
# ALL in a single message:
Task(Explore): "Audit CLAUDE.md structure against best practices for [project]"
Task(Explore): "Check all markdown files for broken internal links and stale references in [project]"
Task(Explore): "Scout for undocumented conventions and patterns in [project]"TaskOutput block: false to check progressTaskOutput block: trueCross-reference agent results and deduplicate. For each finding, assign:
| Severity | Definition |
|---|---|
| must-fix | Actively misleading. Agent will make wrong decisions based on this. |
| should-fix | Missing or outdated but won't cause incorrect behavior. Reduces agent effectiveness. |
| nice-to-have | Would improve agent experience but absence isn't harmful. |
Write the tidy report using the report template.
Save the report to: docs/plans/YYYY-MM-DD-tidy-report.md
Use AskUserQuestion to present a summary of findings by severity:
Found N findings:
- X must-fix (actively misleading)
- Y should-fix (outdated/missing)
- Z nice-to-have (improvements)
Which findings should I address?Options:
If the user picks individually, list each finding with its severity and let them select via AskUserQuestion with multiSelect: true.
For each approved finding, in order of severity (must-fix first):
Write or Edittidy: <description>One fix per commit. This mirrors Beck's philosophy of keeping tidying commits separate and small.
Examples of commit messages:
tidy: add missing build commands to CLAUDE.mdtidy: fix broken link to architecture.md in READMEtidy: document DATABASE_URL env var in CLAUDE.mdtidy: remove reference to deleted utils/helpers.tsAfter all fixes are applied, present a brief summary:
Checks against CLAUDE.md best practices:
Scans all markdown files in the project:
[text](path/to/file.md) where target doesn't existExplores the codebase for patterns that should be documented:
process.env.X, os.environ) but not listed in docs*Repository, *UseCase, *Controller) with no documentationOnce the tidy report is addressed:
/research, /draft, and /craft sessions work from reliable context/tidy again periodically or after major refactors2a98cc1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.