unify-worktree-memory
Original:🇺🇸 English
Translated
2 scriptsChecked / no sensitive code detected
Consolidate Claude Code memory across git worktrees so all branches of the same repo share a single memory directory. Use when memory is isolated per worktree, when switching branches loses context, or when setting up a new machine with worktree-based workflows.
4installs
Sourcebasecamp/skills
Added on
NPX Install
npx skill4agent add basecamp/skills unify-worktree-memoryTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →unify-worktree-memory
Open and follow it. Do not proceed without it.
@references/guide.mdConsolidate 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