plugin-hooks
Installation
SKILL.md
Plugin Hooks
The most powerful and most trap-laden extension type. Exit code 1 does not block — only exit code 2 blocks. Matcher syntax has three modes.
updatedInputreplaces the entire tool input object, not just one field. These three facts cause most hook bugs. Learn them first.
Authoritative source: https://code.claude.com/docs/en/hooks
When to use this skill
- Writing any hook configuration (hooks/hooks.json, settings.json)
- Debugging "my hook isn't blocking" or "my hook isn't firing"
- Choosing between hook event types for a specific capability
- Understanding exit code behavior (exit 1 vs exit 2 distinction)
- Designing safe auto-approve flows for PermissionRequest
- Setting up file-watching or cwd-change hooks