block-no-verify-hook

block-no-verify-hook is a skill for Claude Code from RudyCity/superagent. It costs 46 tokens per session (1,707 once invoked), scanned B, a copy of block-no-verify-hook, MIT.

A Git safety hook that blocks commands using flags that bypass commit hooks, signing, or related checks.

In plain words
What is it for?
Use it in Claude Code projects with enforced repository checks to reject commands such as git commit --no-verify, git push --no-verify, --no-gpg-sign, and git merge --no-verify.
Why use it?
It prevents coding agents from skipping formatting, linting, tests, security scans, or signing rules when committing, pushing, or merging code.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions Claude Code; installed under .agents/ (shared by several agents).

Good fit Use it in Claude Code projects with enforced repository checks to reject commands such as git commit --no-verify, git push --no-verify, --no-gpg-sign, and git merge --no-verify.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rudycity/superagent/block-no-verify-hook
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RudyCity/superagent --skill block-no-verify-hook
Clone the repo
git clone --depth 1 https://github.com/RudyCity/superagent

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for block-no-verify-hook

README.md
[![agentmods](https://agentmods.dev/badge/skills/rudycity/superagent/block-no-verify-hook/github.svg)](https://agentmods.dev/skills/rudycity/superagent/block-no-verify-hook)
Your own site
<a href="https://agentmods.dev/skills/rudycity/superagent/block-no-verify-hook"><img src="https://agentmods.dev/badge/skills/rudycity/superagent/block-no-verify-hook/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for block-no-verify-hook

Your own site · 80×15
<a href="https://agentmods.dev/skills/rudycity/superagent/block-no-verify-hook"><img src="https://agentmods.dev/badge/skills/rudycity/superagent/block-no-verify-hook.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,707 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01707
Opus 5 $0.00023 $0.00853
Sonnet 5 $0.00009 $0.00341
Haiku 4.5 $0.00005 $0.00171

Measured 10d ago against content hash 110e5e8ca259, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

block-no-verify-hook scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat > .claude/settings.json << 'EOF'
Origin

This is a copy

100% identical to block-no-verify-hook — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/block-no-verify-hook/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Block No-Verify Hook

PreToolUse 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.

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:

# These commands skip pre-commit hooks entirely
git commit --no-verify -m "quick fix"
git push --no-verify
git commit --no-gpg-sign -m "unsigned commit"
git merge --no-verify feature-branch

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.

Configuration

Add the following to your project's .claude/settings.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hook": {
          "type": "command",
          "command": "if printf '%s' \"$TOOL_INPUT\" | grep -qE '(^|&&|;|\\|)\\s*git\\s+.*--(no-verify|no-gpg-sign)'; then echo 'BLOCKED: --no-verify and --no-gpg-sign flags are not allowed. Run the commit without bypass flags so that pre-commit hooks execute properly.' >&2; exit 2; fi"
        }
      }
    ]
  }
}

How It Works

  1. Matcher: The hook targets only Bash tool calls, so it does not interfere with other tools (Read, Edit, Grep, etc.).
  2. Inspection: The $TOOL_INPUT environment variable contains the full command the agent is about to execute. The hook uses printf to safely pass input (avoiding echo pitfalls with special characters) and checks for --no-verify or --no-gpg-sign flags only when preceded by a git command.
  3. Blocking: If a bypass flag is found in a git command, the hook exits with code 2 and prints an error message. Exit code 2 signals Claude Code to reject the tool call entirely.
  4. Pass-through: If no bypass flag is found, the hook exits with code 0 and the command executes normally.

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 194 lines · 46 tokens per session scan B 110e5e8ca259

Subscribe to this mod's changes

block-no-verify-hook is a skill published in the GitHub repository RudyCity/superagent (21 stars, last pushed 2d ago), licensed MIT. It adds 46 tokens to every session and 1,707 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 100% identical to block-no-verify-hook, differing in 0 lines, and is treated as a copy.