git-rollback

git-rollback is a skill for Claude Code from UfoMiao/zcf. It costs 25 tokens per session (993 once invoked), scanned A, original, MIT.

A Git tool for choosing an older version of a branch and rolling the branch back to it. It can either rewrite the branch history or add new commits that undo later changes.

In plain words
What is it for?
Use it to preview or perform a rollback of a branch to a commit, tag, or other saved Git reference, using either a history-rewriting reset or a history-preserving revert.
Why use it?
It reduces the risk of selecting the wrong commit or changing a branch accidentally by showing available branches and versions and asking for confirmation before execution.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to preview or perform a rollback of a branch to a commit, tag, or other saved Git reference, using either a history-rewriting reset or a history-preserving revert.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ufomiao/zcf/git-rollback
About the project

ZCF is a command-line setup tool for configuring Claude Code and Codex with agents, instructions, skills, hooks, commands, and settings. It is for developers who want to install and personalize these coding-agent workflows through an interactive setup.

UfoMiao/zcf · 6,066 stars · on GitHub · zcf.ufomiao.com

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.

Any agent
npx skills add UfoMiao/zcf --skill git-rollback
Clone the repo
git clone --depth 1 https://github.com/UfoMiao/zcf

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/skills/ufomiao/zcf/git-rollback/github.svg)](https://agentmods.dev/skills/ufomiao/zcf/git-rollback)
Your own site
<a href="https://agentmods.dev/skills/ufomiao/zcf/git-rollback"><img src="https://agentmods.dev/badge/skills/ufomiao/zcf/git-rollback/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.

agentmods 80×15 button for git-rollback

Your own site · 80×15
<a href="https://agentmods.dev/skills/ufomiao/zcf/git-rollback"><img src="https://agentmods.dev/badge/skills/ufomiao/zcf/git-rollback.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 993 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 54
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 56
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Prompt Injection · line 33
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
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.00025 $0.00993
Opus 5.5 $0.00010 $0.00397
Sonnet 5.5 $0.00005 $0.00199
Haiku 4.5 $0.00003 $0.00099

Measured 3mo ago against content hash 70d00de6b14d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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.

packages/core/templates/skills/en/git-rollback/SKILL.md · 88 lines

How it starts

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

Claude Command: Git Rollback

Purpose: Safely and visually rollback a specified branch to an older version. Defaults to read-only preview (--dry-run); actual execution requires --yes or interactive confirmation.


Usage

# Pure interactive: list branches → select branch → list recent 20 versions → select target → choose reset or revert → confirm
/git-rollback

# Specify branch, other interactive
/git-rollback --branch feature/calculator

# Specify branch and target commit, execute with hard-reset in one go (dangerous)
/git-rollback --branch main --target 1a2b3c4d --mode reset --yes

# Generate revert commit only (non-destructive rollback), preview
/git-rollback --branch release/v2.1 --target v2.0.5 --mode revert --dry-run

Options

Option Description
--branch <branch> Branch to rollback; interactively selected if omitted.
--target <rev> Target version (commit hash, tag, or reflog reference); interactively selects recent --depth entries if omitted.
--mode reset|revert reset: Hard rollback history; revert: Generate reverse commits keeping history intact. Prompts by default.
--depth <n> List recent n versions in interactive mode (default 20).
--dry-run Enabled by default, only preview commands to be executed.
--yes Skip all confirmations and execute directly, suitable for CI/CD scripts.

Interactive Flow

  1. Sync remote → git fetch --all --prune
  2. List branches → git branch -a (local + remote, filter protected branches)
  3. Select branch → User input or parameter
  4. List versions → git log --oneline -n <depth> + git tag --merged + git reflog -n <depth>
  5. Select target → User inputs commit hash / tag
  6. Select mode → reset or revert
  7. Final confirmation (unless --yes)
  8. Execute rollback
    • reset: git switch <branch> && git reset --hard <target>
    • revert: git switch <branch> && git revert --no-edit <target>..HEAD
  9. Push suggestion → Prompt whether to git push --force-with-lease (reset) or regular git push (revert)

Read the full file on GitHub · 88 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. 3mo ago First seen · 88 lines · 25 tokens per session scan A 70d00de6b14d

Subscribe to this mod's changes

git-rollback is a skill published in the GitHub repository UfoMiao/zcf (6,066 stars, last pushed 9d ago), licensed MIT. It adds 25 tokens to every session and 993 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.

Related

git-rollback compared with skills from other repositories

git-rollback next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-rollbackUfoMiao/zcfSkill6.1k9d agoMITA25Claude Code
cli-forge-githubDestynova2/cli-code-skillsSkill67d agoMITA165Claude Code
cli-git-conventionalDestynova2/cli-code-skillsSkill67d agoMITA128Claude Code
rea-changelog-updatemorluto/reaSkill483ktodayMITA33Claude Code
repo-hygieneQwenLM/qwen-codeSkill31ktodayApache-2.0A48Claude Code, Codex
gh-skillcli/cliSkill47k3d agoMITA41Claude Code, Codex
cw-gatesHmbown/CodewhaleSkill41k1mo agoMITA48Claude Code, Codex