checkpoint
/checkpoint
Section titled “/checkpoint”Purpose
Section titled “Purpose”Save and restore conversation context using git-based checkpoints. Enables session recovery and state preservation for complex, multi-session work.
Manage checkpoints for the current work session.
Checkpoint Operations
Section titled “Checkpoint Operations”Save Checkpoint
Section titled “Save Checkpoint”Create a checkpoint of current state:
/checkpoint save [name]Process:
- Create git stash with descriptive message
- Record current context (files being worked on, task state)
- Save checkpoint metadata to
.claude/checkpoints/[name].json
Metadata Format:
{ "name": "feature-auth", "created": "2024-01-15T14:30:00Z", "git_stash": "stash@{0}", "files_in_context": ["src/auth/login.ts", "src/auth/token.ts"], "current_task": "Implementing JWT refresh", "notes": "User-provided notes"}List Checkpoints
Section titled “List Checkpoints”Show available checkpoints:
/checkpoint listOutput:
## Available Checkpoints
| Name | Created | Task | Stash ||------|---------|------|-------|| feature-auth | 2h ago | JWT refresh | stash@{0} || bugfix-login | 1d ago | Login timeout | stash@{1} |Restore Checkpoint
Section titled “Restore Checkpoint”Restore a previous checkpoint:
/checkpoint restore [name]Process:
- Apply git stash
- Load checkpoint metadata
- Summarize restored context
- Ready to continue work
Delete Checkpoint
Section titled “Delete Checkpoint”Remove a checkpoint:
/checkpoint delete [name]| Flag | Description |
|---|---|
--notes="[text]" | Add notes to checkpoint |
--force | Overwrite existing checkpoint |
--include-uncommitted | Include uncommitted changes |
--dry-run | Show what would be saved |
Usage Examples
Section titled “Usage Examples”/checkpoint save auth-progress # Save current state/checkpoint save auth --notes="WIP tokens" # Save with notes/checkpoint list # Show checkpoints/checkpoint restore auth-progress # Restore state/checkpoint delete old-checkpoint # Remove checkpointArguments
Section titled “Arguments”$ARGUMENTS
Parse the operation (save/list/restore/delete) and checkpoint name.
Auto-Checkpoint
Section titled “Auto-Checkpoint”For complex tasks, checkpoints are automatically suggested:
- Before major refactoring
- When switching contexts
- Before risky operations
- At natural breakpoints
Best Practices
Section titled “Best Practices”- Name Descriptively: Use task-related names
- Add Notes: Future you will thank present you
- Checkpoint Often: Before context switches
- Clean Up: Delete obsolete checkpoints
Recovery Workflow
Section titled “Recovery Workflow”When resuming work:
1. /checkpoint list # See available states2. /checkpoint restore [name] # Restore context3. Continue where you left off # Context is loadedLimitations
Section titled “Limitations”- Checkpoints use git stash (requires git repo)
- Large uncommitted changes may be slow
- Metadata stored in
.claude/checkpoints/ - Consider committing before checkpointing for safety
Gap Analysis Rule
Section titled “Gap Analysis Rule”Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.