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 64 stars 16 forks Updated today MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
60
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
4 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