Directory / Claude community plugins (Anthropic) / preserve-session
preserve-session
Preserves Claude Code session history across project directory renames, moves, and copies by assigning each project a path-independent UUID and maintaining a global registry mapping UUID to current path. Addresses a long-standing pain point: --resume and --continue silently lose session history when paths change. Closes anthropics/claude-code#5768; also tracked in #38089, #28745, #26766, #27883. Commands: /preserve-session:fix recovers sessions after rename/move (with copy detection and automatic .jsonl merge on destination collision), /preserve-session:inherit copies session history from another registered project, /preserve-session:doctor diagnoses hash/registry state and slug collisions including non-ASCII path issues on macOS, /preserve-session:uninstall removes all preserve-session data with a preview-then-confirm safety pattern. A SessionStart hook auto-initializes .claude/hash.txt on first run — zero manual setup. Demo: https://www.youtube.com/watch?v=lWMrzASG7_o Quality signals: 24 verified test scenarios (rename, move, copy, slug collision, non-ASCII paths, registry corruption recovery, full --resume E2E). Atomic registry writes via fcntl.LOCK_EX + tempfile.mkstemp + os.replace. NFC slug normalization to match Claude Code's path encoding on macOS. Python heredoc isolation against shell injection. Symlink-safe uninstall (isinstance/dict guards). Shared helpers in hooks/common.sh with cross-platform Python discovery and uuidgen fallback. Full design rationale, security notes, and test plan are in two related submissions: • https://github.com/anthropics/claude-code/pull/39148 (initial bundled-plugin attempt; comprehensive design + 24-item test plan with collapsible sections) • https://github.com/anthropics/claude-plugins-official/pull/1347 (auto-closed by submission bot; retained as reference for the proposed marketplace.json entry) Plugin location: lives at plugins/preserve-session/ inside the wonbywondev/claude-plugins monorepo. The marketplace entry should use the git-subdir source format pointing to that subdirectory.Description from the marketplace entry / plugin manifest.
Information source
Copied from the Claude community plugins (Anthropic) catalog (anthropics/claude-plugins-community), maintained by Anthropic (community submissions).
- Marketplace entry:
.claude-plugin/marketplace.json
Links are pinned to commit 06ec7b6 (2026-10-13), the version we synced. Not reviewed by us.
Install
Add the marketplace (once, in Claude Code)
/plugin marketplace add anthropics/claude-plugins-communityIn a Claude Code session
/plugin install preserve-session@claude-communityFrom your shell
claude plugin install preserve-session@claude-communityCommands follow each host's documentation (Claude Code, Claude Cowork docs). gh skill needs GitHub CLI 2.90 or later and is in public preview.
Listed from Anthropic (community submissions)'s catalog, not reviewed by us. Read the source before installing.
- Catalog
- Claude community plugins (Anthropic) (
claude-community) - Information source
- marketplace.json in anthropics/claude-plugins-community
- Author
- Not stated in the source
- Source code
- wonbywondev/claude-plugins
- License
- MIT (repository license)
- Repository stars
- 1 for wonbywondev/claude-plugins
- Added to catalog
- 2026-04-17
- Last change
- 2026-10-26 (last push to the repo)
What it contains
Hosted in an external repository, so contents are not counted here. See the source link.
Similar in Software development
- superpowers (Claude community plugin)
- mattpocock-skills (Claude community plugin)
- ponytail (Claude community plugin)
- caveman (Claude community plugin)
- claude-mem (Claude community plugin)
- understand-anything (Claude community plugin)