anthropics/claude-plugins-official

hook-development

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.

6.6K installs 42K stars

Before you install

Last update
Files in folder
11
Scripts
Contains scripts. Review them before running.
SKILL.md size
16 KB (about 4,062 tokens of context each time it loads)
License
Apache-2.0

Skills are plain text instructions the agent follows, sometimes with scripts. Check the source, prefer repositories with many installs and stars, and read any script it ships.

Install

npx skills add anthropics/claude-plugins-official@hook-development

Runs in a terminal with Node.js 18 or newer. Add -y to skip the prompts and -g to install for every project instead of this one.

Install for your agent

npx skills add anthropics/claude-plugins-official@hook-development --agent claude-code -y
Project install writes to
.claude/skills/hook-development
Global install writes to
~/.claude/skills/hook-development

Start a new session afterwards so the agent picks the skill up. In Claude Code you can also call it directly with /hook-development.

What it does

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…

Excerpt from the skill's own SKILL.md. Read the full file on GitHub before installing: skills run with your agent's permissions.

Categories

Related skills

  • frontend-design

    anthropics/claude-plugins-official

    Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

    17K installs 42KDesign & UI
  • claude-md-improver

    anthropics/claude-plugins-official

    Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".

  • claude-automation-recommender

    anthropics/claude-plugins-official

    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.

    8.5K installs 42KAI & agentsProductivity
  • playground

    anthropics/claude-plugins-official

    Creates interactive HTML playgrounds — self-contained single-file explorers that let users configure something visually through controls, see a live preview, and copy out a prompt. Use when the user asks to make a playground, explorer, or interactive tool for a topic.

    7.7K installs 42KAI & agents
  • skill-creator

    anthropics/claude-plugins-official

    Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

    7.3K installs 42K scriptsTestingAI & agents
  • agent-development

    anthropics/claude-plugins-official

    This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.

    6.9K installs 42K scriptsDesign & UIAI & agentsCode review

← Search skills

/skills/anthropics/claude-plugins-official/hook-development/