block-no-verify-hook
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.
Install
With your agent
Install OMGSkills skill "wshobson/agents:block-no-verify-hook" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.
Manual command
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.
More from this repo
api-design-principles
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight...
angular-migration
Migrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates.
architecture-decision-records
Used to write and maintain Architecture Decision Records (ADRs) following best practices for technical decision...
