CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

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".

Quality

85%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

70%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body delivers exceptional, original, empirically-grounded guidance with exhaustive validation gates and copy-paste-ready code — among the most actionable hook material imaginable. Its weakness is sheer bulk: pervasive repetition of the same loop-safety mechanics, multiple war stories, and inlined failure anatomies that the file's own Maintenance policy says belong in references/hook_pitfalls.md, leaving a ~98KB loaded-at-trigger surface.

Suggestions

Apply the file's own Maintenance policy to rules 5, 7, and 9 and the step-4 selftest essay: move the dated war stories and failure anatomies into references/hook_pitfalls.md, keeping only the contract-level rule statement plus a one-line anchored pointer in SKILL.md — this fixes both the conciseness and progressive-disclosure scores at once.

State the consecutive-block ceiling / stop_hook_active / counter-reset-on-tool-continuation mechanics once (the hook-types table or rule 7) and point to it from every other mention; the same ~200-token explanation currently appears at least four times.

Cut the maintenance meta-history (the 2026-08-02 rationale, the 10k→50k growth narrative, the four-frame design review) down to the operative rule — where new content goes — since the history does not change what the next session should do.

DimensionReasoningScore

Conciseness

The ~98KB body is noticeably verbose: the consecutive-block ceiling / stop_hook_active mechanics are explained at least four separate times (hook-types table, the Stop bullet, twice inside rule 7, again in the war story), rule 7 alone runs ~450 lines with multiple dated war stories and a sequel, and meta-history prose ("what grew this file 10k→50k chars", the four-frame design review) pads sections. Not 1: nearly everything is original, measured, hard-won knowledge rather than concepts Claude already knows, and it does assume competence. Not 3: the repetition and anecdote density are pervasive across sections, not occasional tightening opportunities.

2 / 5

Actionability

Fully executable throughout: the registration gate is copy-paste ready ("bash -n hook.sh", printf of real JSON events piped to the hook with expected exit codes), the receipt-keying, session-counter, and capped-exit `continue:false` snippets are exact runnable bytes, and the test prescriptions (says rows, mutation kills, after-remediation row pairs, corpus replay with scratch TMPDIR) specify commands and expected outcomes. The one placeholder ("# ... precise detection here ...") is explicitly justified flexibility with full runnable skeletons shipped in references/hook_patterns.md. Not 4: even remediation-message testing is prescribed at the byte level ("assemble the exact bytes, run them, drive the same event through the hook again").

5 / 5

Workflow Clarity

The 9-step "Build order (in sequence)" is explicitly gated (don't register until the harness is green; replay a real corpus before registering; verify a real matching event in a fresh native session), and feedback loops are everywhere: fix → re-validate, mutate each row to prove it can die, re-replay the block list, after-remediation row pairs that check convergence. Not 4: validation checkpoints are exhaustive and each carries its failure direction, not present-with-minor-gaps.

5 / 5

Progressive Disclosure

All five bundle files exist, are exactly one level deep, with verified working deep anchors (pitfall #36, the shlex walker section, AFTER-REMEDIATION ROWS in test_hook.sh) and a clear "Reference material" section — but by the file's own stated Maintenance policy ("a fresh pitfall or failure anatomy → references/hook_pitfalls.md"), large amounts of reference-type content are inlined in SKILL.md itself: the rule 5/7/9 war stories and failure anatomies and the step-4 selftest essay. Not 4: the inlining is bulk (rule 7 alone is hundreds of lines), not a minor organization gap; not 2: structure and navigation are good and references are surfaced and well-signaled, not buried.

3 / 5

Total

15

/

20

Passed

Description

96%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

An exemplary description: concrete lifecycle verbs, a precisely scoped domain with the four hook types named, an explicit Use-when clause with natural, colloquial, and multilingual trigger phrases, and a memorable one-line statement of purpose. The only soft spot is slight overlap risk with settings/config skills around registration and the broad phrase "add a guard rail".

DimensionReasoningScore

Specificity

"Writes, tests, registers and debugs" names four concrete lifecycle actions on a precisely scoped domain ("Claude Code hooks (PreToolUse, PostToolUse, SessionStart, Stop)"), covering the full hook lifecycle with no visible gaps. Not 4: the action list is comprehensive (build → validate → deploy → repair) rather than having minor coverage holes.

5 / 5

Completeness

The "what" is exact (writes/tests/registers/debugs hook types that "turn a rule the model keeps breaking into a hard gate") and the "when" is an explicit "Use when..." clause with concrete trigger phrases. This matches the anchor-5 pattern of clearly and explicitly answering both what and when.

5 / 5

Trigger Term Quality

Covers natural phrasings users would actually say — "block or intercept a tool call", "add a guard rail", "fix a misfiring hook", "make it stop doing X" — plus non-English triggers (拦截 / 守卫 / 钩子). Not 4: even the colloquial indirect request ("make it stop doing X") and multilingual variants are explicitly included, leaving no common phrasing family uncovered.

5 / 5

Distinctiveness Conflict Risk

The niche is clear — event-name triggers (PreToolUse, Stop), "fix a misfiring hook" — but hook registration runs through settings.json and "add a guard rail" is broad phrasing, creating minor overlap with a settings/config-management skill. Not 5: those registration-adjacent triggers could fire for the wrong skill; not 3: the hook-type names and debugging angle keep it well above generic overlap.

4 / 5

Total

19

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

skill_md_line_count

SKILL.md is long (1383 lines); consider splitting into references/ and linking

Warning

Total

15

/

16

Passed

Repository

daymade/claude-code-skills

Path

daymade-claude-code/claude-code-hooks/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.