vladtarrow

Undo Anything — Git skill for Claude Code

Git community

Undo, redo and a timeline for any coding agent (Claude Code, Codex CLI, Gemini CLI, OpenCode, or anything else), via git snapshots in hidden refs.

How to install Undo Anything

This entry records only its repository, not the path inside it, so there is no exact command to give. Open vladtarrow/undo-anything and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Undo Anything does

Undo, redo and a timeline for any coding agent (Claude Code, Codex CLI, Gemini CLI, OpenCode, or anything else), via git snapshots in hidden refs. Catches shell-command edits that built-in undo misses, never touches your branch, index or stash, restores byte-exact. Windows-first, no network.

Alternatives in Git

  • Epic Sync — Sync epic issue bodies, labels, and local coordination snapshots from GitHub 243.5k ★
  • Claude Relay Service — GitHub Repo stars Self-built Claude code mirror service supporting multi-account switching Relay service 9.9k ★
  • Destructive Command Guard — The Destructive Command Guard (dcg) is for blocking dangerous git and shell commands from being executed by ag 869 ★

README

**English** | [简体中文](README.zh-CN.md) | [Español](README.es.md) | [Deutsch](README.de.md) | [Français](README.fr.md) | [Italiano](README.it.md) | [Português](README.pt-BR.md)

undo-anything

Undo, redo and a timeline for any coding agent, via git snapshots. Works with Claude Code, Codex CLI, Gemini CLI, OpenCode and anything else that edits your files, including the edits their built-in undo does not track, such as shell commands. You run it from your own terminal.

[![CI](https://github.com/vladtarrow/undo-anything/actions/workflows/ci.yml/badge.svg)](https://github.com/vladtarrow/undo-anything/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

![An agent turn edits two files and deletes a folder; undo-anything timeline lists each step; undo --turn puts everything back](docs/demo.svg)

*A real run, recorded by [`scripts/demo.ts`](scripts/demo.ts) and saved as text in [`docs/demo.txt`](docs/demo.txt). The agent turn goes through `undo-anything hook claude` with the same JSON that Claude Code sends to its hooks; the temp folder is shown as `~/my-app`.*

Quick start

npm install -g github:vladtarrow/undo-anything
undo-anything install claude      # or: codex, gemini, opencode
undo-anything undo --turn         # after a turn went wrong

The commands are the same in PowerShell and in a macOS or Linux shell. No Node.js? Download the single-file binary for Windows, Linux or macOS from [Releases](https://github.com/vladtarrow/undo-anything/releases) and put it on your `PATH`. Using an agent without hooks? Run `undo-anything watch` in a second terminal instead.

Features

  • One timeline for every agent, and for you. Each snapshot records the agent, the step (Edit, Bash, prompt...), the prompt that started the turn, and the files that changed.
  • Catches what built-in undo misses. Files changed by shell commands (rm -rf, sed -i, code generators, package managers), by subagents, by you be