AI AGENT ADDONS

Git Guardrails Claude Code

vinvcn/mattpocock-skills-zh-cn
Git & Pull Requests
1,331installs

When you use git in Claude Code, a wrong command can erase your work. This skill adds a safety net. It blocks dangerous git commands like push, reset --hard, clean, and branch -D. A hook script runs before each git command. If the command is risky, Claude stops it and shows a warning message.

You can set up the guardrails for just your current project or for all projects. The hook script is copied to the right folder and made executable. Then it is added to the Claude settings file. You can also customize which commands to block.

This keeps your work safe from accidents. It helps you avoid losing code or overwriting remote branches. The setup is simple and fast.

Add Git Guardrails Claude Code skill to your workflow

Global

mkdir -p ~/.claude/skills/git-guardrails-claude-code

Project

mkdir -p .claude/skills/git-guardrails-claude-code

Source Repository

Stars
1,155
Forks
104
Watchers
1,155
License
MIT
Last Push
1 month ago
Created
2 months ago
Git Guardrails Claude Code | Cursor & Claude Code Skills