fangdididi

Undo Ticket — AI skill for Claude Code

AI community

Agent skill: before an AI agent runs anything it can't take back, sort it GO/TICKET/BLIND/ONE-WAY, snapshot and rehearse the restore, and allow it only with a matching undo ticket.

How to install Undo Ticket

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

What Undo Ticket does

Agent skill: before an AI agent runs anything it can't take back, sort it GO/TICKET/BLIND/ONE-WAY, snapshot and rehearse the restore, and allow it only with a matching undo ticket. Hook + edit fence + drill.

Alternatives in AI

  • Omniget — Udemy & Hotmart course downloader, YouTube downloader (yt-dlp GUI, 1,800+ sites) + desktop app for AI agents 13.9k ★
  • Openclaw Backup — One-click backup & restore for OpenClaw instances — workspace, credentials, skills, agent history 660 ★
  • Openase — Ticket-Driven Automated Software Engineering 265 ★

README

undo-ticket

**English** | [简体中文](README.zh-CN.md)

An agent skill that asks one question before an AI agent runs anything it cannot take back: **how exactly do we put it back, and have we checked that the way back works?** Risky commands run only with a matching, rehearsed, unexpired *undo ticket*. Commands with no way back need a named human.

Why

Blocklists catch `rm -rf /` and then leave the agent stuck on every legitimate cleanup. undo-ticket does the opposite: it lets the agent do the work, as long as it first saves the current state, proves the restore works once, and keeps the receipt. The result is fewer scary refusals and far fewer lost afternoons.

Features

  • Four reversibility classes: GO, TICKET, BLIND, ONE-WAY. A compound command takes the class of its worst piece.
  • Reads commands like a shell does: splits on ; && || pipes and newlines, strips sudo / env / time / nohup / timeout, opens bash -c, $( ), backticks and xargs, finds SQL in psql -c / mysql -e and deletes inside python -c. Quoted text stays data.
  • Covers the usual disasters: recursive and wildcard deletes, find -delete, git reset / clean / checkout . / stash clear / branch -D / history rewrites, force-push and remote deletes, DROP / TRUNCATE / DELETE or UPDATE without WHERE, FLUSHALL, Kubernetes and Helm deletes, Docker volumes, Terraform / Pulumi destroy, S3 / GCS / cloud deletes, rsync --delete, dd / mkfs / shred, recursive chmod, crontab -r, package publishing.
  • Ticket drafts with recipes for each family (tar, git branch + stash, pg_dump, kubectl get -o yaml, volume tar, crontab export, Terraform state).
  • Ticket linter: fingerprint match, scope, preview evidence, snapshot artifact on disk, restore + verify, rehearsal recorded, class not understated, expiry, named approval for one-way doors.
  • Pre-tool hook for Claude Code (and a Cursor output format), fail-closed,