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.

Source: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/security-guidance/skills/security-guidance/references/pretooluse_hook_canon.md

Author: alirezarezvani, Alireza Rezvani skills and agents. License: MIT.

Related entries