This sets up a pre-execution hook that blocks Claude Code from running destructive git commands like push, reset --hard, clean -f, and branch -D. You get to choose whether to install it per project or globally, and it intercepts the bash tool before anything dangerous runs. It's straightforward: the hook script checks the command against a blocklist and exits with code 2 if there's a match. Honestly, this is the kind of thing you want if you're letting Claude make changes in a repo where one wrong push could ruin someone's day. You can customize which patterns to block after installation.
npx skills add https://github.com/vinvcn/mattpocock-skills-zh-cn --skill git-guardrails-claude-code