/cpr:preserve [quick]from CPR: Compress, Preserve & Resume
Writes durable session learnings into CLAUDE.md, keeping it short and archiving stale sections. Run after important decisions or when project status changes.
Ships in CPR: Compress, Preserve & Resume. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Update the project's CLAUDE.md with what this session taught that every future session should know from the first message. CLAUDE.md is loaded at the start of every session and re-injected after compaction, so it is the right home for status, decisions, conventions and next steps, and the wrong home for narrative or anything the code already says.
!python3 "${CLAUDE_PLUGIN_ROOT}/scripts/cpr_paths.py"
$ARGUMENTS containing quick means: skip the question, preserve every category that has real content.
Look in project_root for CLAUDE.md, Claude.md, or .claude/CLAUDE.md. If none exists, ask with AskUserQuestion whether to create one at {project_root}/CLAUDE.md or to print the notes into the conversation instead. If the user chooses the conversation, write the same content as a short markdown block and stop.
Ask once with AskUserQuestion, multi-select, header "Preserve". Options: Phase/Status Changes, Key Decisions, New Files/Structure, Patterns/Insights, Blockers/Warnings, Next Steps. Recommend the ones this session produced.
Read the current CLAUDE.md and match its structure and voice. Update existing sections in place rather than appending duplicates. Every addition should be something a future session would otherwise have to rediscover or be told again:
Leave out implementation detail, full file contents, timestamps, and anything the code or git history already records. Point to files instead of copying them. Keep exact values for paths, flags and identifiers.
Edit the file directly, then report:
CLAUDE.md updated
Preserved:
- {what changed}
CLAUDE.md is now {X} lines (target: under 200)
Claude Code recommends CLAUDE.md files under 200 lines for adherence. After editing, check wc -l. If the file is over 200 lines:
## Session Notes (DATE) sections older than 7 days, ## Completed Projects, and any section whose heading contains (ARCHIVABLE).(PROTECTED), or the core sections: Approach, Philosophy, Paths, Structure, Key References, Links, Skills, Commands, Key Patterns, Conventions. Adapt the list to the names the file actually uses.Archived sections go to {project_root}/CLAUDE-Archive.md, appended under a ## Archived: {date} heading, and are removed from CLAUDE.md. Create the archive file with a one-line intro if it does not exist.
Print a compact preservation block to the conversation with the selected categories and a two-sentence resume context, then suggest creating a CLAUDE.md so it persists.
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/compressSave this session to a searchable CPR log with a curated summary plus the raw transcript. Run before /compact or before ending a session. Add "quick" to skip the questions./resumeLoad context from recent CPR session logs, and search past sessions by topic. Use at the start of a session or when you need to know what happened before.npx claudepluginhub eliaalberti/cpr-compress-preserve-resume --plugin cprOther plugins' skills for the same job