Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dicklesworthstone/hooks-reference
Use this skill when asked about "hooks", "PreToolUse", "PostToolUse", "SessionStart", "hook events", "validate tool use", "block commands", "add context on session start", or implementing event-driven automation.
Passed 24 of 25 test cases with the skill, and 15 of 25 without it.
and 10 more in the full report
9 fixed15 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
I want to configure a single PreToolUse hook entry in Claude Code hooks.json that matches both Write and Edit tools simultaneously using a pattern string. What matcher string should be used?
| Checked | Without skill | With skill |
|---|---|---|
| The matcher string is set to Write|Edit. | Missed | Passed |
The instructions your model reads when the skill loads.
This skill provides comprehensive guidance for implementing Claude Code hooks - event handlers that automate validation, context loading, and workflow enforcement.
| Event | When Triggered | Use Cases |
|---|---|---|
PreToolUse | Before tool executes | Validate, block, modify |
PostToolUse | After tool completes | Audit, react, verify |
PermissionRequest | Permission dialog shown | Auto-allow, auto-deny |
Stop | Claude finishes | Force continue, verify |
SubagentStop | Subagent finishes | Verify task complete |
SessionStart | Session begins | Load context, setup |
SessionEnd | Session ends | Cleanup, save state |
UserPromptSubmit | Prompt submitted | Validate, add context |
PreCompact | Before compaction | Preserve info |
Notification | Notification sent | Alert, log |
Basic structure:
{
"description": "What these hooks do",
"hooks": {
"EventName": [
{
"matcher": "Pattern",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/handler.sh",
"timeout": 30
}
]
}
]
}
}
test cases passed, vs 15 / 25 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.