naz3eh/pre-sign-guard

agent skill + runnable checker

Never sign what you cannot see.

A guard that sits in front of any key before it signs. It refuses bare digests, decodes every EVM payload by its first byte, and prints a verdict a human can confirm — ALLOW_WITH_CONFIRMATION, BLOCK, or REFUSE. Built around EIP-7702 delegations, which carry no amount, destination or calldata for a policy to check.

# replay the real Binance 14 authorization → BLOCK
git clone https://github.com/naz3eh/pre-sign-guard
cd pre-sign-guard && npm install
npm run demo   # offline · ~10s · no secrets

ALLOW_WITH_CONFIRMATION

Payload decoded cleanly. The guard prints chain, delegate, value, message text, typed-data fields — a human confirms before any signature exists.

BLOCK

EIP-7702 authorizations and type-4 authorization_list entries block by default — a delegate gets to run as the account, with no amount limit. Only an explicit delegate+chain allowlist downgrades.

REFUSE

Bare 32-byte digests, hash↔preimage mismatches, malformed RLP, unknown prefixes. “I can’t see what this signs” is a refusal, not a guess.

Point your agent at it

Read https://naz3eh.github.io/pre-sign-guard/SKILL.md and follow it before every signature you are asked to produce. If a request cannot be decoded by the guard, refuse it.

Raw files (served by GitHub Pages)