HO

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.zip

Installs 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.
525 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

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

You give it
Hook event trigger and associated context data
You get back
JSON decision output to allow, deny, or modify execution

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

Claude Code plugin environmenthooks.json configuration file

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.

SkillInstallsUpdatedSafetyDifficulty
hook-development (this skill)111yReviewAdvanced
opencode-cli1410moReviewAdvanced
claude-automation-recommender475moReviewBeginner
mcp-integration211yReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by anthropics

View all by anthropics →

frontend-design

anthropics

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

481544

pptx

anthropics

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

393763

webapp-testing

anthropics

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

353585

mcp-builder

anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

136215

skill-creator

anthropics

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

128200

docx

anthropics

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

93225

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.

14174

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.

47140

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.

21123

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

8109

swarm-advanced

ruvnet

Advanced swarm orchestration patterns for research, development, testing, and complex distributed workflows

7110

opencode-orchestrator-creator

IgorWarzocha

Creates universal OpenCode orchestrator folder structure with specialized agent that can manage swarm servers via curl commands

8104

Search skills

Search the agent skills registry