Individual skill
claude-code-hooks
Writes, tests, registers and debugs Claude Code hooks (PreToolUse, PostToolUse, SessionStart, Stop) that turn a rule the model keeps breaking into a hard gate. Use when the user wants to block or intercept a tool call, add a guard rail, fix a misfiring hook, or says 拦截 / 守卫 / 钩子 — including "make it stop doing X".
daymade-claude-code/claude-code-hooks/SKILL.md
Source commit 7c4d326ddd94d504e00e241ba49498e95160afbe
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 1,523
- Repository last updated
- Nov 10, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesSKILL.mdcore · 97,941 bytesreferences/hook_patterns.mddoc · 64,565 bytesreferences/hook_pitfalls.mddoc · 237,375 bytesreferences/shared-engine-lifecycle.mddoc · 11,914 bytesscripts/test_hook.group-name-guard.shruns · 5,043 bytesscripts/test_hook.shruns · 15,027 bytes
Read excerpt
# Claude Code Hooks
Claude Code fires **hooks** at tool-call boundaries. A hook is a shell command
that receives a JSON event on stdin and, for blocking hooks, decides via its
**exit code** whether the tool call proceeds. This is the only mechanism that
*structurally* stops a behavior — a prose rule in CLAUDE.md is a suggestion the
completion drive can override; a hook is a wall.
## When a hook is the right tool (and when it isn't)
Write a hook when **a rule keeps getting violated even though it's already
written down**. The tell: you added the prose rule, it read clearly, and the
behavior recurred anyway — because at the moment of action, attention is 100%
on "get the thing done" and the reminder loses. That recurrence is the signal