Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Writes, modifies, and debugs Claude Code hooks across nine events, covering plugin and settings.json formats, matchers, and security.
Use this skill ↓46% 96%+50 ptsof test cases passed
Passed 23 of 24 test cases with the skill, and 11 of 24 without it.
3 of 3 safety checks passed
Not used yet
Adapted from claude-plugins-official/plugin-dev/skills/hook-development. Trimmed to what we actually author (our plugin already has 6 event matchers covering 7 hook handlers — see hooks/hooks.json).
{
"type": "prompt",
"prompt": "Evaluate if this tool use is appropriate: $TOOL_INPUT",
"timeout": 30
}
Supported events: Stop, SubagentStop, UserPromptSubmit, PreToolUse.
Use for: context-aware decisions, flexible evaluation, natural-language reasoning.
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/validate.mjs",
"timeout": 60
}
Use for: fast deterministic validations, file-system ops, external tools, performance-critical paths.
Our convention: all our command hooks are .mjs (Node.js) — see hooks/pre-bash-destructive-guard.mjs, hooks/enforce-scope.mjs. The v3.0 migration moved us off bash for native Windows support.
This is where people trip up. Two formats exist; they are NOT interchangeable.
hooks/hooks.json — wrapper formatPublished skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.