git-rollback

git-rollback is a command for Claude Code from kuku0922/awesome-ai-coding-enhance. It costs 37 tokens per session (4,536 once invoked), scanned A, original, MIT.

A Git command for undoing changes with several safety levels, from quick rollback to detailed analysis. Git is the tool developers use to track code changes.

In plain words
What is it for?
Use it to preview or perform rollbacks, create backups, check dependencies and CI/CD status, and record what happened.
Why use it?
It helps reduce the risk of losing work or disrupting teammates when reverting changes.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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/kuku0922/awesome-ai-coding-enhance/git-rollback
Clone the repo
git clone --depth 1 https://github.com/kuku0922/awesome-ai-coding-enhance

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 git-rollback

README.md
[![agentmods](https://agentmods.dev/badge/commands/kuku0922/awesome-ai-coding-enhance/git-rollback.svg)](https://agentmods.dev/commands/kuku0922/awesome-ai-coding-enhance/git-rollback)
Your own site
<a href="https://agentmods.dev/commands/kuku0922/awesome-ai-coding-enhance/git-rollback"><img src="https://agentmods.dev/badge/commands/kuku0922/awesome-ai-coding-enhance/git-rollback.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,536 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.00037 $0.04536
Opus 5 $0.00018 $0.02268
Sonnet 5 $0.00007 $0.00907
Haiku 4.5 $0.00004 $0.00454

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

Security

Grade A, and why

git-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 5d 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/git-rollback.md · 490 lines

How it starts

The opening of the file, as written. The whole thing — 490 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Claude Command: Enterprise Git Rollback with Multi-Tier Safety

🚨 Production-Ready Safety: Comprehensive rollback system with four distinct safety modes, automatic backup creation, collaborative impact warnings, and complete audit trails. Dry-run enabled by default for maximum safety.


🎯 Four-Tier Rollback Safety Modes

1. Quick Rollback ⚡ (Emergency Mode)

  • Use Case: Production hotfixes, critical security issues
  • Features: Minimal prompts, automatic backup, fast execution
  • Safety: Essential checks only, designed for speed
  • Best For: When time is critical and you know exactly what to rollback

2. Safe Preview 🔍 (Visual Mode)

  • Use Case: Regular development, uncertain impact scope
  • Features: Color-coded diff display, file change summary, impact visualization
  • Safety: Comprehensive preview with visual confirmation
  • Best For: When you need to see exactly what will change

3. Comprehensive Analysis 📋 (Detailed Mode)

  • Use Case: Critical branches, complex rollbacks, team environments
  • Features: Collaborative impact detection, CI/CD status check, dependency analysis
  • Safety: Maximum validation with enterprise-grade warnings
  • Best For: When rollback could affect team members or dependent systems

4. Standard Mode 🎯 (Balanced Mode)

  • Use Case: Daily development workflow
  • Features: Interactive selection with essential safety checks
  • Safety: Balanced approach between speed and thoroughness
  • Best For: Most rollback scenarios (default behavior)

Usage

# Interactive mode with mode selection
/git-rollback                                    # Full interactive: select mode, branch, target, action

# Four-Tier Mode Selection
/git-rollback --mode quick                      # Emergency rollback with minimal prompts
/git-rollback --mode safe-preview               # Visual diff preview before action
/git-rollback --mode comprehensive              # Full analysis with team impact warnings
/git-rollback --mode standard                   # Balanced interactive mode (default)

# Branch and Target Specification
/git-rollback --branch feature/calculator       # Specify branch, interactive for rest
/git-rollback --target v1.2.0                   # Specify target, interactive for branch/mode

# Advanced Combinations
/git-rollback --branch main --target 1a2b3c4d --mode quick --yes --backup
/git-rollback --branch release/v2.1 --target v2.0.5 --mode comprehensive --team-notify
/git-rollback --mode safe-preview --depth 50    # Extended history with visual preview

# Enterprise Features
/git-rollback --backup --team-notify            # Create backup and suggest team notification
/git-rollback --mode comprehensive --yes        # Full analysis with auto-confirmation

Read the full file on GitHub · 490 lines

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. 5d ago First seen · 490 lines · 0 tokens per session scan A 8edcd743a784

Subscribe to this mod's changes

git-rollback is a command published in the GitHub repository kuku0922/awesome-ai-coding-enhance (3 stars, last pushed 9mo ago), licensed MIT. It adds 37 tokens to every session and 4,536 once invoked, about $0.0002 per session on Opus 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-31.