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.00708 |
| Opus 5.5 | $0.00012 | $0.00283 |
| Sonnet 5.5 | $0.00006 | $0.00142 |
| Haiku 4.5 | $0.00003 | $0.00071 |
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 1mo 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 — 131 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.
Pre-flight
git rev-parse --is-inside-work-tree
If not in a git repo, stop:
not a git repo. /undo-commit requires a git repository.
Verify HEAD has a parent (can't undo the initial commit):
git rev-parse HEAD^ 2>/dev/null
If this fails: refused: HEAD is the initial commit. nothing to undo.
Verify HEAD is not a merge commit (undoing a merge is destructive in a non-obvious way — bounce to the user):
git rev-list --parents -n 1 HEAD | awk '{print NF-1}'
If output >= 2: refused: HEAD is a merge commit. use git reset --hard ORIG_HEAD manually if you understand the consequences.
Verify HEAD is not already on the remote (cannot soft-undo a published commit without rewriting public history):
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null
If a tracking branch exists, check whether HEAD is reachable from upstream:
git merge-base --is-ancestor HEAD @{u}
If exit 0 (HEAD already on remote): refused: HEAD is already pushed to <upstream>. /undo-commit only undoes local commits. use git revert <sha> for a published commit.
Confirm
Show what's about to be undone:
git log -n 1 --format=' %h %s%n %an, %ar%n%n Files:%n' HEAD
git diff --stat HEAD^..HEAD
Ask via AskUserQuestion:
Undo this commit? Changes will be moved back to the staging area.
- Yes, undo
- No, keep it
On No: print kept. and stop. No action.
Action
On Yes:
git reset --soft HEAD~1
Report
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>
Rules
--softonly. Never--mixed, never--hard. The user's work stays in the index where it's visible and recoverable.- Refuse on initial commit, merge commit, or pushed HEAD. These cases need human judgment.
- One commit per invocation. To undo multiple, run again — the per-invocation confirm forces deliberate steps.
- Print every git command before running it.
- Do not stage, do not commit, do not push. After
git reset --soft, control returns to the user. - This is the only command that mutates history. Treat it as destructive (axiom 3) — never act without the per-item Yes.
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.
- 1mo 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 (112 stars, last pushed 8d ago), licensed MIT. It adds 31 tokens to every session and 708 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.
Other commands, from other repositories
autocommit
Toggle auto git commits on/off for this project. Run without args to see status, or with "on"/"off" to set.
simplify-transform
Apply verified simplifications with user approval. Part of simplify- family.
fix-tests-execute
Phase 2 of fixing-tests: Fix Execution - investigate, classify, fix, verify, and commit each work item.
verify
Run verification commands and confirm output before making success claims. Use before committing, creating PRs, or claiming work is complete. Evidence before assertions, ALWAYS.
commit
Based on the above changes, create a single git commit.
ccc-parallel
Run several Claude Code agents at once, each in its own git worktree and branch, then merge the results through one coordinator. Use when you have independent tasks to develop concurrently.