What problem does it solve?
Provides structured guidance and tooling to create, validate, and manage event-driven hooks for Claude Code plugins so developers can enforce safety, policy, and automation at runtime without ad-hoc scripting.
Core Features & Use Cases
- Prompt-based and command hooks: Guidance for using LLM prompts for context-aware validation and bash/command hooks for deterministic checks.
- Event coverage: Patterns and examples for PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, and Notification events.
- Validation & testing tools: Includes schema validation, linting, test harnesses, example scripts, and best practices for timeouts, parallel execution, and environment persistence.
- Use Case: Enforce safe file writes and privileged command confirmation in a plugin by combining quick command checks with deeper prompt-based analysis and a session-start context loader.
Quick Start
Add a PreToolUse prompt hook that validates file writes for path traversal, sensitive filenames, and returns an approve or deny decision.