AI Coding Agent Hooks

A hook is a shell script your AI coding agent runs automatically at a defined event — before a tool call, after a file edit, before a shell command executes. Used well, hooks enforce the policy you can't rely on a prompt alone to guarantee: block a secret before it's committed, log every tool call for an audit trail, or require a second check before a production command runs. Every hook below is real, copy-paste code — not a concept.

100 hooks · Written for Claude Code's documented hook contract
New to agent hooks? Read the security risks first →

11 results Clear filters →

🏦 Financial & Model-Risk Controls

11 hooks

Controls built for the exact things a bank, insurer, or asset manager's own model-risk, SOX, and information-barrier reviews ask about — not generic security hygiene.

Block Outbound Calls From an MNPI-Touched Session
Security
Once a session has touched an MNPI path, blocks any email, post, or external MCP call for the rest of that se…
PreToolUse · Claude Code
Block Trade/Order MCP Calls Outside a Notional Limit
Security
Denies an order/trade-execution MCP tool call if its notional amount exceeds a configured ceiling.
PreToolUse · Claude Code
Enforce Segregation of Duties on a Valuation File
Security
Blocks an agent from both writing a valuation file and later marking it approved in the same session.
PreToolUse · Claude Code
Flag PII-and-External-MCP Cross-Contamination in One Session
Security
Flags any external MCP tool call made in a session that has also touched a customer PII file.
PreToolUse · Claude Code
Log Every Access to an MNPI-Tagged Path
Security
A dedicated register of every read/write touching a material non-public information path.
PostToolUse · Claude Code
Require Dual Control on a Payment-Initiation MCP Tool
Security
Blocks a wire/payment-initiation MCP tool call unless a second, distinct reviewer flag is already set.
PreToolUse · Claude Code
Require a Change-Ticket Reference Before Editing the Model Inventory
Security
Blocks edits to a model-risk inventory file unless the command references a ticket ID.
PreToolUse · Claude Code
Block Marking a Filing Draft Final Without a Reviewer Tag
Security
Blocks writing FINAL or APPROVED into a filing/report draft unless a REVIEWER= tag is also present.
PreToolUse · Claude Code
Log Every Touch of a Regulatory-Filing Path
Security
A dedicated evidence trail for anything read or written under a 10-K, call-report, or filings directory.
PostToolUse · Claude Code
Rate-Limit Market-Data MCP Queries
Security
Blocks a market-data MCP tool once it's been called more than N times in a rolling minute.
PreToolUse · Claude Code
Require a Validation Reference Before Overwriting a Model Output File
Security
Blocks overwriting a configured model-output path unless the write references its validation ID.
PreToolUse · Claude Code
Need a hook that isn’t here?

Tell us what you want enforced automatically and we’ll build it — free and public.

Request a hook →
FEEDBACK