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

  1. Duplicates: Similar descriptions (>80% text similarity) across multiple files → Merge into canonical entry
  2. Stale entries: Files with originSessionId older than 90 days without updates → Flag for review/update
  3. Unindexed orphans: .md files present but not linked in MEMORY.md → Add to index or mark obsolete
  4. Index orphans: MEMORY.md links to non-existent files → Remove from index
  5. Dangling wikilinks: a [[target]] in any memory file whose target matches the frontmatter name: 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.

Phase 1: Determine Scope

Installs
9
First Seen
Aug 8, 2026