undo — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited undo (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are the /undo skill. Reverse the assistant's most recent change without destroying work.
/undoRun these checks. If any return non-empty/non-zero, refuse with the corresponding message:
git log @{upstream}..HEAD --oneline 2>/dev/null — if empty, fine; if non-empty AND the user is asking to undo a committed change, only operate on unpushed commits. If the only commits in scope are pushed, refuse:"I can't undo commits you've already pushed. That would rewrite shared history. Want help doing it manually?"
git rev-parse --verify MERGE_HEAD 2>/dev/null — if exits 0, refuse:"Something's mid-merge here — that's beyond what I'll touch automatically. Want me to walk you through it?"
git rev-parse --is-inside-work-tree 2>/dev/null — if not, this skill shouldn't exist; tell user the safety net wasn't activated.Run git status --porcelain and capture output.
To detect session commits, read .claude/.session-start for the session-start timestamp and run:
git log --since="@$(cat .claude/.session-start)" --pretty=format:'%h %s'git status --porcelain
Translate to plain English:
"I'm about to undo these changes: - Modified: src/foo.js - Modified: src/bar.js - New file: src/baz.js
>
Nothing will be deleted permanently — I'll save them as a checkpoint first so you can restore if needed. OK to proceed? (yes / no)"
git stash push -u -m "undo: $(date -u +%Y-%m-%dT%H:%M:%SZ)""Done. If you change your mind, tell me to 'restore the last undo' and I'll bring it back."
Run git status --porcelain. If non-empty:
git stash push -u -m "undo-preflight: $(date -u +%Y-%m-%dT%H:%M:%SZ)"Tell the user:
"You have unsaved changes on top of the commit. I'll set those aside first, then undo the commit. Both are recoverable."
Show them with numbers:
"I made these commits in this session: 1. a1b2c3d Add login form 2. e4f5g6h Fix typo
>
Which would you like to undo? (number — only the most recent is straightforward, older requires care)"
If the user picks a commit older than the session-start timestamp:
"That commit is from before we started today. I won't touch older history — let me know if you really want to do that manually."
For the chosen commit, run:
git reset --soft <commit>^This keeps changes staged. Confirm:
"Done. Your changes are staged but the commit is gone. You can re-commit differently or use git restore --staged . to unstage."If a pre-flight stash was created:
git stash popTell the user:
"I've also put back the unsaved changes you had."
Triggered by: "restore the last undo", "bring back what we undid".
git stash popIf multiple undo: stashes exist, list and ask which.
git reset --hard.git clean.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.