Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/damusix/atomic-claudeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/damusix/atomic-claude/undo-commit)<a href="https://agentmods.dev/commands/damusix/atomic-claude/undo-commit"><img src="https://agentmods.dev/badge/commands/damusix/atomic-claude/undo-commit/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/damusix/atomic-claude/undo-commit"><img src="https://agentmods.dev/badge/commands/damusix/atomic-claude/undo-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.00846 |
| Opus 5.5 | $0.00012 | $0.00338 |
| Sonnet 5.5 | $0.00006 | $0.00169 |
| Haiku 4.5 | $0.00003 | $0.00085 |
Grade A, and why
undo-commit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Reverses one commit without losing the work. Equivalent to git reset --soft HEAD~1 with safety guards.
Flow
Only a local, non-merge commit with a parent is undone, and only after the user confirms it.
flowchart TD
G{"Inside a git repo?"} -->|no| X["Stop with<br/>that message"]
G -->|yes| P{"HEAD has a parent?"}
P -->|no| X
P -->|yes| M{"HEAD is a merge?"}
M -->|yes| X
M -->|no| U{"HEAD already pushed?"}
U -->|yes| X
U -->|no| C{"User confirms?"}
C -->|no| K["Print kept."]
C -->|yes| R["Soft reset, report"]
-
Inside a git repo?:
git rev-parse --is-inside-work-tree. No:not a git repo. /undo-commit requires a git repository. -
HEAD has a parent?:
git rev-parse HEAD^ 2>/dev/nullsucceeds. No:refused: HEAD is the initial commit. nothing to undo. -
HEAD is a merge?:
git rev-list --parents -n 1 HEAD | awk '{print NF-1}'prints2or more. Undoing a merge is destructive in a non-obvious way, so it goes back to the user. Yes:refused: HEAD is a merge commit. use git reset --hard ORIG_HEAD manually if you understand the consequences. -
HEAD already pushed?: a soft undo of a published commit would rewrite public history.
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/nullfinds the tracking branch; with none, HEAD is not pushed. With one,git merge-base --is-ancestor HEAD @{u}exiting 0 means pushed. Yes:refused: HEAD is already pushed to <upstream>. /undo-commit only undoes local commits. use git revert <sha> for a published commit. -
User confirms?: show what is about to be undone with
git log -n 1 --format=' %h %s%n %an, %ar%n%n Files:%n' HEADandgit diff --stat HEAD^..HEAD, then ask the user:Undo this commit? Changes will be moved back to the staging area. - Yes, undo - No, keep it -
Print kept.: print
kept.and take no action. -
Soft reset, report:
git reset --soft HEAD~1, then print:undone. HEAD now at <new-sha-short>. prior commit's changes are staged. inspect with: git status, git diff --cached to re-commit: /commit to discard: git restore --staged <paths> then git restore <paths>
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago Changed · -63 lines c5f21d685134
- 3mo ago First seen · 131 lines · 31 tokens per session scan A 1fc57693e90c
undo-commit is a command published in the GitHub repository damusix/atomic-claude (117 stars, last pushed yesterday), licensed MIT. It adds 31 tokens to every session and 846 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
undo-commit compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| undo-commitdamusix/atomic-claude | Command | 117 | yesterday | MIT | A | 31 | Claude Code |
| simplify-transformaxiomantic/spellbook | Command | 13 | 6d ago | MIT | A | 14 | Claude Code |
| fix-tests-executeaxiomantic/spellbook | Command | 13 | 6d ago | MIT | A | 23 | Claude Code |
| commitfuxicodex/Fuxi | Command | 3.2k | 6d ago | none | A | 4 | Claude Code |
| verifyaxiomantic/spellbook | Command | 13 | 6d ago | MIT | A | 31 | Claude Code |
| aligndsswift/ion | Command | 5 | 2d ago | MIT | A | 51 | Claude Code |
| squashdsswift/ion | Command | 5 | 2d ago | MIT | A | 25 | Claude Code |