session-recover

Installation
SKILL.md

/session-recover — Manually merge duplicate Claude Code project directories

Claude Code stores per-project session transcripts and persistent memory under ~/.claude/projects/{encoded-cwd}/. The encoded cwd is the absolute path with every non-alphanumeric character replaced by -. Two different cwd paths that point at the same logical project (a real directory + its symlink mirror, an external-mount path + a ~/Projects/ shortcut, a Linux user moving from /home/me to /Users/me, etc.) produce two completely separate namespaces — separate session lists in /resume, separate memory dirs, no cross-visibility.

This skill cleans that up: detect the duplicates, unify the memory into the canonical location, archive the orphan transcripts, and capture the lesson so future sessions don't re-create the split.

When this skill applies

  • You opened a session and the memory dir is empty, but you remember adding entries in past sessions
  • claude --resume shows fewer sessions than you expect
  • You find two ~/.claude/projects/-*-foo/ directories whose trailing tokens match
  • Cross-session memory references in conversation don't resolve ([[some-memory]] links to nothing)
  • A grep for the project name across ~/.claude/projects/ returns multiple matches

If none of the above hold, the skill has nothing to do — exit early and tell the user.

Core principle

Related skills
Installs
1
Repository
ngmeyer/skills
First Seen
Today
session-recover — ngmeyer/skills