home / skills / 89jobrien / steve / claude-hooks
This skill helps you create and configure Claude Code hooks for validation, logging, and automation to streamline workflows.
npx playbooks add skill 89jobrien/steve --skill claude-hooksReview the files below or copy the command above to add this skill to your agents.
---
name: claude-hooks
description: Claude Code hooks configuration specialist. Use when creating hooks for
tool validation, logging, notifications, or custom automation in Claude Code.
author: Joseph OBrien
status: unpublished
updated: '2025-12-23'
version: 1.0.1
tag: skill
type: skill
---
# Claude Hooks Skill
Creates and configures hooks for Claude Code to automate workflows and extend functionality.
## What This Skill Does
- Creates PreToolUse validation hooks
- Sets up PostToolUse logging/cleanup
- Configures notification hooks
- Implements custom automation
- Documents hook patterns
## When to Use
- Tool execution validation
- Audit logging
- Custom notifications
- Workflow automation
- Security controls
## Reference Files
- `references/CLAUDE_HOOK.template.md` - Hook configuration examples and patterns
## Hook Events
| Event | Trigger | Use Case |
|-------|---------|----------|
| PreToolUse | Before tool executes | Validation, blocking |
| PostToolUse | After tool completes | Logging, cleanup |
| Notification | Claude sends notification | Alerts |
| Stop | Claude stops | Final reports |
## Configuration Location
Hooks are configured in `~/.claude/settings.json` under the `hooks` key.
## Best Practices
- Keep hooks fast (< 1 second)
- Handle errors gracefully
- Use specific matchers
- Test hooks independently
- Avoid verbose output
This skill configures and manages Claude Code hooks to validate tools, log activity, send notifications, and run custom automations. It provides patterns and templates to add PreToolUse, PostToolUse, Notification, and Stop hooks quickly and safely. Use it to enforce policies, capture audit trails, and automate cleanup or alerts.
The skill generates and updates hook definitions stored in the CLAUDE configuration file and supplies ready-to-use templates for common events. It wires PreToolUse hooks for input validation and blocking, PostToolUse hooks for logging and cleanup, Notification hooks for alerts, and Stop hooks for final reporting. It also includes matchers and examples to scope hooks to specific tools or contexts.
Where are hooks stored?
Hooks are configured in the Claude settings file under the hooks key (typically ~/.claude/settings.json).
How do I limit a hook to a single tool?
Use specific matchers in the hook definition to target a tool name, tool type, or metadata field. Narrow match criteria to avoid unintended triggers.
What should a hook return on error?
Return a safe default and an error log entry. Avoid throwing uncaught exceptions—fail safe so the main workflow can continue if necessary.