원클릭으로
checkpoint
// Cursor-style checkpoint & undo for Claude Code. Instantly revert to any previous state. Trigger: '/checkpoint', '/cp', 'undo changes', 'revert changes', 'go back to before', 'restore previous version', 'undo last prompt'.
// Cursor-style checkpoint & undo for Claude Code. Instantly revert to any previous state. Trigger: '/checkpoint', '/cp', 'undo changes', 'revert changes', 'go back to before', 'restore previous version', 'undo last prompt'.
| name | checkpoint |
| description | Cursor-style checkpoint & undo for Claude Code. Instantly revert to any previous state. Trigger: '/checkpoint', '/cp', 'undo changes', 'revert changes', 'go back to before', 'restore previous version', 'undo last prompt'. |
| argument-hint | [list|undo|undo N|diff N|status|clean] |
| allowed-tools | Bash, Read, Write |
Auto-snapshots your files before each prompt. Revert instantly — no tokens wasted, no reimplementation.
/checkpoint or /cp — List all checkpointsCLAUDE_SESSION_ID="${CLAUDE_SESSION_ID}" PROJECT_ROOT="${PWD}" node "${CLAUDE_SKILL_DIR}/../../scripts/store.js" list
Display the result as a formatted table:
# | Time | Files | Preview
---|------------|-------|--------
1 | 14:23:01 | 0 | session start
2 | 14:23:45 | 3 | Add auth to login page...
3 | 14:25:12 | 5 | Refactor the header comp...
/checkpoint undo or /cp undo — Undo last prompt's changesCLAUDE_SESSION_ID="${CLAUDE_SESSION_ID}" PROJECT_ROOT="${PWD}" node "${CLAUDE_SKILL_DIR}/../../scripts/store.js" undo
This restores all files to their state at the most recent checkpoint (before the last prompt ran). Files created by the last prompt are deleted. A safety checkpoint is auto-created first so the undo itself can be undone.
Display result: "Restored to checkpoint #N. X files restored, Y new files removed."
/checkpoint undo N or /cp undo N — Undo to specific checkpointCLAUDE_SESSION_ID="${CLAUDE_SESSION_ID}" PROJECT_ROOT="${PWD}" node "${CLAUDE_SKILL_DIR}/../../scripts/store.js" restore N
Replace N with the checkpoint number. Restores all tracked files to their state at checkpoint N. All files created after checkpoint N are deleted.
Display result: "Restored to checkpoint #N. X files restored, Y new files removed."
/checkpoint diff N or /cp diff N — See what changed since checkpoint NCLAUDE_SESSION_ID="${CLAUDE_SESSION_ID}" PROJECT_ROOT="${PWD}" node "${CLAUDE_SKILL_DIR}/../../scripts/store.js" diff N
Shows which files differ between checkpoint N and the current state, with line count changes.
/checkpoint status or /cp status — Show checkpoint statsCLAUDE_SESSION_ID="${CLAUDE_SESSION_ID}" PROJECT_ROOT="${PWD}" node "${CLAUDE_SKILL_DIR}/../../scripts/store.js" status
Shows: session ID, number of checkpoints, tracked files count, storage used.
/checkpoint clean or /cp clean — Clean up all checkpointsCLAUDE_SESSION_ID="${CLAUDE_SESSION_ID}" PROJECT_ROOT="${PWD}" node "${CLAUDE_SKILL_DIR}/../../scripts/store.js" cleanup
Removes all checkpoint data for the current session.
When the user says things like:
/checkpoint undo/checkpoint undo N/checkpoint diff with the last checkpoint/checkpoint undoOld checkpoints are automatically pruned to prevent unbounded disk growth. After each new checkpoint is created, if the total count exceeds the limit, the oldest checkpoints are removed.
CHECKPOINT_MAX to a custom number (e.g. CHECKPOINT_MAX=100)~/.claude-checkpoints/<session-id>/CHECKPOINT_MAX limit)