Expert guidance for writing secure, reliable, and performant Claude Code hooks - validates design decisions, enforces best practices, and prevents common pitfalls. Use when creating, reviewing, or debugging Claude Code hooks.
Sensitive file blocking hook
Correct blocking exit code
0%
100%
Sensitive file patterns
100%
100%
JSON input validation
80%
100%
Path traversal check
0%
0%
Project directory validation
0%
0%
Quoted variables
100%
100%
Absolute script path
60%
100%
PreToolUse event
100%
100%
Specific matcher
100%
100%
Error to stderr
100%
100%
set -euo pipefail
0%
100%
Performance-aware formatter hook
Tool existence check
100%
100%
Graceful skip on missing tool
100%
100%
PostToolUse event
100%
100%
Specific matcher
100%
100%
Absolute script path
0%
100%
Quoted file path variable
100%
100%
JSON input validation
100%
100%
File existence check
0%
100%
Timeout configured
0%
100%
Command hook type
100%
100%
set -euo pipefail
0%
100%
Background test runner hook
Background execution
100%
100%
Immediate hook exit
100%
100%
Lock file deduplication
100%
100%
Lock file cleanup
25%
100%
Test output to log file
100%
100%
PostToolUse event
100%
100%
Specific matcher
100%
100%
Absolute script path
100%
100%
Quoted variables
100%
100%
JSON input validation
0%
100%
set -euo pipefail
0%
100%
90d6bd7
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.