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.
- Type
- Skill
- Author
- anthropics
- Category
- Automation
- GitHub stars
- 44.8K
- Installs
- 6.9K
- Last updated
- November 2, 2026
Install
npx skills add https://github.com/anthropics/claude-plugins-official --skill hook-developmentUse cases
- Create a PreToolUse hook to validate tool use before it runs
- Block dangerous commands with a PostToolUse or Stop hook
- Set up event-driven automation in a Claude Code plugin
Frequently Asked Questions
Which hook events does this skill cover?
PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, and Notification.
Does it cover prompt-based hooks?
Yes, it focuses on the advanced prompt-based hooks API as well as general hook creation.
How is CLAUDE_PLUGIN_ROOT used?
The skill covers using ${CLAUDE_PLUGIN_ROOT} when building plugin hooks.
About this skill
Guides creating and implementing Claude Code plugin hooks, including the prompt-based hooks API. Covers events like PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, and Notification. Useful for setting up event-driven automation or blocking dangerous commands.
Summary written with AI assistance from the project's public description.
Categories
More from anthropics
Frontend Design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography,...
by anthropics
Skill Creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or...
by anthropics
Pptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks,...
by anthropics
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or mergi...
by anthropics
Similar Skills
Find Skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", o...
by vercel-labs
Grill Me
A relentless interview to sharpen a plan or design.
by mattpocock
Ai Video Generation
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0,...
by inference-sh
Ai Image Generation
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FL...
by inference-sh