Here’s 3 hooks I have in my global Claude Code config: **Git Push Main Blocker** - Prevents direct pushes to main/master and forces feature branch workflow. **Tests Directory Guard** - Requires explicit confirmation before editing any test files. Makes me think twice about whether I’m actually improving test coverage or just hacking around broken tests. **Selective Git Add Enforcer** - Blocks `git add .` and forces me to stage specific files. Saves me from accidentally committing debug prints, API keys, and random temporary files. Sometimes Claude md is not enough.
1,39K