From cd45bbd3605f6403e05de0817dca4ebef5911fed Mon Sep 17 00:00:00 2001 From: Ofek Gabay <61761153+tupe12334@users.noreply.github.com> Date: Fri, 20 Mar 2026 01:24:35 +0700 Subject: [PATCH] feat: add block-no-verify PreToolUse hook to .claude/settings.json Prevents agents from bypassing git hooks via the hook-skip flag. Note: hooks run as system shell commands outside Claude's permission scope, so this works correctly even with deny: Bash(npx:*). Closes #36104 --- .claude/settings.json | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index f12f21abf44b..e04e05eb6564 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -9,6 +9,17 @@ } ] } + ], + "PreToolUse": [ + { + "matcher": "Bash", + "hooks": [ + { + "type": "command", + "command": "npx block-no-verify@1.1.2" + } + ] + } ] }, "permissions": { @@ -24,7 +35,7 @@ "Bash(yarn test-www:*)", "Bash(yarn test-classic:*)", "Bash(yarn test-stable:*)", - "Bash(yarn linc:*)", + "Bash(yarl linc:*)", "Bash(yarn lint:*)", "Bash(yarn flow:*)", "Bash(yarn prettier:*)", @@ -41,4 +52,4 @@ "Bash(npx:*)" ] } -} +} \ No newline at end of file