consolidate-memory
Installation
SKILL.md
Consolidate Memory Files
Goal: Memory file hygiene pass that detects duplicates, stale entries, index drift, and links pointing at files that no longer exist - proposing cleanup actions with human approval gates.
Data directory (resolve once): $THROUGHLINE_DATA_DIR if set, else <project-root>/.claude/throughline/. Below, DATA refers to that path.
Handles memory file hygiene for project memories, scanning for duplicates, stale entries, unindexed orphans, index orphans, and dangling wikilinks in ~/.claude/projects/<project-slug>/memory/.
Problem Types Scanned
- Duplicates: Similar descriptions (>80% text similarity) across multiple files → Merge into canonical entry
- Stale entries: Files with
originSessionIdolder than 90 days without updates → Flag for review/update - Unindexed orphans:
.mdfiles present but not linked in MEMORY.md → Add to index or mark obsolete - Index orphans: MEMORY.md links to non-existent files → Remove from index
- Dangling wikilinks: a
[[target]]in any memory file whosetargetmatches the frontmattername:of no file in the memory directory → Repoint to the file that now holds that content, or list it for the operator. This skill's own phases delete a file when a merge removes a duplicate, and another skill or an earlier session may have split or renamed a topic file - so a pass that fixes the index can silently kill every inbound link to a file that no longer exists, and none of the four other scans notices.