Save/load session state for clean context recovery. Triggers: "/checkpoint save [name]", "/checkpoint load <query>", "/checkpoint list"
Capture and restore working state to prevent context pollution.
/checkpoint save [name]Save current state. Name optional (auto-generates if omitted). Suggest checkpointing when context is growing large or before risky changes.
mkdir -p ~/.local/state/claude/checkpoints~/.local/state/claude/checkpoints/<name>-<YYYYMMDD-HHMM>.md# Checkpoint: <name>
Date: <timestamp>
CWD: <pwd>
## Goal
<1-2 sentence summary>
## Current State
- <what's working/tested>
- <files changed>
- Diff stat: <output of `git diff --stat`>
- Last green commit: <SHA where tests last passed>
## Key Decisions
- <decisions and rationale>
## Gotchas
- <pitfalls discovered>
## Next Steps
- <what to do when resuming>
/checkpoint load <query>Find and load checkpoint matching query.
~/.local/state/claude/checkpoints/ for files matching query/checkpoint load (no query)Load most recent checkpoint.
/checkpoint listList recent checkpoints (last 10, newest first).
/checkpoint (no args)Default to save with auto-generated name.