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). A second, independent pattern below is sourced from raw/Every_Prompt_You_Send_Drags_18_384_Words_Of_Junk._Here_s_How_I_Cut_It..md (Nate B Jones, AI News & Strategy Daily, 2026-07-16).
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.
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.
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.
A Second Independent Pattern — Nate B Jones’s Harness Cleaner (2026-07-16)
A separate creator, independently, built a broader-scoped cleanup skill covering the whole harness (custom instructions, project files, saved prompts, memory, skills, tools, permissions — not just CLAUDE.md/AGENTS.md text). Same underlying diagnosis as doc-cleanup and /checkup above — accumulated rules quietly degrade newer, more capable models — but a distinct methodology and, notably, a controlled before/after result the other two patterns don’t have.
- Audit numbers from his own setup: 66 reusable skills and 172 instruction-related files; one route alone carried 27,000 description characters against Codex’s 8,000-character discovery budget; one skill-to-skill chain totaled 18,000 words before the model even started the actual task.
- Six principles distilled from the exercise:
- Map the harness before cleaning it. Give every control a row: where it lives, when it loads, what job it does, who owns it, whether there’s evidence it still helps, and what it breaks if misused.
- Blame the right layer. Before adding another rule to fix a bad result, ask whether the model failed or the harness (instructions/skills around it) failed — most accumulated bloat comes from blaming the model for harness-caused failures.
- One rule, one home, one owner. He found the same “cite sources correctly” instruction duplicated across 15 top-level skills — each copy a separate place the rule could drift out of sync with the others.
- Load specialist knowledge only when the work needs it, not all at the start of every session — six editorial guides loading on every writing task meant research-quality prompts were competing for attention with irrelevant YouTube-formatting guidance.
- Hard requirements need hard checks. Rules with a testable yes/no shape (a word-count limit, a required JSON shape) belong in an enforceable schema the system can verify, not in prose the model has to remember to honor.
- Build for the specific model + product combination actually doing the work — Fable 5 in Claude.ai, Fable 5 in Claude Code, and Fable 5 via the raw API don’t share a harness, and neither do GPT-5.6 in ChatGPT Work vs. Codex vs. the API; core requirements (facts needed, permission boundary, proof-of-done) stay constant, but how they’re delivered has to match the specific surface.
- The controlled result that neither
doc-cleanupnor/checkuphas produced: he ran the same task through Fable 5 with two harness weights. The compact harness (goal + facts + permission boundary + finish line only) finished the delivery requirements correctly 3 times out of 3. The thick harness (the same, plus the full method, a scoring system, an eval plan, and a classification scheme) produced richer analysis but failed delivery twice — once breaking the required JSON shape, once breaking a word-count limit. - Cross-model failure-mode difference he observed: Fable 5’s failure mode showed up after the method got too heavy relative to the delivery job (it tried to do too much and blew the format). GPT-5.6 in Codex failed earlier — while still searching for the right method, overwhelmed by having to route through a huge harness before it had even found its footing. Same root cause (harness too heavy), different symptom per model.
- Where to find it: Jones published the full “cleaner” skill on his Substack; not independently verified or installed at ingest time (unlike the aka-luan repo above, which was checked directly against its live GitHub source).
How this relates to the patterns above: doc-cleanup and /checkup are scoped to markdown documentation specifically; Jones’s cleaner is scoped to the full harness (skills, tools, permissions, memory included) and is the only one of the three with a controlled compact-vs-thick reliability comparison. Worth treating as complementary rather than redundant — a documentation-hygiene pass and a full-harness audit catch different classes of bloat.
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.
- Before adding a new rule after a bad result, ask Jones’s question first: did the model fail, or did the harness fail? If you can’t tell, that’s itself a sign that the harness isn’t mapped clearly enough to answer.
- If you have a rule with a testable yes/no shape (a length limit, a required output format), move it into a schema or automated check rather than another sentence of prose — per principle 5 above.
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).
- The Capability Curve (Anthropic, Jeremy) — names the same underlying failure mode as “the Frankenstein prompt” (“3,000 lines of mostly prompt instructions designed for previous models”); Nate B Jones’s 6 principles above are one concrete, operator-built response to that exact thesis.
- Prompt Engineering Tradeoffs — the broader cost/quality tradeoff space (caching, structured output, system-vs-user injection) that principle 5 (hard requirements need hard checks) sits inside.
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. - Nate B Jones’s cleaner skill is not independently verified. Unlike
aka-luan/doc-cleanup(checked against its live GitHub repo), the Substack-published cleaner has not been fetched, installed, or tested at ingest time — treat the 6-principle framework and the compact-vs-thick result as reported, not verified. - The compact-vs-thick harness test is a single trial, not a benchmark. “3/3 vs 2 failures out of some number of thick-harness runs” is Jones’s own account of one comparison on one task on Fable 5 — informative but not a controlled study with a stated sample size.