← ClaudeAtlas

move-projectlisted

Move or rename the current project folder without losing the Claude Code data keyed to its old path — session logs, memory and subagent history — by working out the new data directory name and printing the two moves for the user to run from outside the session. TRIGGER when: the user wants to move, rename or relocate the folder of the project they are working in, or asks what happens to their session history and memory if they do. DO NOT TRIGGER when: renaming the GitHub repository without moving the local folder, moving files around inside the project, or creating a new project (that is `github-create`).
AnotherSava/claude-code-common · ★ 1 · AI & Automation · score 74
Install: claude install-skill AnotherSava/claude-code-common
# Move/Rename Project Move or rename the current project folder while preserving all associated Claude Code data (session logs, memory, subagent history). ## Context - Current project path: !`pwd -W 2>/dev/null || pwd` - Platform: !`uname -s` ## Process 1. **Ask for the new location.** If the user didn't provide one as an argument, ask: > Where should I move this project? Provide a new folder path (relative or absolute) or just a new name (keeps the same parent directory). 2. **Resolve paths.** Determine: - `OLD_PATH`: **Current project path** from Context. It uses `pwd -W` where that exists, because on Git Bash a plain `pwd` yields `/d/work/my-app`, which mangles to `-d-work-my-app` instead of `D--work-my-app` — the reference below says so explicitly, and the wrong key names a directory that does not exist - `NEW_PATH`: the target — if the user gave just a name, resolve it relative to the parent of `OLD_PATH` - Validate that `NEW_PATH` does not already exist (`test -e "NEW_PATH"`) 3. **Compute Claude data directory names.** Apply the path-mangling rule documented in `~/.claude/skills/skill/references/claude-project-memory-paths.md` to both `OLD_PATH` and `NEW_PATH` to derive `OLD_KEY` and `NEW_KEY`. That file is the canonical reference for the mangling rule, the cross-platform CWD recipe, and common mistakes. 4. **Preview and confirm.** Show the user what will happen: ``` Project folder: OLD_PATH → NEW_PATH Claude data: ~/.claude/projects/OLD