danielvm-git/bigpowers/guard-git
Claude Code and agent skill by danielvm-git/bigpowers
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection before an AI agent runs them. Installs hook scripts for Claude Code, Cursor, Cursor CLI, and Gemini CLI; documents Google Antigravity Terminal deny lists. Use when the user wants git safety hooks, to block git push or destructive git in agents, or to mirror the same policy across AI coding tools.
Install
npx vskill@latest install danielvm-git/bigpowers/guard-gitSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Guard Git
HARD GATE — HARD GATE — Before committing, verify: branch is not main/master, author is correct, git user is configured. Bad commits are hard to fix.
Installs a shared hook that blocks destructive git operations and enforces workflow discipline. Requires `jq` on the agent's PATH when the hook runs.
What gets blocked/enforced
- Safety:
git push --force,git reset --hard,git clean -f,git branch -D,git checkout .,git restore .. - Discipline: Blocks direct commits or pushes to protected branches (
main,master) unlessGIT_BIGPOWERS_LAND=1(set only byscripts/land-branch.sh). - Allows:
git push origin <feature-branch>for backup/CI; solo land push tomainonly insideland-branch.sh. - Standardization: Enforces Conventional Commits for all
git commitcommands. - Secrets: Blocks commits containing common secret patterns (
sk-,ghp_,AKIA,xoxb-,-----BEGINprivate keys) — see REFERENCE.md.
Quick start
- Scope: ask project-only vs global (paths differ per product).
- Write the hook bundle from REFERENCE.md into the client's hooks directory.
- Run `chmod +x` on
pre-tool-use.sh. - Merge the hook snippet from REFERENCE.md into the right settings file — do not wipe unrelated keys.
- Verify with the tests in REFERENCE.md.
| Client | Mechanism | Config | |
|---|---|---|---|
| Claude Code | PreToolUse (Bash) | .claude/settings.json or ~/.claude/settings.json | |
| Cursor / Cursor CLI | beforeShellExecution | .cursor/hooks.json or ~/.cursor/hooks.json | |
| Gemini CLI | BeforeTool + run_shell_command | .gemini/settings.json or ~/.gemini/settings.json | |
| Google Antigravity | Built-in Terminal Deny list | Settings UI (no shell hook) |
Modes (env on the hook command): GIT_GUARDRAILS_MODE is claude (default) or cursor → stderr + exit 2 on block. Set gemini for Gemini CLI → JSON decision on stdout.
Customization
To add or remove patterns or protected branches, edit pre-tool-use.sh.
Advanced
Full JSON examples, merge rules, Antigravity deny-list entries, and test commands: REFERENCE.md.
<!-- story: e01s03 -->
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/guard-git/SKILL.md
Popularity
- Repository stars
- 188
- Repository forks
- 18
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/danielvm-git/bigpowers/guard-git)