claude-project-migrate
Installation
SKILL.md
Claude Project Migration
Claude Code stores per-project data in ~/.claude/projects/<encoded-path>/.
Moving a project directory breaks this link. This skill automates the migration.
Path Encoding Rules
- Take the absolute path (e.g.,
/Users/kc/projects/my-app) - Replace every non-alphanumeric character with
-(regex:/[^a-zA-Z0-9]/g) - Result:
-Users-kc-projects-my-app - If result exceeds 200 characters: truncate to 200 chars +
-<djb2-hash-base36>
Migration Script
scripts/migrate.py — pure Python 3, no external dependencies.
# Preview (always do this first)
python3 scripts/migrate.py /old/path /new/path --dry-run