← ClaudeAtlas

memory-tidylisted

Keep Claude Code's always-loaded MEMORY.md index healthy — trim over-length entries, move done work to the archive, fold domains into hub files, and give orphaned notes a pointer so they stay findable. Triggers on "/memory-tidy", "tidy memory", "my memory index is huge", "MEMORY.md is over budget", "orphaned memory notes", "clean up memory". Also run it yourself when the memory guard reports RED or the index approaches its budget. Do NOT touch an index another machine owns — ownership is declared in memory_scope.json, never guessed.
tonydzi/claude-memory-tidy · ★ 0 · Data & Documents · score 72
Install: claude install-skill tonydzi/claude-memory-tidy
# Memory Tidy `MEMORY.md` is loaded into **every** session. It is not a file, it is rent you pay on every turn. Past a fixed size the harness truncates it and says nothing: the tail silently disappears and your agent stops knowing things it "remembers". So this is about **retention**, not tidiness. Three tiers, and only the first one costs tokens continuously: * `MEMORY.md` — **hot dispatcher**, loaded every turn. Target 60–100 lines, one pointer per line, `- [Title](file.md) — hook`, ≤150 chars. * `hub-*.md` — **warm sub-index**, not auto-loaded. A domain of ≥3 related lines lives here. * `MEMORY-archive.md` — **cold**, not auto-loaded, grep-only. Done work + coverage for orphans. ## Step 0 — ownership (skipping this is how you corrupt someone's memory) ```bash python3 ~/.claude/scripts/memory_scope.py --explain ``` `~/.claude/projects/` holds three things that look identical: your own indexes, byte-identical copies **synced from another machine**, and throwaway worktrees. Writing into a synced copy means two writers on one file. Declare ownership in `memory_scope.json`; never infer it. An undeclared machine exits 3 loudly, because a machine that silently tidies nothing looks exactly like a healthy one. ## Step 1 — look before you touch ```bash sh ~/.claude/scripts/memory_tidy.sh --dry-run --force ``` Prints the detectors' verdict and renders the prompt without changing anything. Read the rendered prompt — that is what the model will act on. ## Step 2 — the mecha