Source: raw/reddit-1us9hfz.md (r/ClaudeAI, u/eliaff, score 151 / 29 comments, posted 2026-07-10) — cites github.com/aka-luan/doc-cleanup, checked directly against the live repo on 2026-07-10 (MIT, 26 stars, single SKILL.md at skills/doc-cleanup/SKILL.md, matches the post’s description).
After three weeks building a product almost entirely with agents, a disciplined documenter asked Claude to evaluate what in the repo’s own required-reading docs was hurting its reasoning — expecting a clean bill of health. Instead Claude found the docs were 75% finished-work history masquerading as current instructions, plus several specific rot patterns that had been silently misleading every agent session. The author turned the audit into a repeatable Claude Skill rather than a one-off cleanup.
Key Takeaways
- Over-documenting is not the same as documenting well. The author was disciplined the whole three weeks — milestones checked off, decisions logged, gotchas recorded — and still ended up with docs that actively degraded agent reasoning. Volume and currency are different axes.
- The three required-reading docs totaled 1,085 lines; ~75% was finished work — fully-checked checklists, phase-completion logs, old verification notes. Every session paid the token cost to read history nobody needed anymore.
- Agents trust these files more than they trust their own searches — by design. That’s what the files are for. But it means a doc doesn’t have to be wrong in an obvious way to cause damage; it only has to be slightly behind the code.
- Five concrete rot patterns surfaced (see below) — each one a distinct failure mode, not just generic staleness.
- The cleanup is now a repeatable skill, not a one-off: inventories the markdown files, verifies every claim against the actual code before flagging it, reports findings, and only rewrites after human approval. Nothing is deleted — history moves to
docs/archive. - Result: 1,085 lines of required reading cut to 266 (about 75% reduction) while preserving the archived history.
- Verified via direct repo check (2026-07-10): the public README describes the same mechanism in more formal terms — six specific rot patterns (completed-work logs, executed plans never rewritten, internal contradictions, stale facts diverging from code, dead file paths, authority drift) worked through five phases (inventory, diagnosis, reporting, execution, verification), with a mandatory approval gate before any change lands.^[inferred]
The Five Rot Patterns Found in the Original Post
- Pure finished-work history disguised as instructions. Fully-checked checklists and phase-completion logs sitting in the same file as active rules, with no separation between “what we did” and “what to do.”
- The same fact stated two contradictory ways in one file. The pricing doc listed enabled payment methods differently in two places — and one version referenced a line number that no longer existed.
- A table “corrected” by a footnote three paragraphs below it, but the table itself never edited. The author’s own framing: “Guess which one an agent reads.” Agents don’t reliably read past the first authoritative-looking statement.
- Stale status labels. Two features marked “awaiting merge/deploy” had actually been on
mainfor days — the doc hadn’t been touched after the merge landed. - A dead cross-repo path that silently failed every time. A hard rule in
AGENTS.mdpointed at a sibling repo via a Windows path (A:\Dev\...) — left over from before the author moved to WSL. No agent ever flagged the rule as broken; each one just silently failed to follow it.
How the Skill Verifies Before Flagging
The skill doesn’t just pattern-match for staleness — it checks claims against ground truth before surfacing them:
- “Awaiting merge” claims are checked with
git merge-baseagainst the actual branch state, not taken on the doc’s word. - File-path references are checked with
grepagainst the real filesystem, catching dead paths like the WSL-migration Windows path above. - Contradictions are surfaced for human review rather than auto-resolved — the skill reports, it doesn’t silently pick a winner.
- Nothing is deleted. Finished-work history moves to
docs/archiverather than disappearing, preserving the audit trail while clearing it out of the always-loaded read path. - A mandatory approval gate sits before any rewrite. The skill’s five-phase flow (inventory → diagnosis → reporting → execution → verification, per the repo’s own README) stops before the execution phase until a human signs off.^[inferred]
Relationship to First-Party Tooling
This is a community pattern filling a gap Anthropic is now also addressing natively. Claude Code’s /checkup command (announced by Boris Cherny, 2026-07-08) runs a similar one-pass audit — deduplicating CLAUDE.md, reorganizing a bloated root file into nested CLAUDE.md files plus skills, and cleaning up unused skills/MCP servers/plugins — with its own confirm-before-change gate. /doctor diagnostics cover an overlapping but narrower slice (proposing trims of content Claude could re-derive from the codebase). See the CLI Reference for the authoritative first-party detail on both. The doc-cleanup skill predates neither by much and is more narrowly scoped to the documentation-rot diagnosis specifically (the six named patterns above), whereas /checkup bundles doc cleanup into a broader maintenance sweep (skills, MCP servers, hooks, update, auto mode, pre-approvals) — worth running both rather than treating either as a full replacement for the other.^[inferred]
Try It
- Install the skill from
github.com/aka-luan/doc-cleanup(MIT license, singleSKILL.md) and point it at your project’s required-reading docs (CLAUDE.md,AGENTS.md, onboarding docs). - Before running it for real, skim the six rot patterns above against your own docs — the table-vs-footnote and dead-cross-repo-path patterns are easy to miss by eye.
- Let the skill report before it rewrites — review the flagged items, especially any “awaiting merge” or file-path claims, before approving.
- Route history to
docs/archiveinstead of deleting it, matching the skill’s default behavior. - If you’re already on a build with
/checkup(2026-07-08+), compare its output againstdoc-cleanup’s report on the same repo — they target overlapping but not identical problems. - Re-run periodically, not just once — the same rot (stale status labels, contradicted facts) will reaccumulate as a project evolves.
Related
- Claude Code CLI Reference — documents the first-party
/checkup(Boris Cherny, 2026-07-08) and/doctorcommands that now solve an overlapping problem natively. - Anthropic’s Official Best Practices for Claude Code — the canonical context-management primitives (
/compact,/clear, CLAUDE.md hierarchy) this skill is a maintenance layer on top of. - Context Management in Claude Code (Anthropic Tutorial) — companion primitives reference; the specificity paradox this skill’s approval-gated rewrites are designed to avoid triggering.
- Claude Code Memory Architectures Compared — the storage/injection/recall framing that CLAUDE.md hygiene feeds into.
- Top 5 Claude Cowork Tips (Jeff) — independently arrives at a ~300-line
claude.mdceiling and a “right file routing” discipline; this skill automates the audit half of that discipline. - Headroom — Context Compression Layer for AI Agents — the adjacent-but-distinct problem: Headroom compresses good content before it reaches the model, this skill removes bad (stale/contradictory) content from the source docs themselves.
- How Anthropic Engineers Prompt Claude Code — Four Rules — rule 4 (“update your skill every session for the compounding loop”) is the discipline this skill turns into a periodic, verifiable pass rather than an ad hoc habit.
- SkillSpector — Security Scanner for AI Agent Skills (NVIDIA) — a sibling doc/skill-hygiene scanner with a different concern (security risk in skill bundles, not documentation staleness).
Open Questions
- No evidence of official Anthropic affiliation. This is a community-built skill (single author,
aka-luan), not a first-party tool — treat it with the same scrutiny as any other community skill before installing. - Nested CLAUDE.md hierarchies untested here. The source describes a flat multi-doc setup (three required-reading files); unclear from the post whether the skill has specific handling for project/user/enterprise CLAUDE.md layering.
- Not yet run against this vault’s own
wiki/CLAUDE.mdorkarpathy/CLAUDE.md. A natural dogfooding candidate, unexplored as of this ingest.