memory-gc
Skill0 starsChanged 4 months agoMITView on GitHub
This skill should be used when the user says "run memory gc", "clean up memory", "run the memory doctor", "memory health check", "fix the memory index", "demote stale threads", or when memory-doctor reports drift (orphans, broken links, misplaced files, hot-index over budget). Trigger roughly weekly, or whenever a session-end check reports more than a couple of warnings. Runs the automated health check, fixes the mechanical findings directly, proposes the judgment calls, and logs the pass.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- yangwhale/CloseCrabtheir own version, first seen Aug 18, 2026
- enckequity/samebraintheir own version, first seen Jun 10, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- yangwhale/CloseCrab★ 5same name
- enckequity/samebrain★ 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 repositoryOne other file it gives its agents.
- rememberSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Broken [[links]]: if a near-match file exists (date-suffix variant, renamed slug), fix the link.
- Distinctive: line 33
Frontmatter lint: add the missing frontmatter/description from the file body.
- Very specific: line 53
NEVER delete a memory file.
≈ “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-gc: keep the memory system healthy
Governing doc: MEMORY-ARCHITECTURE.md in the memory dir. Read it if unsure about a
rule, do not improvise new conventions.
Step 1: diagnose (read-only)
node scripts/memory-doctor.mjs <memory-dir>Step 2: fix mechanical findings directly (no approval needed)
Work through the report top to bottom. These are safe, reversible, judgment-free:
- Misplaced files (referenced only by
MEMORY-ARCHIVE.md, orstatus: superseded): move the file to_archive/. Links still resolve there. - Orphans (no index references the file): read the frontmatter
description, decide LIVE vs CLOSED from content and date. LIVE or historical-but-useful: add a one-line entry to the rightMEMORY-INDEX.mdcategory. CLOSED/superseded: add an ARCHIVE line and move to_archive/. - Broken [[links]]: if a near-match file exists (date-suffix variant, renamed slug), fix the link. If the target never existed, leave it only if the linking file is active and the gap is real, otherwise remove the link.
- Dead index targets: repair or delete the index line.
- Duplicate slug groups: pick the canonical file (usually newest), mark the others
status: superseded+superseded_by, archive them. - Frontmatter lint: add the missing frontmatter/description from the file body.
Step 3: judgment findings (propose, do not force)
- ACTIVE NOW over cap / stale entries: propose which lines to demote (fold any hot-only detail into the topic file FIRST, then replace the line with an index entry). Demote without asking only when the entry itself says done/shipped/verified and its newest date is > 14 days old. Otherwise list the proposal.
- MEMORY.md over the 10KB soft target: tighten wording, demote, or drop pins. Never silently delete a rule line.
Step 4: verify and log
- Re-run the doctor. The pass is done when mechanical warnings are gone (judgment items may remain as listed proposals).
- Append a dated entry to
MEMORY-MAINTENANCE.md: warnings before -> after, what moved/merged, open judgment items.
Hard rules
- NEVER delete a memory file. Archive means move to
_archive/. - Index line and file change in the same edit, always (no new orphans).
- This skill maintains the system, it does not write new memories (that is
remember).
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.

