memory-prune
Skill4 starsChanged 7 months agoMITView on GitHub
Prune project memory files: keep memory-native records, route guidance, state, and evidence to canonical owners, then trim or delete absorbed sources. TRIGGER when: user says 'prune my memories', 'clean up memory', 'what memories should be promoted', or 'review my memory dir'. SKIP when: routing one fact (place-fact), or auditing one instruction file or AGENTS.md (refine-file).
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-soulSkill
- audit-transcripts-for-learningsSkill
- best-answerSkill
- check-coherenceSkill
- compress-fileSkill
- deep-modulesSkill
- design-critiqueSkill
- durable-docs-updateSkill
- execute-chatSkill
- execute-planSkill
- explain-deeplySkill
- explain-simplySkill
- find-gapsSkill
- fix-verify-loopSkill
- generate-mockupsSkill
- grill-meSkill
- handoffSkill
- interview-meSkill
- jtbdSkill
- map-design-languageSkill
- multi-agent-analysisSkill
- place-factSkill
- post-purchase-ui-extensionSkill
- product-interviewSkill
- prove-behaviorSkill
- refine-fileSkill
- second-opinionSkill
- sentry-analysisSkill
- shopify-dev-mcpSkill
- structure-proseSkill
- tech-designSkill
- test-completed-planSkill
- tighten-fileSkill
- tighten-instructionSkill
- tldrSkill
- triageSkill
- trim-specSkill
- two-pass-reviewSkill
- validate-answerSkill
- vet-factSkill
- write-planSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 57
Write the canonical target and required delivery views.
- Very specific: line 61
Update MEMORY.md: remove deleted sources, refresh trimmed sources, and keep - Title — one-line summary for all others.
≈ “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
Memory Prune
Protocol
Step 0 — Resolve and read the memory set
Resolve ~/.claude/projects/<slug>/memory/, where <slug> replaces every non-alphanumeric character in the absolute current directory with -, with ls ~/.claude/projects/ | grep -Fx -- "$(pwd | sed 's|[^a-zA-Z0-9]|-|g')". If it returns zero or multiple matches, show the candidates and ask the user to choose. Read every *.md except the MEMORY.md index, including frontmatter and metadata.type; stop if none exist.
Step 1 — Load the lenses
Invoke the Skill tool to load vet-fact, place-fact, tighten-instruction, and structure-prose; this workflow owns memory dispositions.
Step 2 — Classify and score each fact
Judge coherent facts or blocks; one file can span lanes. Treat metadata.type only as a signal: user or feedback leans memory-native; project or reference leans toward guidance, state, or evidence.
| Material | Verdict |
Current guidance kept by vet-fact | PROMOTE through place-fact. |
Setup or onboarding excluded by vet-fact | ROUTE to the README. |
| Stale, derivable, or duplicated guidance | DROP. |
| Active state or unique evidence/open decisions | Skip vet-fact; ROUTE through place-fact. |
| Completed state or evidence with no unique value | DROP when place-fact's retirement condition applies. |
| User preference, feedback, or deliberately auto-loaded live context | KEEP only when memory is its canonical owner with upkeep and retirement paths. |
For every PROMOTE or ROUTE, including README routes, record place-fact's full placement contract in the analysis; do not paste it into the repository.
Score each verdict 0.0–1.0; name the target or why memory remains the owner. Derive each file's source disposition from all its facts:
| Disposition | Use when |
| DELETE | Every fact will be absorbed or dropped. |
| TRIM | Some facts remain; remove absorbed or dropped blocks, preserve the rest, and point only when the placement contract requires it. |
| NONE | Memory remains the canonical owner for the complete file. |
Step 3 — Present and confirm
Present every recommendation at confidence ≥ 0.70, sorted by confidence:
| # | Confidence | Memory and block | Verdict | Target | Source disposition | Why |
|---|---:|---|---|---|---|---|Report the count below 0.70; stop if no row qualifies. KEEP rows are informational. Confirm each PROMOTE, ROUTE, or DROP before editing a target or source.
Step 4 — Apply and prove
For each approved PROMOTE or ROUTE:
- Shape PROMOTE material with
tighten-instruction, thenstructure-prose; preserve ROUTE material in its owner's required form. - Write the canonical target and required delivery views; verify the trigger, upkeep, and retirement path.
Recompute source dispositions from approved rows. DELETE removes the source; TRIM preserves unabsorbed blocks and refreshes stale frontmatter or summaries. Leave declined and below-threshold facts unchanged.
Update MEMORY.md: remove deleted sources, refresh trimmed sources, and keep - [Title](file.md) — one-line summary for all others.
Cold-read every changed source and target in full. Fix only run-caused or exposed contradictions, duplicate ownership, mixed scopes, broken routes, lost evidence, or unnecessary eager loading.
Step 5 — Report
**Memory prune:**
- Promoted: [memory block → target, one per line | none]
- Routed: [memory block → target, one per line | none]
- Kept: [memory block, one per line | none]
- Dropped: [memory block, one per line | none]
- Sources: [N deleted, N trimmed, N unchanged]
- Below threshold: [N]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.

