anthropics avatar

Hook Development

If you're building Claude Code plugins and need them to respond to specific events in the development workflow, this is your reference. It covers the hook system that lets you intercept and react to things like tool calls, completions, and session starts. The docs walk through both prompt-based hooks (using the LLM for context-aware decisions) and function-based hooks for deterministic logic. Most useful when you need to enforce policies, validate operations before they run, or automatically load project context. The examples are clear about PreToolUse, PostToolUse, and the various stop events. Think of it as the wiring layer between Claude's actions and your custom automation logic.

skills.sh installs
1
GitHub stars
141.9K
last updated
Aug 21, 2026

Install

$ npx -y skills add anthropics/claude-code --skill 'Hook Development' --agent claude-code

Installs into .claude/skills of the current project.

Files

If you're building Claude Code plugins and need them to respond to specific events in the development workflow, this is your reference. It covers the hook system that lets you intercept and react to things like tool calls, completions, and session starts. The docs walk through both prompt-based hooks (using the LLM for context-aware decisions) and function-based hooks for deterministic logic. Most useful when you need to enforce policies, validate operations before they run, or automatically load project context. The examples are clear about PreToolUse, PostToolUse, and the various stop events. Think of it as the wiring layer between Claude's actions and your custom automation logic.

Browse the repository on GitHub

Sponsors

Details

Repository
github.com/anthropics/claude-code
Categories
Frontend Development, Backend & APIs, AI & Agent Building, Automation & Workflows
First seen
Jun 3, 2026

More from anthropics/claude-code

All 10
1aden-hive avatarbrowser-edge-casesaden-hive/hiveSOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with S0skills.sh installs
2agentworkforce avatarimplementing-command-palettesagentworkforce/relayThis covers the mechanical details of building Cmd+K command palettes in React without the infinite re-render headaches.0skills.sh installs
3agnosticui avatarcheck-accessibilityagnosticui/agnosticuiReview component for accessibility issues0skills.sh installs
4agnosticui avatarimplement-ag-playbookagnosticui/agnosticuiImplement a playbook from its PROMPT specification files. Supports both single-framework (PROMPT-REACT.md, etc.) and 3-framework (PROMPT-3-FRAMEWORKS.md) modes.0skills.sh installs
5agnosticui avatarimplement-github-featureagnosticui/agnosticuiDesign and implement a new feature or component from a GitHub issue. Use for net-new functionality, not bug fixes.0skills.sh installs
6cloudposse avatardocs-stylescloudposse/docsCSS styles, color themes, and visual conventions for docs.cloudposse.com. Use when styling components, mermaid diagrams, or working with site theming.0skills.sh installs