justinstimatze

Claude Mv — Development skill for Claude Code

Development community

Update Claude Code's internal state when a project directory moves.

How to install Claude Mv

This entry records only its repository, not the path inside it, so there is no exact command to give. Open justinstimatze/claude-mv and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Mv does

Update Claude Code's internal state when a project directory moves. Covers all 9 layers.

Alternatives in Development

  • Project-Level Skills — This directory contains skills for developing and maintaining the claude-mem project itself, not skills that a 39.3k ★
  • Agent.Extras.Workdir Structure — File structure of working directory {{folder}} 19k ★
  • LifeOS — ⛰️ The Life Operating System — an intent engineering platform that moves you from your current state to your i 18.7k ★

README

claude-mv

Update Claude Code's internal state when a project directory moves.

When you `mv` or rename a project directory, Claude Code loses track of your sessions, memory, and settings because its internal state is keyed to the absolute path. `claude-mv` rewrites all 9 layers of path-dependent state so that `claude --continue` works seamlessly from the new location.

This solves [anthropics/claude-code#1516](https://github.com/anthropics/claude-code/issues/1516).

Installation

claude-mv is a single Python script with no dependencies beyond Python 3.11+.

# Download the script
curl -fsSL https://raw.githubusercontent.com/justinstimatze/claude-mv/main/claude-mv -o claude-mv
chmod +x claude-mv

# Move it somewhere on your PATH
mv claude-mv ~/.local/bin/

Usage

First, move your project directory with `mv`, then run `claude-mv` to update Claude Code's state:

# Move the directory yourself
mv ~/projects/myapp ~/work/myapp

# Then update Claude Code's state
claude-mv ~/projects/myapp ~/work/myapp

Auto-detect old path

If you only provide the new path, claude-mv will scan Claude Code's state to find the old path automatically:

claude-mv ~/work/myapp

Dry run

Preview what would change without modifying anything:

claude-mv ~/projects/myapp ~/work/myapp --dry-run

JSON output

Get machine-readable output on stdout (logs still go to stderr):

claude-mv ~/projects/myapp ~/work/myapp --json

Force mode

Proceed even if active Claude Code sessions are detected:

claude-mv ~/projects/myapp ~/work/myapp --force

What It Covers

claude-mv updates all 9 layers of Claude Code's path-dependent state:

  1. Project directory -- ~/.claude/projects// rename and deep merge
  2. JSONL transcripts -- cwd and file_path fields in session logs
  3. Subagent transcripts -- stale paths in subagent .jsonl and .meta.json files
  4. Memory files -- path references in