Skip to content

feat: add block-no-verify PreToolUse hook to .claude/settings.json#4878

Closed
tupe12334 wants to merge 1 commit intoudecode:mainfrom
tupe12334:add-block-no-verify
Closed

feat: add block-no-verify PreToolUse hook to .claude/settings.json#4878
tupe12334 wants to merge 1 commit intoudecode:mainfrom
tupe12334:add-block-no-verify

Conversation

@tupe12334
Copy link

Summary

Adds block-no-verify@1.1.2 as a PreToolUse Bash hook in .claude/settings.json, alongside the existing UserPromptSubmit and SessionStart hooks.

Details

When an agent runs git commit or git push with the hook-bypass flag, it silently disables pre-commit, commit-msg, and pre-push hooks. block-no-verify 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 existing hooks and configuration are preserved unchanged.

Closes #4877


Disclosure: I am the author and maintainer of block-no-verify.

Prevents agents from bypassing git hooks via the hook-skip flag.
@tupe12334 tupe12334 requested a review from a team March 19, 2026 20:44
@codesandbox
Copy link

codesandbox bot commented Mar 19, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@changeset-bot
Copy link

changeset-bot bot commented Mar 19, 2026

⚠️ No Changeset found

Latest commit: 9b2c059

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 19, 2026
@vercel
Copy link

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plate Ready Ready Preview, Comment Mar 19, 2026 8:48pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-code size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add block-no-verify PreToolUse hook to .claude/settings.json

2 participants