SKILL6.9K installs44.8K

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-development

Use cases


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


Similar Skills