agentsclimarketplace

Claude code checkpointing

Skill ucsandman/claude-code-capability-primer/skills/claude-code-checkpointing

Claude Code plugin: injects a capability self-awareness card at session start so Claude actually knows and uses its built-in capabilities — skills, subagents, dynamic workflows, hooks, MCP, plugins, GitHub Actions, the Agent SDK, and more.

Install
npx -y skills add ucsandman/claude-code-capability-primer --skill claude-code-checkpointing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when you need to undo code edits, explore alternatives without losing a starting point, recover from a bad edit path, or restore previous conversation state — press Esc Esc or run /rewind to open checkpoints menu.

SKILL.md

4.0 KB, 843 tokens by cl100k_base, as published. Nobody here has run it

Claude Code Checkpointing and Rewind

What It Does

Checkpointing automatically snapshots your code state before each Claude edit. You can rewind to any prior checkpoint to restore code and/or conversation history, or compress part of the conversation to free context without changing files.

How It Works

  • Every user prompt creates a new checkpoint automatically
  • Checkpoints track only direct file edits made by Claude (via Edit/Write/MultiEdit tools)
  • Checkpoints do NOT track bash commands (rm, mv, cp, etc.) or manual edits outside Claude Code
  • Checkpoints persist across sessions (stored 30 days by default; configurable)
  • External side effects (DB changes, git pushes, emails) are never undone by rewind

Invoke Rewind

Command: /rewind or press Esc twice when the prompt input is empty

Opens a menu listing every prompt in the session. Select one, then choose an action:

ActionEffect
Restore code and conversationRevert both file edits and chat history to that point
Restore conversationKeep current code, rewind chat to that point
Restore codeKeep chat, revert file edits to that point
Summarize from hereCompress this message onward into a summary; keep earlier messages intact
Summarize up to hereCompress everything before this message into a summary; stay at end of chat
Never mindReturn to menu without changing anything

After restore, the original prompt from that checkpoint is placed in your input field for re-sending or editing.

Restore vs. Summarize

Restore = undo. Reverts file state (or conversation, or both) on disk.

Summarize = compress. Replaces old messages with an AI-generated summary. Original detail is preserved in the transcript so Claude can reference it, but the context window is freed. Optionally guide the summary with your own instructions. (Similar to /compact, but targeted to one side of a checkpoint.)

When to Use

  • Explore alternatives: try a different implementation, then rewind if it doesn't work
  • Recover from mistakes: undo a broken edit path without manually reverting files
  • Iterate safely: experiment knowing you can snap back to a working state
  • Free context: compress verbose early discussion while keeping recent work in full detail

Limitations

Bash changes are not tracked. If Claude (or you) runs:

rm file.txt
mv old.txt new.txt
cp source.txt dest.txt

Rewind cannot undo these — only Claude's direct file edits are captured.

Manual and concurrent edits not tracked. Changes made outside Claude Code (in an editor or other session) are not captured unless they happen to touch the same files Claude edited.

Not a replacement for git. Checkpoints are session-local undo. For permanent history, collaboration, and long-term safety:

  • Use git for commits, branches, permanent history
  • Use checkpoints for quick session-level recovery ("local undo")

How It Integrates With Git

  • Checkpoints operate at the session level; they don't interact with git directly
  • Global git hooks (ruff/vulture on Python) run on commits and code review, independent of checkpointing
  • Rewind restores files to their in-memory state, but doesn't stage or commit; use /commit to save after restoring
  • For multi-session safety, commit working code to git before stepping away; checkpoints expire after 30 days

Safe Mental Model

  • Use /rewind to recover from a bad edit path within the current session
  • Use /fork-session (or --fork-session flag) to try a direction while preserving the original session
  • Use git reset or revert for permanent history recovery
  • Use /compact to summarize the entire conversation; use /rewind summarize to compress a specific section

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.