Add block-no-verify as a Claude Code PreToolUse hook
When a Claude Code agent runs git commit or git push with the hook-bypass flag, it silently disables pre-commit, commit-msg, and pre-push hooks — defeating any quality gates you've put in place.
block-no-verify is a lightweight Claude Code hook that detects the hook-bypass flag across all git subcommands and exits 2 to block the command.
Proposed change to .claude/settings.json
Add a PreToolUse Bash hook:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "npx block-no-verify@1.1.2" }]
}
]
}
}
This keeps agents from bypassing your git hooks without explicit human override.
Disclosure: I am the author and maintainer of block-no-verify.
Add
block-no-verifyas a Claude Code PreToolUse hookWhen a Claude Code agent runs
git commitorgit pushwith the hook-bypass flag, it silently disables pre-commit, commit-msg, and pre-push hooks — defeating any quality gates you've put in place.block-no-verifyis a lightweight Claude Code hook that detects the hook-bypass flag across all git subcommands and exits 2 to block the command.Proposed change to
.claude/settings.jsonAdd a
PreToolUseBash hook:{ "hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [{ "type": "command", "command": "npx block-no-verify@1.1.2" }] } ] } }This keeps agents from bypassing your git hooks without explicit human override.
Disclosure: I am the author and maintainer of
block-no-verify.