hooks
✓Create and manage Claude Code hooks for automating workflows, validating inputs, and customizing behavior. Use when users request to create hooks, set up automation for tool usage (PreToolUse, PostToolUse), add session context (SessionStart), validate prompts (UserPromptSubmit), control stopping behavior (Stop, SubagentStop), or configure permission handling (PermissionRequest).
Installation
SKILL.md
Create and configure Claude Code hooks to automate workflows, validate inputs, add context, and customize behavior across different events in the Claude Code lifecycle.
MANDATORY FIRST STEP: Before creating any hook, fetch the latest hooks documentation:
This ensures access to the most current hook events, JSON schemas, and best practices.
Create and manage Claude Code hooks for automating workflows, validating inputs, and customizing behavior. Use when users request to create hooks, set up automation for tool usage (PreToolUse, PostToolUse), add session context (SessionStart), validate prompts (UserPromptSubmit), control stopping behavior (Stop, SubagentStop), or configure permission handling (PermissionRequest). Source: benjaming/ai-skills.
Facts (cite-ready)
Stable fields and commands for AI/search citations.
- Install command
npx skills add https://github.com/benjaming/ai-skills --skill hooks- Source
- benjaming/ai-skills
- Category
- </>Dev Tools
- Verified
- ✓
- First Seen
- 2026-02-05
- Updated
- 2026-02-18
Quick answers
What is hooks?
Create and manage Claude Code hooks for automating workflows, validating inputs, and customizing behavior. Use when users request to create hooks, set up automation for tool usage (PreToolUse, PostToolUse), add session context (SessionStart), validate prompts (UserPromptSubmit), control stopping behavior (Stop, SubagentStop), or configure permission handling (PermissionRequest). Source: benjaming/ai-skills.
How do I install hooks?
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/benjaming/ai-skills --skill hooks Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Where is the source repository?
https://github.com/benjaming/ai-skills
Details
- Category
- </>Dev Tools
- Source
- skills.sh
- First Seen
- 2026-02-05