You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Claude Code agents can silently bypass git hooks by running git commit with the hook-skip flag. This disables pre-commit, commit-msg, and pre-push hooks — which matters especially here since Superset already runs pre-commit via a PreToolUse hook.
Solution
Add block-no-verify as a PreToolUse Bash hook in .claude/settings.json. It reads tool_input.command from the Claude Code hook stdin payload, detects the hook-bypass flag across all git subcommands, and exits 2 to block the attempt before git even runs.
The existing pre-commit runner hook is preserved unchanged.
Disclosure: I am the author and maintainer of block-no-verify.
This discussion was converted from issue #38748 on March 20, 2026 17:02.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Claude Code agents can silently bypass git hooks by running git commit with the hook-skip flag. This disables pre-commit, commit-msg, and pre-push hooks — which matters especially here since Superset already runs
pre-commitvia aPreToolUsehook.Solution
Add
block-no-verifyas aPreToolUseBash hook in.claude/settings.json. It readstool_input.commandfrom the Claude Code hook stdin payload, detects the hook-bypass flag across all git subcommands, and exits 2 to block the attempt before git even runs.The existing
pre-commitrunner hook is preserved unchanged.Disclosure: I am the author and maintainer of
block-no-verify.Beta Was this translation helpful? Give feedback.
All reactions