# block-no-verify-hook

> Claude/Codex skill by [@wshobson](https://omgskills.com/library/wshobson/index.md) · 38k stars · Updated 2026-07-22

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.

Tags: agents, anthropic, anthropic-claude, automation, claude, claude-code, claude-code-cli, claude-code-commands, claude-code-plugin, claude-code-plugins, claude-code-skills, claude-code-subagents, claude-skills, claudecode, claudecode-config, claudecode-subagents, orchestration, sub-agents, subagents, workflows

## Install

```sh
git clone https://github.com/wshobson/agents /tmp/agents && ln -s /tmp/agents/plugins/block-no-verify/skills/block-no-verify-hook ~/.claude/skills/block-no-verify-hook
```

## From README

Block No-Verify Hook PreToolUse hook configuration that intercepts and blocks bypass-flag before execution, ensuring AI agents cannot skip pre-commit hooks, GPG signing, or other git safety mechanisms. Overview AI 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. Problem When AI agents commit code, they may use bypass flags to avoid hook failures: This allows: Unformatted code to enter the repository Linting errors to bypass checks Security scanning to be skipped Unsigned commits to bypass signing policies Test suites to be circumvented Solution Add a PreToolUse hook to .claude/settings.json that inspects every Bash tool call and blocks commands containing bypass flags.

## Links

- HTML page: https://omgskills.com/skills/wshobson/agents/block-no-verify-hook/
- GitHub: https://github.com/wshobson/agents
- Author: [@wshobson](https://omgskills.com/library/wshobson/index.md)

## More from this repo

- [python-packaging](https://omgskills.com/skills/wshobson/agents/plugins/python-development/skills/python-packaging/index.md) — Used to create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to...
   - [@wshobson](https://omgskills.com/library/wshobson/index.md) · 39k stars
- [ai-debt-detector](https://omgskills.com/skills/wshobson/agents/plugins/skill-forge-essentials/skills/ai-debt-detector/index.md) — Use after generating code, after accepting AI suggestions, or when reviewing AI-written modules.
   - [@wshobson](https://omgskills.com/library/wshobson/index.md) · 39k stars
- [market-sizing-analysis](https://omgskills.com/skills/wshobson/agents/plugins/startup-business-analyst/skills/market-sizing-analysis/index.md) — Calculate TAM/SAM/SOM for market opportunities using top-down, bottom-up, and value theory methodologies.
   - [@wshobson](https://omgskills.com/library/wshobson/index.md) · 39k stars
