Pi Rewind Hook
Description
Pi agent hook for rewinding file changes during coding sessions
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Rewind Hook
A Pi agent hook that enables rewinding file changes during coding sessions. Creates automatic checkpoints using git refs, allowing you to restore files to previous states while optionally preserving conversation history.
Screenshots


Requirements
- Pi agent v0.18.0+
- Node.js (for installation)
- Git repository (checkpoints are stored as git refs)
Installation
npx pi-rewind-hook
This will:
- Create
~/.pi/agent/hooks/rewind/ - Download the hook files
- Add the hook to your
~/.pi/agent/settings.json
Alternative Installation
Using curl:
curl -fsSL https://raw.githubusercontent.com/nicobailon/pi-rewind-hook/main/install.js | node
Or clone the repo and configure manually:
git clone https://github.com/nicobailon/pi-rewind-hook ~/.pi/agent/hooks/rewind
Then add to `~/.pi/agent/settings.json`:
{
"hooks": ["~/.pi/agent/hooks/rewind/index.ts"]
}
Platform Notes
**Windows:** The `npx` command works in PowerShell, Command Prompt, and WSL. If you prefer curl on Windows without WSL:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/nicobailon/pi-rewind-hook/main/install.js" -OutFile install.js; node install.js; Remove-Item install.js
How It Works
Checkpoints
The hook creates git refs at two points:
- Session start - When pi starts, creates a "resume checkpoint" of the current file state
- Each turn - Before the agent processes each message, creates a checkpoint
Checkpoints are stored as git refs under `refs/pi-checkpoints/` and are pruned to keep the last 100.
Rewinding
To rewind:
- Type
/branchin pi - Select a message to branch from
- Choose a restore option:
**For messages from the current session:**
| Option | Files | Conversation |
|---|---|---|
| Restore all (files + conversation) | Restored | R |
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11