hooks
Installation
SKILL.md
Claude Code Hooks
Overview
Create and configure Claude Code hooks to automate workflows, validate inputs, add context, and customize behavior across different events in the Claude Code lifecycle.
When to Use This Skill
Use this skill when users request:
- Creating hooks for any event (PreToolUse, PostToolUse, UserPromptSubmit, Stop, SubagentStop, SessionStart, SessionEnd, PreCompact, Notification, PermissionRequest)
- Setting up automation for tool usage validation or formatting
- Adding session context at startup
- Validating or blocking prompts
- Controlling when Claude should continue or stop
- Auto-approving or denying permissions
- Setting up notifications