Tooluck logoTooluck
SKILL.md

block-no-verify-hook

Agent skill fromwshobson/agents

Configure a PreToolUse hook to prevent AI agents from skipping git pre-commit hooks with --no-verify and other bypass flags. Use when setting up Claude Code projects that enforce commit quality gates.

How to install block-no-verify-hook

install block-no-verify-hook
# install the agents pack with the skills CLI
npx skills add wshobson/agents

# or add only this skill to Claude Code: copy the folder

plugins/block-no-verify/skills/block-no-verify-hook/

# into

~/.claude/skills/block-no-verify-hook/ (all projects)

.claude/skills/block-no-verify-hook/ (one project)

plugins/block-no-verify/skills/block-no-verify-hook/SKILL.md

MITFull file
1# Block No-Verify Hook
2
3PreToolUse hook configuration that intercepts and blocks bypass-flag usage before execution, ensuring AI agents cannot skip pre-commit hooks, GPG signing, or other git safety mechanisms.
4
5## Overview
6
7AI coding agents (Claude Code, Codex, etc.) can run shell commands with flags like `--no-verify` that bypass pre-commit hooks. This defeats the purpose of linting, formatting, testing, and security checks configured in pre-commit hooks. The block-no-verify hook adds a PreToolUse guard that rejects any tool call containing bypass flags before execution.
8
9## Problem
10
11When AI agents commit code, they may use bypass flags to avoid hook failures:
12
13```bash
14# These commands skip pre-commit hooks entirely
15git commit --no-verify -m "quick fix"
16git push --no-verify
17git commit --no-gpg-sign -m "unsigned commit"
18git merge --no-verify feature-branch
19```
20
21This allows:
22- Unformatted code to enter the repository
23- Linting errors to bypass checks
24- Security scanning to be skipped
25- Unsigned commits to bypass signing policies
26- Test suites to be circumvented
27
28## Solution
29
30Add a `PreToolUse` hook to `.claude/settings.json` that inspects every Bash tool call and blocks commands containing bypass flags.
31
32### Configuration
33
34Add the following to your project's `.claude/settings.json`:
35
36```json
37{
38 "hooks": {
39 "PreToolUse": [
40 {
41 "matcher": "Bash",
42 "hooks": [
43 {
44 "type": "command",
45…

Excerpt shown under the repository's MIT license.

More skills in agents

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates