# Revert Surgical

Undo a bad change without nuking unrelated work.

- Repository: https://github.com/Archive228/loopkit (756 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-07-14
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Archive228/loopkit --skill revert-surgical -g -a claude-code -y`
Codex: `npx skills add Archive228/loopkit --skill revert-surgical -g -a codex -y`
Cursor: `npx skills add Archive228/loopkit --skill revert-surgical -g -a cursor -y`
Gemini CLI: `npx skills add Archive228/loopkit --skill revert-surgical -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Archive228/loopkit`

## Description

Undo a bad change without nuking unrelated work. Use when a specific commit or change broke something.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Surgical Revert
Don't `git reset --hard` away three good commits to undo one bad one.
- **Single commit**, `git revert <sha>` creates an inverse commit; history stays intact and shared-branch-safe.
- **One file from a commit**, `git checkout <good-sha> -- path/to/file`.
- **Hunk-level**, `git checkout -p` to revert specific changes, keep the rest.
- **A merge**, `git revert -m 1 <merge-sha>` (pick the mainline parent).
On a shared branch, always revert (forward), never rewrite history. Reproduce the breakage first so you revert the RIGHT thing, then verify the revert actually fixes it.

