skills/basecamp/skills/unify-worktree-memory

unify-worktree-memory

SKILL.md

unify-worktree-memory

Open @references/guide.md and follow it. Do not proceed without it.

Consolidate Claude Code's per-project memory across git worktrees so every branch of the same repo shares accumulated knowledge. The solution uses symlinks (Claude Code follows them transparently) and a SessionStart hook for automatic setup of future worktrees.

The guide contains:

  • How Claude Code memory paths work and why worktrees fragment them
  • One-time consolidation script for existing worktrees
  • SessionStart hook for automatic future worktree handling
  • Path encoding rules and prefix collision disambiguation
  • Edge cases: orphaned worktrees, ambiguous repo name prefixes, content merging
Weekly Installs
14
Repository
basecamp/skills
GitHub Stars
4
First Seen
Feb 8, 2026
Installed on
opencode14
gemini-cli14
github-copilot14
codex14
kimi-cli14
amp14