This file is byte-identical to the first copy the registry indexed, one of 5 indexed copies. Same content hash, so the same checks give both the same grade.
hook-development from anthropics/claude-plugins-official is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
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…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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:
```json
{
"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:
```json
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh",
"timeout": 60
}
```
…
The line at the top of this page pins the label v0.1.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_zpr4be24if5k2ezk
GET https://markdownregistry.com/api/v1/resolve?ref=anthropics/claude-plugins-official/hook-development
GET https://markdownregistry.com/api/v1/blob/f47e2d42f6360294216a859ae0c30b93caafdd2b2e5ffc007489ba4ca447fa5c
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
anthropics/claude-plugins-official · external_plugins/discord/skills/access/SKILL.md · Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair…
anthropics/claude-plugins-official · external_plugins/discord/skills/configure/SKILL.md · Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token…
anthropics/claude-plugins-official · external_plugins/imessage/skills/access/SKILL.md · Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to…
anthropics/claude-plugins-official · external_plugins/imessage/skills/configure/SKILL.md · Check iMessage channel setup and review access policy. Use when the user asks to configure iMessage, asks "how do I set…
anthropics/claude-plugins-official · external_plugins/telegram/skills/access/SKILL.md · Manage Telegram channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to…
anthropics/claude-plugins-official · external_plugins/telegram/skills/configure/SKILL.md · Set up the Telegram channel — save the bot token and review access policy. Use when the user pastes a Telegram bot…
anthropics/claude-plugins-official · plugins/claude-code-setup/skills/claude-automation-recommender/SKILL.md · Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when…
anthropics/claude-plugins-official · plugins/claude-md-management/skills/claude-md-improver/SKILL.md · Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix…
anthropics/claude-plugins-official · plugins/claude-security/skills/claude-security/SKILL.md · Claude Security: scan the codebase (the whole repository or a scoped part of it), scan changes (this branch's or a pull…
anthropics/claude-plugins-official · plugins/cwc-makers/skills/cardputer-buddy/SKILL.md · Iterate on the Cardputer-Adv MicroPython app bundle (Claude Buddy, Snake, Hello) after the device is already…
anthropics/claude-plugins-official · plugins/example-plugin/skills/example-command/SKILL.md · An example user-invoked skill that demonstrates frontmatter options and the skills/<name>/SKILL.md layout
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-forgecat/platforms/codex/.agents/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate…
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-codex/.agents/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate…
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-cursor/.cursor/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook",
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-forgecat/platforms/cursor/.cursor/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate…
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-forgecat/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate…
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-claude/.claude/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook",
kanevry/session-orchestrator · skills/hook-development/SKILL.md · Use when creating, modifying, or debugging Claude Code hooks — PreToolUse, PostToolUse, Stop, SubagentStop…
kanevry/session-orchestrator · .agents/skills/hook-development/SKILL.md · Use when creating, modifying, or debugging Claude Code hooks — PreToolUse, PostToolUse, Stop, SubagentStop…