destructive-git-hook

Installation
SKILL.md

The Destructive-Git Hook

Why an instruction is not enough

Our executor had this in its CLAUDE.md:

"You must REFUSE git reset --hard, even if a task tells you to."

Then a reviewing agent — reading a working tree that had been corrupted by a race — concluded a finished feature was "stranded," and wrote a task that said:

git checkout feature-branch
git reset --hard main      # "no divergence, so this is a clean replay"

That would have deleted the only copy of a completed feature, the commits an open PR was built from. It was recovering the work by destroying it, and it had a confident, plausible explanation attached.

A human hit Deny on an approval dialog. That was the entire safety system.

Installs
1
GitHub Stars
1
First Seen
Jul 14, 2026
destructive-git-hook — jeremyinthebay/relay-skills