revert-check

Detects accidental reverts in Git working trees before commit using log and diff heuristics.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ArthTech-AI/Marketplace-extensions --skill revert-check
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: revert-check
Source: https://github.com/ArthTech-AI/Marketplace-extensions/tree/main/skills/revert-check
Command: npx skills add https://github.com/ArthTech-AI/Marketplace-extensions --skill revert-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill catches accidental reverts of recently merged work before you commit, helping prevent stale buffers, bad stash pops, and branch-switch mistakes from silently undoing fixes.

Core Features & Use Cases

  • Recent-change detection: Flags modified files that recently changed on the default branch and now look like they are being rolled back.
  • Heuristic safety check: Compares working-tree edits against the baseline using recency, deletion direction, and deletion magnitude to surface suspicious reversions.
  • Pre-commit confidence: Helps developers review risky diffs during local checks, pre-push validation, and QA handoffs.
  • Advisory or strict modes: Supports warning-only review or blocking enforcement depending on how strongly you want to gate commits.

Quick Start

Ask the skill to check your current working tree for accidental reverts before you commit.

Frequently Asked Questions about revert-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect accidental git reverts before commit?▼

To detect accidental git reverts before commit, analyze your working tree against the default branch using git log and git diff. This process evaluates recent file history and net deletions to flag suspicious reversions caused by stale buffers or bad stash pops.

What causes accidental reverts in a git working tree?▼

Accidental reverts in a git working tree are typically caused by stale buffers, bad stash pops, and branch-switch mistakes. These rollback-prone scenarios silently undo recently merged work by overwriting files with older versions during local checks.

Can I run pre-commit code review checks for unstaged files?▼

Yes, you can run pre-commit code review checks for both staged and unstaged files. The detection mechanism evaluates working-tree edits against the baseline by applying recency, deletion direction, and deletion magnitude heuristics to surface risky reversions.

How do I prevent bad stash pops from silently undoing merged fixes?▼

Prevent bad stash pops from undoing merged fixes by comparing working-tree edits against the default branch before committing. This heuristic safety check flags modified files that recently changed and now appear to be rolling back.

Does revert detection support advisory warning mode and strict blocking mode?▼

Yes, revert detection supports both advisory warning mode and strict blocking mode. Advisory mode provides warning-only review for risky diffs, while strict mode enforces commit blocking to gate reversions during pre-push validation and QA handoffs.

What are the limitations of detecting git reverts using deletion magnitude heuristics?▼

Detecting git reverts using deletion magnitude heuristics relies on recency, deletion direction, and deletion magnitude against the default branch. It may not catch intentional large deletions of old code or subtle logic changes that do not register as net deletions.