hook development
Officialhook development
What it does
- Validate tool calls before execution (PreToolUse)
- React to tool results (PostToolUse)
- Enforce completion standards (Stop, SubagentStop)
- Load project context (SessionStart)
- Automate workflows across the development lifecycle
- Context-aware decisions based on natural language reasoning
- Flexible evaluation logic without bash scripting
Requirements & configuration
- "prompt": "Check if prompt requires security guidance. If discussing auth, permissions, or API security, return relevant warnings."
- Important: Hooks are loaded when Claude Code session starts. Changes to hook configuration require restarting Claude Code.
Configuration: TOOL_INPUTCLAUDE_ENV_FILETOOL_RESULTUSER_PROMPTCLAUDE_PROJECT_DIRCLAUDE_PLUGIN_ROOTCLAUDE_CODE_REMOTEFLAG_FILE
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
hook development FAQ
What does the hook development skill do?
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API. Validate tool calls before execution (PreToolUse) React to tool results (PostToolUse)
What does hook development require?
"prompt": "Check if prompt requires security guidance. If discussing auth, permissions, or API security, return relevant warnings." Important: Hooks are loaded when Claude Code session starts. Changes to hook configuration require restarting Claude Code. Configuration keys: TOOL_INPUT, CLAUDE_ENV_FILE, TOOL_RESULT, USER_PROMPT, CLAUDE_PROJECT_DIR, CLAUDE_PLUGIN_ROOT, CLAUDE_CODE_REMOTE, FLAG_FILE.
How do I install hook development?
Run: npx -y skills add https://github.com/anthropics/claude-code --skill hook development --agent claude-code — the source lives at github.com/anthropics/claude-code.
Maintain hook development?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/anthropics-claude-code-hook-development?ref=badge) npx agentictools info skills/anthropics-claude-code-hook-development The second line is the CLI lookup for this page — handy in READMEs and docs.