Reference docMembers
PreToolUse Hook Discipline - When To Block, When To Warn
PreToolUse Hook Discipline - When To Block, When To Warn is a reference document for Claude Code, from the Alireza Rezvani skills and agents collection by alirezarezvani. The full text is about 1,181 words in 14 sections, with 1 code block and 2 tables. It is a supporting file that a skill or agent reads while it works, so the main instructions can stay short.
It is most useful for people working in IT and security and Product and engineering who use Claude Code.
What it covers
- The Three Exit Codes
- The Decision Matrix
- Session-State Caching
- False-Positive Tolerance
- When Substring Detection Is Enough
- Hook Performance Discipline
- Disable-Via-Env-Var Discipline
- Anti-Patterns
- Hook that always exits 0
- Hook that always exits 2 on a pattern hit
The full text is in the members library
Book a call and we will give you access to the full Claude Code library: every entry in full, search by meaning, copy and download.
Author: alirezarezvani, Alireza Rezvani skills and agents. License: MIT.
Related entries
- security-guidance (engineering)
- karpathy-coder (engineering) (Alireza Rezvani skills and agents) (karpathy coder) (3589)
- Hook Mechanisms - Deep Dive
- Hook discipline - running on someone else's critical path
- block-no-verify-hook
- karpathy-coder (engineering) (Alireza Rezvani skills and agents) (karpathy coder) (3592)