hook-development
Guidance for creating Claude Code hooks (PreToolUse/PostToolUse/Stop, etc.) to validate tool use and automate events.
๐ก๏ธ AgentReady threat assessment
MAESTRO 7-layer threat model + OWASP AIVSS risk score for hook-development, derived from its capabilities.
AIVSS 7.7 ยท High
View MAESTRO 7-layer threat model โOverview
Part of the plugin-dev plugin, this skill teaches creating Claude Code plugin hooks across all events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart/End, UserPromptSubmit, PreCompact, Notification), with emphasis on the prompt-based hooks API for validating tool use and blocking dangerous commands. It ships example hooks (validate-bash.sh, validate-write.sh, load-context.sh) and linter/test scripts run via bash.
Key features
- All hook event types incl. prompt-based hooks
- Example validators: validate-bash.sh, validate-write.sh
- hook-linter.sh and test-hook.sh scripts
Use cases
- Block dangerous bash commands via a PreToolUse hook
- Auto-load context on SessionStart