Install any skill in seconds. Free to start, no credit card required.
Get Started Free →aiskillstore/claude-code-hooks
Claude Code hook system for pre/post tool execution.
Passed 25 of 25 test cases with the skill, and 18 of 25 without it.
and 7 more in the full report
7 fixed18 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
I need a Claude Code pre-tool hook that runs on every single tool invocation regardless of tool name. What matcher pattern should I specify in the configuration?
| Checked | Without skill | With skill |
|---|---|---|
| The response specifies asterisk as a matcher pattern for all tools. | Missed | Passed |
The instructions your model reads when the skill loads.
Execute custom scripts before/after Claude Code tool invocations.
| Event | When | Has Matcher |
|---|---|---|
PreToolUse | Before tool execution | Yes |
PostToolUse | After tool completes | Yes |
PermissionRequest | Permission dialog shown | Yes |
Notification | Notifications sent | Yes |
UserPromptSubmit | User submits prompt | No |
Stop | Agent finishes | No |
SubagentStop | Subagent finishes | No |
PreCompact | Before context compaction | No |
SessionStart | Session begins/resumes | No |
SessionEnd | Session ends | No |
Add to ~/.claude/settings.json or .claude/settings.local.json:
{
"hooks": {
"PreToolUse": [{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/hooks/validate.sh",
"timeout": 5000
}]
}]
}
}
test cases passed, vs 18 / 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.