What problem does it solve?
Claude Code plugin hooks are powerful but easy to misconfigure, validate incorrectly, or implement insecurely; this skill helps you design hooks that correctly handle key lifecycle events and tool operations.
Core Features & Use Cases
- Prompt-based hooks for context-aware decisions: use LLM evaluation to approve, deny, or request clarification for actions at events like PreToolUse and Stop.
- Command hooks for deterministic validation: run bash scripts for fast checks, schema validation, security/path safety, and performance-critical gating.
- Correct configuration formats for plugins vs user settings: generate the right structure for hooks.json and settings.json and match hook events to the right matchers.
Real-world use case: enforce “safe file writes” by intercepting Write/Edit tool calls at PreToolUse, validating paths and sensitive content, and blocking dangerous operations before they run.
Quick Start
Ask Claude Code to implement prompt-based PreToolUse and Stop hooks for the user’s plugin to block unsafe tool actions and verify completion before stopping.