← ClaudeAtlas

memory-prunelisted

Audit project memory files for stale entries — when cited PRs merge, bugs fix, or files disappear. Proposes archival or deletion per entry. Read-only by default; prompts before changing. Use periodically (monthly) or when memory recall contradicts current code. Pairs with sync-memories (fresh notes) and adt-rag-drift (RAG index handling).
LucasSantana-Dev/sharekit · ★ 1 · AI & Automation · score 70
Install: claude install-skill LucasSantana-Dev/sharekit
# memory-prune Project memory files at `~/.claude/projects/<encoded-cwd>/memory/*.md` accumulate `feedback_*` and `project_*` notes faster than they decay. Entries cite PRs that have merged, branches that have been deleted, gotchas that have been patched. Future sessions follow them as if they were still current and waste effort re-discovering they're not. This skill audits the memory dir, classifies each entry, and proposes archival. ## When NOT to run - Memory dir has <10 files → noise budget is low; not worth auditing. - All entries are <30 days old → too soon to expire anything. - A `memory-prune` audit ran in the last 30 days and was acted on → nothing has aged out yet. - The user is mid-task → don't archive entries you might cite minutes later. ## Inputs - **Memory dir** (auto-detected from `$PWD`): `~/.claude/projects/$(pwd | tr '/' '-' | sed 's/^-//' | sed 's/^/-/' )/memory/` - **MEMORY.md index** (in same dir): the human-readable index that points at each file - **Repo for cite-validation** (auto-detected from `gh repo view`): used to query PR / branch / commit state ## Classification rules For each `*.md` file in the memory dir, read its frontmatter + body and classify: | Verdict | Trigger | Action | |---------|---------|--------| | **archive** | Cited PR is `MERGED` AND the gotcha was patched as part of that PR | Move to `memory/archive/<YYYY-MM-DD>-<file>.md` | | **archive** | Cited branch no longer exists on origin | Move to archive | | **archive** | Cit