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.
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.
إرشادات الخبراء لإنشاء خطافات Claude Code وتكوينها واستخدامها. يُستخدم عند العمل باستخدام الخطافات، أو إعداد مستمعي الأحداث، أو التحقق من صحة الأوامر، أو أتمتة سير العمل، أو إضافة إشعارات، أو فهم أنواع الخطافات (PreToolUse، وPostToolUse، وStop، وSessionStart، وUserPromptSubmit، وما إلى ذلك). المصدر: glittercowboy/taches-cc-resources.