Individual skill
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.
plugins/plugin-dev/skills/hook-development/SKILL.md
Source commit a7ba5b93db0c7c8d17f3f1d25853adca79598a1a
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)
- 46,555
- Repository last updated
- Nov 8, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- claude-code Repository topic
- mcp Repository topic
- skills Repository topic
- 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 · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesSKILL.mdcore · 16,246 bytesexamples/load-context.shruns · 1,690 bytesexamples/validate-bash.shruns · 1,304 bytesexamples/validate-write.shruns · 1,222 bytesreferences/advanced.mddoc · 10,148 bytesreferences/migration.mddoc · 8,299 bytesreferences/patterns.mddoc · 7,144 bytesscripts/README.mddoc · 3,677 bytesscripts/hook-linter.shruns · 4,200 bytesscripts/test-hook.shruns · 5,336 bytesscripts/validate-hook-schema.shruns · 5,081 bytes
Read excerpt
# Hook Development for Claude Code Plugins
## Overview
Hooks are event-driven automation scripts that execute in response to Claude Code events. Use hooks to validate operations, enforce policies, add context, and integrate external tools into workflows.
**Key capabilities:**
- Validate tool calls before execution (PreToolUse)
- React to tool results (PostToolUse)
- Enforce completion standards (Stop, SubagentStop)
- Load project context (SessionStart)
- Automate workflows across the development lifecycle
## Hook Types