hook-development
Develop and implement event-driven hooks for Claude Code plugins to validate tool use and automate workflows.
Install
mkdir -p .claude/skills/hook-development && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/428" && unzip -o skill.zip -d .claude/skills/hook-development && rm skill.zipInstalls to .claude/skills/hook-development
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Validate tool inputs before execution
- →Enforce policies on session events
- →Implement context-aware prompt-based hooks
- →Execute deterministic bash command hooks
- →Persist environment variables during session start
How it works
Hooks act as event-driven listeners that intercept specific Claude Code lifecycle events, allowing for either LLM-based prompt evaluation or script-based command execution.
Inputs & outputs
When to use hook-development
- →Validate tool inputs before execution
- →Enforce policies during tool use
- →Automate actions on session events
About hook-development
Provides an interface to create prompt-based or command-based hooks that respond to events like tool execution, session starts, or user prompts. It allows for advanced validation and context-aware logic in Claude Code sessions.
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.
When not to use it
- →Long-running background tasks
- →Modifying global state unpredictably
Prerequisites
Limitations
- →Cannot rely on specific hook execution order
- →Must avoid hardcoded paths for portability
How it compares
It provides a structured, event-driven framework for security and automation instead of relying on manual oversight or ad-hoc script execution.
Compared to similar skills
hook-development side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| hook-development (this skill) | 11 | 1y | Review | Advanced |
| opencode-cli | 14 | 10mo | Review | Advanced |
| claude-automation-recommender | 47 | 5mo | Review | Beginner |
| mcp-integration | 21 | 1y | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by anthropics
View all by anthropics →You might also like
opencode-cli
SpillwaveSolutions
This skill should be used when configuring or using the OpenCode CLI for headless LLM automation. Use when the user asks to "configure opencode", "use opencode cli", "set up opencode", "opencode run command", "opencode model selection", "opencode providers", "opencode vertex ai", "opencode mcp servers", "opencode ollama", "opencode local models", "opencode deepseek", "opencode kimi", "opencode mistral", "fallback cli tool", or "headless llm cli". Covers command syntax, provider configuration, Vertex AI setup, MCP servers, local models, cloud providers, and subprocess integration patterns.
claude-automation-recommender
anthropics
Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.
mcp-integration
anthropics
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.
agent-factory
alirezarezvani
Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns
swarm-advanced
ruvnet
Advanced swarm orchestration patterns for research, development, testing, and complex distributed workflows
opencode-orchestrator-creator
IgorWarzocha
Creates universal OpenCode orchestrator folder structure with specialized agent that can manage swarm servers via curl commands