rollback

rollback is a command for Claude Code from eddiebelaval/squire. It costs 0 tokens per session (309 once invoked), scanned A, original, MIT.

A guided command for undoing recent Git changes. It reviews recent commits, checks for uncommitted work, and offers either an undo that keeps files changed or one that deletes the changes.

In plain words
What is it for?
Use it to inspect recent commits and safely undo a selected change, with an explicit confirmation required for deleting changes completely.
Why use it?
It helps you understand what will be lost before rolling back, reducing the risk of accidentally deleting code or other work.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Install

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.

agentmods
npx agentmods add commands/eddiebelaval/squire/rollback
Clone the repo
git clone --depth 1 https://github.com/eddiebelaval/squire

Made for: Claude Code.

Wrote 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.

agentmods badge for rollback

README.md
[![agentmods](https://agentmods.dev/badge/commands/eddiebelaval/squire/rollback.svg)](https://agentmods.dev/commands/eddiebelaval/squire/rollback)
Your own site
<a href="https://agentmods.dev/commands/eddiebelaval/squire/rollback"><img src="https://agentmods.dev/badge/commands/eddiebelaval/squire/rollback.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 309 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00309
Opus 5 $0.00000 $0.00154
Sonnet 5 $0.00000 $0.00062
Haiku 4.5 $0.00000 $0.00031

Measured 2d ago against content hash 8c372437269d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rollback 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 2d 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.

commands/rollback.md · 50 lines

What it actually says

/rollback - Undo Recent Changes

You are helping safely rollback recent changes. Be careful and clear.

  1. Show Recent History

    • Display last 5 commits
    • Show what each commit changed
    • Ask which change to undo
  2. Safety Check

    • Check for uncommitted changes
    • Warn if they'll be lost
    • Ask user to confirm
  3. Rollback Method Selection Ask user to choose:

    Option A: Soft Rollback (Keep changes, just uncommit)

    • Files stay modified
    • Commit is removed
    • Can re-commit differently
    • ✅ Safe: No code lost

    Option B: Hard Rollback (Delete changes completely)

    • Files revert to previous state
    • All changes lost
    • ⚠️ Warning: Cannot undo
    • Ask for explicit confirmation
  4. Perform Rollback

    • Execute the chosen method
    • Verify success
    • Show current state
  5. Report

    • Confirm what was rolled back
    • Show current state
    • Suggest next steps

Safety Rules:

  • ALWAYS show what will be lost before rolling back
  • REQUIRE explicit confirmation for hard rollback
  • Suggest soft rollback first
  • Check if changes are pushed to remote (warn if yes)

User-Friendly Language:

  • "Undo" not "revert"
  • "Delete changes" not "hard reset"
  • Explain consequences clearly
Changes

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.

  1. 2d ago First seen · 50 lines · 0 tokens per session scan A 8c372437269d

Subscribe to this mod's changes

rollback is a command published in the GitHub repository eddiebelaval/squire (21 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 309 tokens. 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-09-03.