---
title: "Setup Git Guardrails - Air Market"
description: "You hand git work to your AI coding assistant, and once in a while it reaches for something destructive: a hard reset that throws away changes, a clean that wipes files, a push or branch delete you n…"
canonical: "https://airmarket.ai/app/git-guardrails-claude-code"
---

[Air Market](/) / [Developer Tools](/category/devtools) / Setup Git Guardrails

Skill by [Matt Pocock](/@mattpocock)

# Setup Git Guardrails

Stop risky git commands before they ever run

## What this does

You hand git work to your AI coding assistant, and once in a while it reaches for something destructive: a hard reset that throws away changes, a clean that wipes files, a push or branch delete you never asked for. This adds stops inside Claude Code that block those commands before they run. Reach for it when you want the tool working freely while the irreversible moves stay off limits.

### Top 3 things it does for you

- Block destructive git commands before they execute
- Add git safety hooks to Claude Code
- Prevent unwanted pushes, resets and branch deletions

## Information

**Setup Git Guardrails at a glance**

|  |  |
| --- | --- |
| Kind | Skill |
| Publisher | [Matt Pocock](/@mattpocock) |
| Category | [Developer Tools](/category/devtools) |
| Works with | Agent Skills - an open standard supported by 40+ agents |
| Languages | en |
| Size | 3 KB |
| Licence | MIT |
| Repository | [mattpocock/skills](https://github.com/mattpocock/skills/tree/885e2ca4d842d139e9aef4e48d366c63cb1b8013/skills/misc/git-guardrails-claude-code) |
| GitHub stars | 319,153 (as of Nov 2026) |
| Installs | 552,402, counted by skills.sh (Nov 2026) |

## Security report

**Verified.** AIR scanned this exact version of Setup Git Guardrails and flagged nothing. AIR's verdict: **safe**.

**What Setup Git Guardrails's check was run against**

|  |  |
| --- | --- |
| Commit | 885e2ca4d842d139e9aef4e48d366c63cb1b8013 |
| Content hash | e8bc459791243dcc803445cee32dbf4111c5d4d23806396b3ad422ef9b6b3b0e |
| Files read | [Browse the files at this exact commit](https://github.com/mattpocock/skills/blob/885e2ca4d842d139e9aef4e48d366c63cb1b8013/skills/misc/git-guardrails-claude-code/SKILL.md) |

A scan is named by the exact content it read, not by a version number. A different version is a different artifact, and nothing here applies to a version AIR has not scanned.

[Read the full security report for Setup Git Guardrails](/security/git-guardrails-claude-code)

## About Setup Git Guardrails

Sets up hooks in Claude Code that block dangerous git commands before they execute. Blocked commands include push, reset --hard, clean and branch -D.

Reach for it when you want to prevent destructive git operations, add git safety hooks, or block git push and reset inside Claude Code.

## What's inside

- SKILL.md - instructions
- agents/openai.yaml - data
- scripts/block-dangerous-git.sh - script

## Questions

### Is Setup Git Guardrails safe to install?

AIR scanned this exact version of Setup Git Guardrails and flagged nothing. AIR's verdict: safe. The verdict is named by the content that was read, at commit 885e2ca4d842, so it cannot drift onto a version nobody scanned. The full report is at https://airmarket.ai/security/git-guardrails-claude-code.

### How do I install Setup Git Guardrails?

Open https://airmarket.ai/app/git-guardrails-claude-code on Air Market and use the install action: Air Market hands Claude a prompt naming this exact skill, and Claude sets it up. Source, pinned to the exact commit this listing describes: https://github.com/mattpocock/skills/tree/885e2ca4d842d139e9aef4e48d366c63cb1b8013/skills/misc/git-guardrails-claude-code. Install from that link, not the branch.

## Related on Air Market

- [More Developer Tools listings](/category/devtools)
- [Everything by Matt Pocock](/@mattpocock)

---

Canonical URL: <https://airmarket.ai/app/git-guardrails-claude-code>
