prune-memory
Skill0 starsChanged 3 months agoMITView on GitHub
Audit and prune a Claude Code project memory store. Use when the user asks to inspect MEMORY.md, remove expired or stale memories, fix expiry coverage, or reduce always-loaded memory context without promoting policy into shared documentation.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- usrrname/agent-skillstheir own version, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- usrrname/agent-skills★ 0same 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.
In this repository4 other files it gives its agents.
- create-skillSkill
- share-memorySkill
- skillifySkill
- update-skillSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
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 this workflow focused on the personal memory store.
- Distinctive: line 30
Remove index rows only when the user asked for edits.
- Very specific: line 32
Delete expired memory files only after explicit approval of the exact set.
- Distinctive: line 37
Keep active private preferences, necessary local machine facts, and current work that has no better tracker.
≈ “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
Prune Memory
Keep this workflow focused on the personal memory store. Route durable policy that
should move into version-controlled documentation through share-memory.
Workflow
- Resolve the memory directory. Use the explicit path when supplied; otherwise
derive
~/.claude/projects/<munged-project-path>/memoryfrom the current project. - Exit without changes when
MEMORY.mdis absent. - Record the
MEMORY.mdbyte size and entry count, then runmemory-prune <memory-dir>. Its default mode is a dry run that reports expired files and invalid or missing expiry metadata. - Backfill missing expiry metadata without deleting content. Choose dates by how
quickly the fact decays:
- machine, path, version, or tooling state: about six months;
- in-flight work: its expected completion date, or one month;
- already codified policy: one month;
- genuinely permanent facts only:
9999-12-31.
- Re-run the dry-run sweep. Treat missing or invalid expiry as audit debt, not permanence.
- For stale index rows that are not expiry-driven, re-read live
MEMORY.mdwith line numbers immediately before proposing edits. Identify each row by title and reason, highest line number first. - Remove index rows only when the user asked for edits. Explain that removing an index row changes startup context while deleting its backing file is stronger.
- Delete expired memory files only after explicit approval of the exact set. Run
memory-prune --delete <memory-dir>; its default mode is a dry run. - Re-run
memory-prune, then report before/after bytes, entries, files, and every deleted or retained item.
Keep active private preferences, necessary local machine facts, and current work that has no better tracker. Prune resolved status breadcrumbs, duplicated rules, transient tool facts, and memories already represented more accurately elsewhere.
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.

