lov-cc-mv

Featured

Move a project folder AND migrate all its Claude Code state in one shot — session store, prompt-up-arrow history, running-session records. Supports both directory-level moves AND session-level cherry-picking (by id, regex on first user prompt, or interactive picker). Use whenever the user wants to rename/move a project directory and keep `claude --resume` working, or wants to move a subset of chats from one project to another. 移动/重命名项目目录并迁移所有 CC 历史,或按 session 粒度把某个话题的对话搬到另一个项目。

AI & Automation 65 stars 17 forks Updated today MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
61
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# lov-cc-mv Two modes in one tool: **Directory-level** (default) — four things in one shot: 1. `mv FROM TO` on disk (fs.renameSync — instant, preserves everything) 2. Rewrites `~/.claude/projects/<slug>/*.jsonl` session store — including every sub-directory slug 3. Rewrites `~/.claude/history.jsonl` (prompt up-arrow recall) 4. Rewrites `~/.claude/sessions/*.json` (running-session records) **Session-level** (opt-in, via `--session`/`--grep`/`--pick`) — migrate a subset of chats: 1. Copies only the selected `.jsonl` files from FROM's slug dir into TO's 2. Rewrites each file's `cwd` from FROM → TO 3. Rewrites only the matching running-session records 4. Does **not** touch `history.jsonl` or `fs mv` (project itself isn't being moved) 5. Sub-dir slugs are ignored (root only by design) Old slug dirs and source sessions are left intact unless `--delete-source` is passed. ## When to Trigger **YES — directory-level** when: - User wants to move/rename a project folder (prospective move — we do the mv) - User already moved the folder externally and CC lost history (post-move recovery — use `--no-mv` or the `cc-migrate-session` alias) - Sub-dir sessions under FROM should come along (handled automatically) **YES — session-level** when: - User wants to migrate only *some* sessions from FROM to TO — identified by id, topic/content, or to be picked interactively - User said "只搬��几个" / "those chats about X" / "not all of them" - User needs to split one project's chat history across tw...

Details

Author
lovstudio
Repository
lovstudio/skills
Created
5 months ago
Last Updated
today
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

claude-code-repo-migration

Move or rename a git repo on disk without losing its Claude Code history — remap the session dir (~/.claude/projects/<slug>/) and the ~/.claude.json projects key so every past session still resumes from the new path with trust, allowedTools and MCP servers intact, and repair the git worktrees the move breaks. Use when moving a repo to a different parent folder, renaming the org/parent directory, reorganising ~/projects, or after a move when: `claude --resume` shows no sessions / the session picker is empty at the new path, the trust dialog or project onboarding reappears, allowedTools or MCP servers were 'forgotten', auto-memory looks empty, or `git worktree list` / a worktree's git commands break. Covers the slug rule people get wrong (EVERY non-alphanumeric char becomes '-', not just '/'), which extra slug dirs a repo owns, backup-then-mutate ordering, and the fact that ~/.claude.json is live-rewritten by every running session.

3 Updated 2 weeks ago
stealth-factory
AI & Automation Listed

move-to-project

Move this conversation into another project directory, rewriting its cwd so it resumes there.

2 Updated 1 weeks ago
SignedAdam
AI & Automation Listed

claude-account-sync

Mirror a workspace AND all Claude Code conversation history (--resume sessions), path references, and resume ordering from one user account to another on the same SSH host, so `claude --resume` on the destination picks up exactly where the source left off. Use this whenever you switch between two accounts on a shared host — because one ran out of quota/credits, or when the user says "sync my account", "switch accounts", "move my conversation history over", or "my resume history is missing after switching". Direction is a parameter (--from / --to), so reach for it in EITHER direction; it also restores a workspace onto a fresh account.

0 Updated 1 months ago
MLliu6