Individual skill
create-hooks
Expert guidance for creating, configuring, and using Claude Code hooks. Use when working with hooks, setting up event listeners, validating commands, automating workflows, adding notifications, or understanding hook types (PreToolUse, PostToolUse, Stop, SessionStart, UserPromptSubmit, etc).
skills/create-hooks/SKILL.md
Source commit 1757615b99ab789a72ff2d02e9f6112af2a15c04
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 1,986
- Repository last updated
- Apr 1, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- anthropic Repository topic
- claude Repository topic
- claudecode Repository topic
- prompts Repository topic
- commands Repository topic
- skills Repository topic
- subagents Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 9,425 bytesSKILL.mdcore · 9,425 bytesSKILL.mdcore · 9,425 bytesSKILL.mdcore · 9,425 bytesreferences/command-vs-prompt.mddoc · 6,784 bytesreferences/examples.mddoc · 12,543 bytesreferences/hook-types.mddoc · 9,068 bytesreferences/input-output-schemas.mddoc · 9,134 bytesreferences/matchers.mddoc · 7,497 bytesreferences/troubleshooting.mddoc · 9,581 bytes
Read excerpt
<objective>
Hooks are event-driven automation for Claude Code that execute shell commands or LLM prompts in response to tool usage, session events, and user interactions. This skill teaches you how to create, configure, and debug hooks for validating commands, automating workflows, injecting context, and implementing custom completion criteria.
Hooks provide programmatic control over Claude's behavior without modifying core code, enabling project-specific automation, safety checks, and workflow customization.
</objective>
<context>
Hooks are shell commands or LLM-evaluated prompts that execute in response to Claude Code events. They operate within an event hierarchy: events (PreToolUse, PostToolUse, Stop, etc.) trigger matchers (tool patterns) which fire hooks (commands or prompts). Hooks can block actions, modify tool inputs, inject context, or simply observe and log Claude's operations.
</context>
<quick_start>
<workflow>
1. Create hooks config file:
- Project: `.claude/hooks.json`