
Hook Development
Adds event-driven automation to Claude Code through hooks that respond to tool use, session events, and user prompts. The prompt-based hooks are the standout feature here: instead of writing bash scripts to validate operations, you give Claude natural language criteria and let it reason about whether a file write is safe or a task is actually complete. You can still use command hooks for deterministic checks, but the LLM-driven approach handles edge cases better and requires less maintenance. Most useful for enforcing policies (blocking dangerous commands, validating completeness before stopping) and loading project context automatically. Hook configuration goes in your plugin's hooks.json, and you get proper input/output formats with permission decisions and system messages.
- skills.sh installs
- 7.5K
- GitHub stars
- 46.7K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add anthropics/claude-plugins-official --skill hook-development --agent claude-codeInstalls into .claude/skills of the current project.
Files
Hook Development for Claude Code Plugins
Overview
Hooks are event-driven automation scripts that execute in response to Claude Code events. Use hooks to validate operations, enforce policies, add context, and integrate external tools into workflows.
Key capabilities:
- 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
Hook Types
Prompt-Based Hooks (Recommended)
Use LLM-driven decision making for context-aware validation:
{
"type": "prompt",
"prompt": "Evaluate if this tool use is appropriate: $TOOL_INPUT",
"timeout": 30
}
Supported events: Stop, SubagentStop, UserPromptSubmit, PreToolUse
Benefits:
- Context-aware decisions based on natural language reasoning
- Flexible evaluation logic without bash scripting
- Better edge case handling
- Easier to maintain and extend
Command Hooks
Execute bash commands for deterministic checks:
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh",
"timeout": 60
}
Sponsors
Details
- Repository
- github.com/anthropics/claude-plugins-official
- Categories
- Frontend Development, Backend & APIs, AI & Agent Building, Automation & Workflows
- First seen
- May 16, 2026
More from anthropics/claude-plugins-official
All 24- Mcp Integration7.5K
- Command Development7.4K
- Writing Hookify Rules7.4K
- Build Mcp Server7.4K
- Plugin Structure7.3K
- Plugin Settings7.3K
- Build Mcp App7.1K
- Build Mcpb6.9K
- Math Olympiad4.7K
- Configure4.5K
- Access4.5K
- Session Report4.3K
- M5 Onboard3.5K
- Cardputer Buddy3.5K
- Stripe Best Practices1.4K
- Example Skill208
- Frontend Design18.4K
- Claude Md Improver14.2K
- Claude Automation Recommender10.7K
- Playground8.6K
- Skill Creator8.3K
- Agent Development7.9K
- Skill Development7.7K