Claude Certification
← Journal
2026-04-09 · claudecert.com

Using Claude Code hooks for team-wide policy

Hooks are the right place to enforce 'no force-push' and 'no skipping tests' across every developer's machine.

Commit a .claude/settings.json with PreToolUse hooks that block dangerous commands. The hook is a shell script that exits non-zero (with a helpful message) when the command matches.

This is much stronger than docs. The harness physically can't run the command. Engineers can override locally if they need to, but the default is safe.

Good candidates: git push --force to main, rm -rf in the project root, dropping production databases, deploying without test runs.