Claude Git Guardian
ProductivityIntermediate
Claude Git Guardian intercepts git commands before they execute via the pre-tool-use hook. It blocks force-pushes to main/master, prevents commits to protected branches, warns about large binary files, and checks for secrets in staged changes. Configurable rules let you define branch protection policies per repository.
gitsafetybranch-protectionhookssecurity
Installation
claude config add hooks.pre-tool-use "npx claude-git-guardian"
Terminal Preview
Claude Git Guardian
About Claude Git Guardian
Claude Code plugins extend the built-in capabilities of Claude Code by adding new integrations, productivity features, and development tools. As a Productivity plugin suitable for Intermediate-level users, Claude Git Guardian integrates seamlessly into your existing Claude Code workflow to help you get more done with less effort.