doc-cleanup
Skill5 starsChanged 35 days agoMITView on GitHub
Clean existing instruction files (AGENTS.md, CLAUDE.md, skills, the docs they name) down to rules and facts.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- park-jongbeom/patrick-work-harnesstheir own version, first seen Nov 5, 2026
- aka-luan/doc-cleanuptheir own version, first seen Jul 14, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- aka-luan/doc-cleanup★ 42same name
- park-jongbeom/patrick-work-harness★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Remove sediment from instruction files until each holds only rules and facts.
- Distinctive: line 22
rewrite: when it carries sediment.
- Very specific: line 28
Put every rewrite file into one dated archive outside any instruction location (for example tar czf …
- Distinctive: line 38
Keep each meaning in one place.
- Distinctive: line 41
Keep templates that show the form of good output (a command format, a pair contrasting a wording to avoid with the wording to use).
- Distinctive: line 42
Keep the file's language, voice, headings that still serve, tables, commands and paths exactly.
- Very specific: line 43
Leave the frontmatter fields originSessionId and modified in Claude Code memory files as they are.
- Very specific: line 44
Write with the edit tool (Claude Code: Edit/Write, Codex: apply_patch), so agent-doc-guard reviews the new lines.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Doc cleanup
Remove sediment from instruction files until each holds only rules and facts. Sediment is provenance (dates, who said what), anecdotes, case-specific examples, special cases from one event, and the same rule said twice.
A fact is something the agent cannot find by looking: a location, a command and its flags, an account limit, a measured number, a gotcha. Facts stay, even when they arrived inside an anecdote; keep the fact and drop the story around it.
1. Inventory
List every instruction file in scope (the current project unless the user names more):
AGENTS.md,CLAUDE.md,GEMINI.md,SKILL.md,MEMORY.md, files under~/.claude,~/.codex,.claude/,.agents/, and.mdfiles a guide names by path.
Mark each one rewrite, clean, or skip:
- skip change logs, research reports whose purpose is recorded findings, and skills installed from someone else's source (resolve symlinks; a target outside the user's own folders is someone else's).
- rewrite when it carries sediment.
Done when every file in scope has a mark, and every skip has a reason. Show the list to the user.
2. Back up
Put every rewrite file into one dated archive outside any instruction location (for example tar czf ~/Documents/doc-cleanup-backup-<date>.tgz <files>).
Done when tar tzf lists every rewrite file.
3. Rewrite, one file at a time
For each rewrite file:
- Turn each feedback record into the general rule it implies, written so it also fits the next, unrelated task.
- Fold sections that log one task's lessons into the topic sections they belong to.
- Keep each meaning in one place; delete restatements, background with no rule, and closing summaries.
- Move a dated history section ("what changed on which day") into
CHANGELOG.mdnext to the file and leave one line pointing to it. Change logs are meant to hold dates. - Move a long list of collected cases (words that fail, known errors) into a data file such as a
.tsv, and point to it from the file with one line saying when to look it up and when to add to it. - Keep templates that show the form of good output (a command format, a pair contrasting a wording to avoid with the wording to use); drop only the story attached to them.
- Keep the file's language, voice, headings that still serve, tables, commands and paths exactly.
- Leave the frontmatter fields
originSessionIdandmodifiedin Claude Code memory files as they are; the harness rewrites them on every save. - Write with the edit tool (Claude Code: Edit/Write, Codex: apply_patch), so agent-doc-guard reviews the new lines. Follow its notes. When a note would delete a fact, keep the fact and reword it as a plain statement.
Rewrite the first file, show it to the user with a short list of what was dropped, and wait for their go-ahead before the rest. Their correction calibrates the remaining files.
Done for a file when the guard's notes on it are addressed and every fact from the backup copy is either still present or listed as deliberately dropped.
4. Report
For each file: lines before → after, facts deliberately dropped, and anything left for the user to decide. Give the backup path. In a public repository, leave committing to the user.
Done when the report, checked against the step 1 list, misses no file and every rewrite file has its line.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

