Stack Gems
Menu
← Skills

Hook Development

PreToolUse and friends, in plugins

Anthropic · Apache-2.0

When

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.

The Catch

PreToolUse/PostToolUse/Stop hooks with ${CLAUDE_PLUGIN_ROOT}. Does not trigger without that plugin layout.

Embed

Maintainer? Add the badge to your README. It is free, links to this review, and there is no paid version.

Reviewed on Stack Gems

Markdown

[![Reviewed on Stack Gems](https://stackgems.com/badge/skill/hook-development.svg)](https://stackgems.com/skills/hook-development)