Install any skill in seconds. Free to start, no credit card required.
Get Started Free →majiayu000/hook-development
Use when creating, modifying, or debugging Claude Code hooks — PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification. Covers the plugin `hooks/hooks.json` wrapper format vs. the user `settings.json` direct format, matchers, security patterns, `$CLAUDE_PLUGIN_ROOT` portability, lifecycle limitations, and debugging. Trigger on "add a hook", "validate tool use", "block dangerous commands", "enforce completion", "hook-based automation".
Passed 23 of 23 test cases with the skill, and 11 of 23 without it.
and 19 more in the full report
12 fixed11 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
We want to set up our continuous integration pipeline to run Claude Code with a reduced set of essential safety hooks while bypassing heavy auditing hooks. What environment variable and mode value should we set in CI, and how can developers temporarily disable individual hooks?
| Checked | Without skill | With skill |
|---|---|---|
| The response sets SO_HOOK_PROFILE to minimal for reduced hook execution. | Missed | Passed |
| The response specifies comma-separated hook names in SO_DISABLED_HOOKS for selective disabling. | Missed | Passed |
The instructions your model reads when the skill loads.
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 formattest cases passed, vs 11 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.