Moved your project folder and
claude --resumestopped working? This tool fixes that.
A Claude Code skill that migrates project folders while preserving conversation history.
When you move a project folder, Claude Code loses access to your conversation history because it stores conversations in ~/.claude/projects/ using path-encoded folder names.
Common symptoms:
claude --resumeshows "No conversations found"claude --continuecan't find previous sessions- Conversation history disappears after renaming or moving a project
This tool automatically migrates both storage systems:
- Claude Code native (
.jsonlfiles) - always migrated - cccmemory MCP (
.cccmemory.dbfiles) - migrated if present, skipped otherwise
Note: cccmemory is an optional MCP server for conversation memory. If you don't use it, the script will simply skip that step.
- Automatic path encoding for both storage systems
- Dry-run mode to preview changes
- Automatic backup before migration
- Handles SQLite WAL files (
.db-shm,.db-wal) - GitHub repo rename (optional) - Sync local folder name with GitHub repo name
Copy the skill folder to your Claude Code skills directory:
# Example location
cp -r claude-code-project-migrator ~/.claude/skills/Or add the path to your Claude Code settings.
Just tell Claude what you want to do:
Move pacecalculator to D:\mywork\
Migrate my-project from 01_active to root
# Preview changes (recommended first step)
python scripts/migrate_project.py "D:\mywork\old\project" "D:\mywork\project" --dry-run
# Execute migration
python scripts/migrate_project.py "D:\mywork\old\project" "D:\mywork\project"
# Skip backup
python scripts/migrate_project.py "D:\mywork\old\project" "D:\mywork\project" --no-backup
# Rename folder AND GitHub repo
python scripts/migrate_project.py "D:\mywork\old-name" "D:\mywork\new-name" --rename-githubWhen you rename a folder (not just move it), you can optionally sync the GitHub repo name:
# Just move (same name) - GitHub rename skipped automatically
python scripts/migrate_project.py "D:\mywork\01_active\project" "D:\mywork\project"
# Rename folder AND GitHub repo
python scripts/migrate_project.py "D:\mywork\old-name" "D:\mywork\new-name" --rename-githubRequirements for --rename-github:
- GitHub CLI (gh) installed and authenticated
- The repo must be on GitHub (not GitLab, Bitbucket, etc.)
- Test with
claude --resumein the new location - Delete old folders after verification
Claude Code uses two different path encoding systems:
| System | Encoding | Example | Required |
|---|---|---|---|
| Claude native | D--mywork-path |
D:\mywork\project becomes D--mywork-project |
Yes |
| cccmemory | D-mywork-path |
D:\mywork\project becomes D-mywork-project |
Optional |
The script auto-detects which systems are in use and handles them appropriately:
.jsonlfiles go toD--folder.cccmemory.db*files go toD-folder (if present)
- Windows 10/11 (path encoding is Windows-specific)
- Python 3.6+
- No external dependencies
- Backup behavior: Running migration twice will overwrite the previous backup. Save important backups manually before re-running.
- macOS/Linux: Not supported. The path encoding logic is Windows-specific (
D:\style paths).
- Claude Code Issue #1516 - Feature request for built-in directory migration
- Migration Guide Gist - Manual migration explanation
MIT