git-hooks
Installation
SKILL.md
Git Hooks
Automate code quality, enforce conventions, and prevent bad commits with Git hooks.
Hook Types and Use Cases
Hook Trigger Common Use
─────────────────────────────────────────────────────────────────
pre-commit Before commit is created Lint, format, secret scan
prepare-commit-msg After default msg, before edit Add ticket ID, template
commit-msg After user writes message Enforce conventional commits
pre-push Before push to remote Full test suite, build check
pre-rebase Before rebase starts Prevent rebase on protected branches
post-merge After merge completes Reinstall deps, run migrations
post-checkout After checkout/switch Rebuild, clear caches