Skip to content
youdede

Commit signature intent guard

OperationsHookv1.0.0

A deterministic Claude Code PreToolUse gate for Bash that recognizes Git commands that create commits (commit, also through aliases, merge --no-ff, cherry-pick, revert, am) and blocks explicit signature bypass, dynamic command shapes, or such commands without -S when commit.gpgSign is not enabled.

Runs on

Scope
$npx @youdede/toolkit add commit-signature-intent-guard --target claude-code

What it does

Require an explicit or configured cryptographic-signing intent for Git commits.

When it fires

  • pre-commit
  • review
  • release

How it behaves

Verify statically observable Git commit signing intent before allowing the commit command to execute.

It does not create, import, select, trust, unlock, rotate, or verify a signing key.

It does not sign, commit, attest, push, or claim that a future signature will verify.

It does not infer intent from branch names, commit messages, environment variables, aliases, or prompt text.

It does not expose a project-controlled bypass or accept --no-gpg-sign.

Configuration

targets/claude-code/commit-signature-intent-guard.mjsnode · read-only

Version
1.0.0
Requires
Shell command guard
Licence
RiskThis automatic gate requires an explicit or configured cryptographic-signing intent for Git commits; a false denial can interrupt legitimate work, but it does not execute the blocked action.
Medium
ModeHow it works: fixed rules, model instructions, or both.
Deterministic only
Behaviour
Enforces, blocks on violation
On failure
Denies and blocks
LatencyTo require an explicit or configured cryptographic-signing intent for Git commits, the entrypoint may run a bounded local subprocess before returning.
Bounded
Data retentionWhether data remains after use and who manages its storage.
Not retained

Often used with

All in Operations