memory-audit
Skill0 starsChanged 5 months agoMITView on GitHub
Audit Claude Code's auto memory (MEMORY.md + topic files in ~/.claude/projects/<project>/memory/) for the load cutoff, staleness, redundancy/contradiction, and index↔topic split — then, on approval, tighten MEMORY.md to a lean index, move detail into on-demand topic files, and drop stale entries. Use when the memory-curator hook nudges, when MEMORY.md is over the ~200-line / 25KB load cutoff, or whenever auto memory feels bloated or out of date.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- nightscout/AndroidAPStheir own version, first seen Nov 1, 2026
- shakhruz/mila-coretheir own version, first seen Nov 1, 2026
- AcKeskin/contexturetheir own version, first seen Nov 1, 2026
- qwwiwi/agentos-skills-publictheir own version, first seen Nov 1, 2026
- adamlinscott/claude-skillstheir own version, first seen Oct 30, 2026
- AdityaRon/claude-code-harnesstheir own version, first seen Oct 29, 2026
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- FastLED/FastLED★ 7.5ksame name
- nightscout/AndroidAPS★ 1.2ksame name
- AdityaRon/claude-code-harness★ 14same name
- mfang0126/openclaw-skills★ 4same name
- qwwiwi/agentos-skills-public★ 4same name
- adamlinscott/claude-skills★ 3same name
- shakhruz/mila-core★ 3same name
- AcKeskin/contexture★ 2same name
- andreijirohdev-labs/gen-ai-labs★ 1same name
- brenbuilds1/skills★ 1same name
4 more not listed
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.
In this repository10 other files it gives its agents.
- claude-md-auditSkill
- coverage-auditSkill
- design-noteSkill
- failure-scanSkill
- handoffSkill
- noteSkill
- orchestrateSkill
- public-readySkill
- scaffold-mcpSkill
- verify-mcpSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Keep Claude Code's auto memory healthy.
- Distinctive: line 17
Never edit memory unprompted.
- Very specific: line 29
Below the cutoff — silently dropped NOW: If MEMORY.md exceeds 200 lines or 25 KB, name exactly which entries fall past the line — they are …
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/memory-audit
Keep Claude Code's auto memory healthy. Auto memory lives at
~/.claude/projects/<project>/memory/ — a MEMORY.md index plus topic files.
The principle is the same as CLAUDE.md: MEMORY.md is the index, topic files are
the chapters. But MEMORY.md has a hard limit, not a soft one: only its
first 200 lines / 25 KB load each session — anything past that is silently not
loaded. Since Claude writes this file itself across sessions, it grows on its
own, and the dropped tail is memory you thought was active.
Advisor, not editor: report, then apply only on the user's explicit go-ahead. Never edit memory unprompted.
1. Locate and read
Find the memory dir for this project: ~/.claude/projects/<project>/memory/
(the <project> segment is derived from the git repo; or an
autoMemoryDirectory from settings). Read MEMORY.md and every topic file.
State MEMORY.md's line count and byte size vs the cutoff
(MEMORY_LINE_BUDGET default 200, MEMORY_BYTE_BUDGET default 25 KB) up front.
2. Report (highest-value finding first)
- Below the cutoff — silently dropped NOW. If
MEMORY.mdexceeds 200 lines or 25 KB, name exactly which entries fall past the line — they are not loaded this session. This is the headline: those "memories" are currently inert. - Index↔topic split. Is
MEMORY.mda lean index of one-line pointers, or is detail that belongs in a topic file inflating it past the cutoff? - Staleness. Entries describing code, paths, counts, or decisions that have since drifted (verify cheap ones against the repo; flag the rest).
- Redundancy / contradiction. Claude wrote these incrementally, so duplicate or conflicting notes are likely — flag both; conflicting memory is worse than none (Claude may act on the wrong one).
3. On approval, apply
- Tighten
MEMORY.mdto a pure index — one line per memory, pointing to its topic file (the format the harness expects:MEMORY.mdtracks what's stored where). - Move detail that inflated the index into the relevant topic file (create topic files as needed). Detail in topic files is uncapped and loads on-demand — so this is the fix for overflow, not a workaround.
- Drop stale entries; reconcile contradictions (keep the true one, delete or correct the other).
- Re-state the new
MEMORY.mdline/byte count — confirm it's back under the cutoff so nothing is silently dropped.
Notes
- Don't manufacture cuts. A
MEMORY.mdunder the cutoff and current may need nothing — say so. - Only
MEMORY.mdtruncates. Topic files load on-demand in full, so moving content into them genuinely removes the per-session-load problem. - Memory is plain markdown you (and the user) can edit directly;
/memoryin-session also browses it. - Twin of the CLAUDE.md curator (
/claude-md-audit): same index/chapters discipline, different surface. Catalog:memory-index-overflow(the hard-cutoff sibling ofcontext-doc-bloat).
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.

