What problem does it solve?
Hooks for Claude Code plugins can be difficult to design, test, and maintain across environments; this Skill provides patterns, scripts, and reference material to validate tool usage, enforce policies, and automate lifecycle events so agents behave safely and predictably.
Core Features & Use Cases
- PreToolUse & PostToolUse Validation: Approve, deny, or modify tool calls (file writes, bash commands) before or after execution using prompt-based or command hooks.
- Lifecycle Enforcement: Stop and SubagentStop hooks verify completeness (tests, builds) and SessionStart/SessionEnd hooks load or persist environment context.
- Utilities & Testing: Built-in scripts to lint hooks, validate hooks.json schema, and run hook tests; examples show write/command validations and load-context patterns.
- Use Case: Prevent accidental writes to system paths, require tests after code edits, and add project-specific environment variables at session start.
Quick Start
Add a PreToolUse prompt hook that validates file writes and denies operations that touch system paths or contain secrets.