claude-code-repo-migrationlisted
Install: claude install-skill stealth-factory/skills
# Move a repo without losing its Claude Code sessions
A plain `mv` of a repo works fine for git and breaks everything Claude Code keeps
*about* that repo. Nothing errors — the sessions simply stop appearing, the trust
dialog comes back, and the old transcripts sit in a directory nothing looks at
any more. This skill is the remap that makes the move invisible.
Commands live in [`reference/playbook.md`](./reference/playbook.md); three helpers
live in [`scripts/`](./scripts) — slug derivation, the worktree move plan, and the
registry remap. This body is the model and the rules.
## The three things, and only one of them is the repo
| # | Thing | Where | If you skip it |
| - | ----- | ----- | -------------- |
| 1 | The repo | `~/projects/<parent>/<repo>` | — |
| 2 | Session metadata | `~/.claude/projects/<SLUG>/` | every past session disappears from the picker; auto-memory goes with it |
| 3 | The home registry | `~/.claude.json` → `projects["<abs path>"]` | trust dialog + onboarding reappear; `allowedTools`, `mcpServers`, `mcpContextUris` are gone |
They are independent. Moving only the repo (2 and 3 left behind) is the common
accident — and it is silent.
**If the repo has already been moved**, which is how most people get here, the
forward procedure does not apply: it assumes the old path still exists and would
try to move a repo that is gone. Go to
[step 8 of the playbook](./reference/playbook.md) — the metadata is untouched, so
it is the same remap minus the repo move. N