CtrlK
BlogDocsLog inGet started
Tessl Logo

hook-development

This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.

58

Quality

68%

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

Fix and improve this skill with Tessl

tessl review fix ./plugins/plugin-dev/skills/hook-development/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

56%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 is rich in concrete, executable hook-development guidance with a solid validated implementation workflow, but it is roughly twice as long as it needs to be due to redundant restatements (duplicate plugin-format section, summary table, DO/DON'T list) and includes a contradictory example plus dead references to a missing examples/ directory. Tightening and moving the per-event API detail into the existing references/ files would substantially improve it.

Suggestions

Remove the duplicated content: delete or merge the 'Plugin Hook Configuration' section (it repeats and contradicts the wrapper-format rule from 'Plugin hooks.json Format'), and drop either the per-event 'Hook Events' sections or the 'Quick Reference' summary table and DO/DON'T lists that restate them.

Move the event-by-event API detail (per-event config, output, and input formats) into a file under references/ and keep only the overview, format distinction, and a quick-start example in SKILL.md, relying on the existing references/patterns.md and references/advanced.md for depth.

Fix the dead references: either add the promised examples/ directory (validate-write.sh, validate-bash.sh, load-context.sh) or update the citations in the SessionStart and Path Safety sections to point at real bundle paths.

DimensionReasoningScore

Conciseness

The ~710-line body duplicates itself: the 'Plugin Hook Configuration' section restates (and contradicts) the earlier 'Plugin hooks.json Format' wrapper rule, and the 'Quick Reference' events table plus 'Best Practices' DO/DON'T lists restate the per-event sections and scattered best-practice bullets. Several padded sections ('Benefits:', 'Use for:') add little; this matches 'noticeably verbose; several unnecessary explanations or padded sections' rather than the mostly-efficient anchor 3.

2 / 5

Actionability

Guidance is largely copy-paste ready — full hooks.json configs, a bash validation script with `set -euo pipefail` and jq field extraction, and test commands like `echo '{"tool_name": "Write", ...}' | bash ${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh`. Not a 5 because the second plugin-format example is inconsistent with the documented wrapper format, and referenced working examples ('examples/validate-write.sh', 'examples/load-context.sh') do not exist in the bundle.

4 / 5

Workflow Clarity

The 'Implementation Workflow' gives a clear 9-step sequence with explicit checkpoints ('Validate configuration with scripts/validate-hook-schema.sh', 'Test hooks with scripts/test-hook.sh', 'Test in Claude Code with claude --debug'). It falls short of anchor 5 because there is no explicit error-recovery loop (what to do when validation fails or a hook misbehaves beyond 'look for' debug logs).

4 / 5

Progressive Disclosure

References are one level deep and real for `references/patterns.md`, `references/migration.md`, `references/advanced.md` and the `scripts/` utilities, but the body also cites a nonexistent `examples/` directory twice, and event-by-event API detail (full config/output/input formats per event) is inlined in SKILL.md where it belongs in a reference file. This sits between anchor 3 ('content that should be separate is inline', 'references present but not clearly signaled' — here references are signaled but one target is missing) and anchor 4.

3 / 5

Total

13

/

20

Passed

Description

81%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.

This is a strong description with excellent natural trigger coverage, an explicit use-when clause, and a clearly delineated niche. Its main weakness is a generic capability statement ('comprehensive guidance for creating and implementing') that could name the concrete outcomes (write hooks.json configs, build prompt-based validators, create hook scripts) it supports.

DimensionReasoningScore

Specificity

The capability statement is generic — 'Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API' names the domain and one or two actions but lists no concrete distinct capabilities (compare anchor 5's 'extract text, fill forms, merge documents'). Concrete actions like 'validate tool use' and 'block dangerous commands' appear only as trigger quotes, not as capability descriptions, so this matches anchor 3 rather than 4.

3 / 5

Completeness

Both parts are present and explicit: 'when' via 'This skill should be used when the user asks to...' with concrete trigger phrases, and 'what' via 'Provides comprehensive guidance for creating and implementing Claude Code plugin hooks'. It stops short of anchor 5 because the 'what' is vague — 'comprehensive guidance' does not state what the skill actually enables the user to build or do.

4 / 5

Trigger Term Quality

Coverage is comprehensive and natural: 'create a hook', 'add a PreToolUse/PostToolUse/Stop hook', 'validate tool use', 'implement prompt-based hooks', 'set up event-driven automation', 'block dangerous commands', plus a full enumeration of all nine hook event names. These are exactly the phrases a user would say, matching the comprehensive-synonyms anchor 5 rather than the few-terms-missing anchor 4.

5 / 5

Distinctiveness Conflict Risk

The description occupies a clear niche (Claude Code plugin hooks) with distinct triggers — the event names (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification) and 'use ${CLAUDE_PLUGIN_ROOT}' are unambiguous hook-specific terms with minimal overlap risk against other skills.

5 / 5

Total

17

/

20

Passed

Validation

87%

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

Validation — 14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

skill_md_line_count

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

Warning

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

Total

14

/

16

Passed

Repository
anthropics/claude-plugins-official
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.