[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72XHTZVJBZRWNZ47EKMY3E7":3,"skill-same:01M72XHTZVJBZRWNZ47EKMY3E7":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M72XHTZVJBZRWNZ47EKMY3E7","block-no-verify-hook",null,"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.","steph-frtech\u002Fclaude-code-up","steph-frtech","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F198466323?v=4","01M72XD213FVQA2QXRGTJFKHE1","01M72XD227AANJ993SQTNZB1CK",1,"MIT","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fmarketplaces\u002Fwshobson\u002Fplugins\u002Fblock-no-verify\u002Fskills\u002Fblock-no-verify-hook\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: block-no-verify-hook\ndescription: 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.\n---\n\n# Block No-Verify Hook\n\nPreToolUse 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.\n\n## Overview\n\nAI 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.\n\n## Problem\n\nWhen AI agents commit code, they may use bypass flags to avoid hook failures:\n\n```bash\n# These commands skip pre-commit hooks entirely\ngit commit --no-verify -m \"quick fix\"\ngit push --no-verify\ngit commit --no-gpg-sign -m \"unsigned commit\"\ngit merge --no-verify feature-branch\n```\n\nThis allows:\n- Unformatted code to enter the repository\n- Linting errors to bypass checks\n- Security scanning to be skipped\n- Unsigned commits to bypass signing policies\n- Test suites to be circumvented\n\n## Solution\n\nAdd a `PreToolUse` hook to `.claude\u002Fsettings.json` that inspects every Bash tool call and blocks commands containing bypass flags.\n\n### Configuration\n\nAdd the following to your project's `.claude\u002Fsettings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"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\"\n        }\n      }\n    ]\n  }\n}\n```\n\n### How It Works\n\n1. **Matcher**: The hook targets only `Bash` tool calls, so it does not interfere with other tools (Read, Edit, Grep, etc.).\n2. **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.\n3. **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.\n4. **Pass-through**: If no bypass flag is found, the hook exits with code 0 and the command executes normally.\n\n### Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | Allow the tool call to proceed |\n| 1 | Error (tool call still proceeds, warning shown) |\n| 2 | Block the tool call entirely |\n\n## Blocked Flags\n\n| Flag | Purpose | Why Blocked |\n|------|---------|-------------|\n| `--no-verify` | Skips pre-commit and commit-msg hooks | Bypasses linting, formatting, testing, security checks |\n| `--no-gpg-sign` | Skips GPG commit signing | Bypasses commit signing policy |\n\n## Installation\n\n### Per-Project Setup\n\nCreate or update `.claude\u002Fsettings.json` in your project root:\n\n```bash\nmkdir -p .claude\ncat > .claude\u002Fsettings.json \u003C\u003C 'EOF'\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"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\"\n        }\n      }\n    ]\n  }\n}\nEOF\n```\n\n### Global Setup\n\nTo enforce across all projects, add to `~\u002F.claude\u002Fsettings.json`:\n\n```bash\nmkdir -p ~\u002F.claude\ncat > ~\u002F.claude\u002Fsettings.json \u003C\u003C 'EOF'\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"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\"\n        }\n      }\n    ]\n  }\n}\nEOF\n```\n\n## Verification\n\nTest that the hook blocks bypass flags:\n\n```bash\n# This should be blocked by the hook:\ngit commit --no-verify -m \"test\"\n\n# This should succeed normally:\ngit commit -m \"test\"\n```\n\n## Extending the Hook\n\n### Adding More Blocked Flags\n\nTo block additional flags (e.g., `--force`), extend the grep pattern:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"if printf '%s' \\\"$TOOL_INPUT\\\" | grep -qE '(^|&&|;|\\\\|)\\\\s*git\\\\s+.*--(no-verify|no-gpg-sign|force-with-lease|force)'; then echo 'BLOCKED: Bypass flags are not allowed.' >&2; exit 2; fi\"\n        }\n      }\n    ]\n  }\n}\n```\n\n### Combining with Other Hooks\n\nThe block-no-verify hook works alongside other PreToolUse hooks:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"if printf '%s' \\\"$TOOL_INPUT\\\" | grep -qE '(^|&&|;|\\\\|)\\\\s*git\\\\s+.*--(no-verify|no-gpg-sign)'; then echo 'BLOCKED: Bypass flags not allowed.' >&2; exit 2; fi\"\n        }\n      },\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"if printf '%s' \\\"$TOOL_INPUT\\\" | grep -qE 'rm\\\\s+-rf\\\\s+\u002F'; then echo 'BLOCKED: Dangerous rm command.' >&2; exit 2; fi\"\n        }\n      }\n    ]\n  }\n}\n```\n\n## Best Practices\n\n1. **Commit the settings file** -- Add `.claude\u002Fsettings.json` to version control so all team members benefit from the hook.\n2. **Document in onboarding** -- Mention the hook in your project's contributing guide so developers understand why bypass flags are blocked.\n3. **Pair with pre-commit hooks** -- The block-no-verify hook ensures pre-commit hooks run; make sure you have meaningful pre-commit hooks configured.\n4. **Test after setup** -- Verify the hook works by intentionally triggering it in a test commit.\n","# Block No-Verify Hook\n\nPreToolUse 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.\n\n## Overview\n\nAI 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.\n\n## Problem\n\nWhen AI agents commit code, they may use bypass flags to avoid hook failures:\n\n```bash\n# These commands skip pre-commit hooks entirely\ngit commit --no-verify -m \"quick fix\"\ngit push --no-verify\ngit commit --no-gpg-sign -m \"unsigned commit\"\ngit merge --no-verify feature-branch\n```\n\nThis allows:\n- Unformatted code to enter the repository\n- Linting errors to bypass checks\n- Security scanning to be skipped\n- Unsigned commits to bypass signing policies\n- Test suites to be circumvented\n\n## Solution\n\nAdd a `PreToolUse` hook to `.claude\u002Fsettings.json` that inspects every Bash tool call and blocks commands containing bypass flags.\n\n### Configuration\n\nAdd the following to your project's `.claude\u002Fsettings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"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\"\n        }\n      }\n    ]\n  }\n}\n```\n\n### How It Works\n\n1. **Matcher**: The hook targets only `Bash` tool calls, so it does not interfere with other tools (Read, Edit, Grep, etc.).\n2. **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.\n3. **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.\n4. **Pass-through**: If no bypass flag is found, the hook exits with code 0 and the command executes normally.\n\n### Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | Allow the tool call to proceed |\n| 1 | Error (tool call still proceeds, warning shown) |\n| 2 | Block the tool call entirely |\n\n## Blocked Flags\n\n| Flag | Purpose | Why Blocked |\n|------|---------|-------------|\n| `--no-verify` | Skips pre-commit and commit-msg hooks | Bypasses linting, formatting, testing, security checks |\n| `--no-gpg-sign` | Skips GPG commit signing | Bypasses commit signing policy |\n\n## Installation\n\n### Per-Project Setup\n\nCreate or update `.claude\u002Fsettings.json` in your project root:\n\n```bash\nmkdir -p .claude\ncat > .claude\u002Fsettings.json \u003C\u003C 'EOF'\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"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\"\n        }\n      }\n    ]\n  }\n}\nEOF\n```\n\n### Global Setup\n\nTo enforce across all projects, add to `~\u002F.claude\u002Fsettings.json`:\n\n```bash\nmkdir -p ~\u002F.claude\ncat > ~\u002F.claude\u002Fsettings.json \u003C\u003C 'EOF'\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"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\"\n        }\n      }\n    ]\n  }\n}\nEOF\n```\n\n## Verification\n\nTest that the hook blocks bypass flags:\n\n```bash\n# This should be blocked by the hook:\ngit commit --no-verify -m \"test\"\n\n# This should succeed normally:\ngit commit -m \"test\"\n```\n\n## Extending the Hook\n\n### Adding More Blocked Flags\n\nTo block additional flags (e.g., `--force`), extend the grep pattern:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"if printf '%s' \\\"$TOOL_INPUT\\\" | grep -qE '(^|&&|;|\\\\|)\\\\s*git\\\\s+.*--(no-verify|no-gpg-sign|force-with-lease|force)'; then echo 'BLOCKED: Bypass flags are not allowed.' >&2; exit 2; fi\"\n        }\n      }\n    ]\n  }\n}\n```\n\n### Combining with Other Hooks\n\nThe block-no-verify hook works alongside other PreToolUse hooks:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"if printf '%s' \\\"$TOOL_INPUT\\\" | grep -qE '(^|&&|;|\\\\|)\\\\s*git\\\\s+.*--(no-verify|no-gpg-sign)'; then echo 'BLOCKED: Bypass flags not allowed.' >&2; exit 2; fi\"\n        }\n      },\n      {\n        \"matcher\": \"Bash\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"if printf '%s' \\\"$TOOL_INPUT\\\" | grep -qE 'rm\\\\s+-rf\\\\s+\u002F'; then echo 'BLOCKED: Dangerous rm command.' >&2; exit 2; fi\"\n        }\n      }\n    ]\n  }\n}\n```\n\n## Best Practices\n\n1. **Commit the settings file** -- Add `.claude\u002Fsettings.json` to version control so all team members benefit from the hook.\n2. **Document in onboarding** -- Mention the hook in your project's contributing guide so developers understand why bypass flags are blocked.\n3. **Pair with pre-commit hooks** -- The block-no-verify hook ensures pre-commit hooks run; make sure you have meaningful pre-commit hooks configured.\n4. **Test after setup** -- Verify the hook works by intentionally triggering it in a test commit.\n",{"name":5,"description":7},"main","900bb95bbe72cdb94af6f5a620aa5081264b7b6d",".claude\u002Fmarketplaces\u002Fwshobson\u002Fplugins\u002Fblock-no-verify\u002Fskills\u002Fblock-no-verify-hook",0,"https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up#readme","https:\u002F\u002Fgithub.com\u002Fsteph-frtech","2026-05-16 00:03:30",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add steph-frtech\u002Fclaude-code-up --skill block-no-verify-hook",{"tool":37,"command":38},"bunx","bunx skills add steph-frtech\u002Fclaude-code-up --skill block-no-verify-hook",{"tool":40,"command":41},"pnpm","pnpm dlx skills add steph-frtech\u002Fclaude-code-up --skill block-no-verify-hook","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fmarketplaces\u002Fwshobson\u002Fplugins\u002Fblock-no-verify\u002Fskills\u002Fblock-no-verify-hook\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M72Y1BY6X8TX3DS19Y04NEBQ","example","One-line summary of what this skill does","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002Fskills\u002Fexample\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M72Y1A38EYR8S9P1MBYDAQTW","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__writing-plans\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M72Y174QSV1B5NV1E4KWHQBR","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__using-git-worktrees\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M72Y14SQRHHMKG316HGB2CGK","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__test-driven-development\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M72Y127BCPRH3BRKPJC3Q3G2","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__systematic-debugging\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M72Y1090GJA6B67KPD60WPHH","subagent-driven-development","Use when executing implementation plans with independent tasks in the current session","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__subagent-driven-development\u002FSKILL.md",[],[]]