Skill

Hook Development

Author lifecycle hooks with guidance on event selection, configuration and validation.

hooksauthoringdevelopment
View original source ↗

When to choose it

Adding event-triggered workflow automation to a plugin.

Choose it if: You are adding lifecycle automation to a plugin and need help choosing events and configurations.

Look elsewhere if: You want a ready-to-run hook script; this is an authoring skill whose output still needs validation.

What the source describes

  • Explains hook events and configuration
  • Includes authoring patterns
  • Separates instructions from hook implementation

Requirements

  • Install the containing Plugin Dev package

This is a component of Plugin Dev. Install the containing package once to get its components.

Install the containing plugin

  1. Choose the repository. Run the install from the repository where you want local scope.
  2. Check marketplace availability. If the official marketplace is not registered, run claude plugin marketplace add anthropics/claude-plugins-official first.
  3. Load the package. After installation, start a new session or run /reload-plugins in an open session. Confirm the package and scope with claude plugin list.
  4. Prepare the authoring task. Identify the event, target tools, desired behavior, and plugin directory before asking for a hook.
  5. Authoring requirement 2. For a plugin, request hooks/hooks.json plus a script when deterministic command logic is needed; use ${CLAUDE_PLUGIN_ROOT} for portable file references.
  6. Authoring requirement 3. The bundled validator uses Bash and jq; the test helper additionally calls timeout. These are helper requirements, not requirements for merely reading the skill.
  7. Authoring requirement 4. Provide any external checker your proposed hook calls, and review generated configuration against current Claude Code hooks documentation.

Run the installation command in your shell after reviewing the source. Local scope enables the package for you in this repository. It does not enable it for every collaborator.

Shell • local install scope
claude plugin install plugin-dev@claude-plugins-official --scope local
Installation and loading troubleshooting

How to use it

Claude can select this skill when the request matches its description. To request it directly, use this name derived from current official naming rules and the reviewed metadata; it has not been runtime tested.

Claude Code session
/plugin-dev:hook-development

Provide the event, workflow or server details you want this authoring Skill to work from. This request example is written by ClaudeStack; it is not a transcript of a tested session.

Request example
Create a PostToolUse command hook for Write and Edit in my documentation plugin. Run our existing Markdown link checker after a change. Show hooks/hooks.json, a portable script, and a harmless sample input.

This skill supplies authoring guidance; the generated hook still needs validation with the installed Claude Code version.

The upstream guide mixes wrapper and event-map examples and says all hook edits need a restart. Current official settings examples use a hooks key and normally detect settings edits automatically.

What to expect

The reviewed source describes these observations. ClaudeStack has not loaded or run this extension.

  • A hooks/hooks.json draft, supporting command script when needed, and README setup notes.
  • The package includes validate-hook-schema.sh, test-hook.sh, and hook-linter.sh, plus examples for Bash checks, write validation, and session context.

Self-check: Review the generated event, case-sensitive matcher, portable script path and harmless sample input. Validate against current hooks documentation before enabling the authored hook.

Troubleshooting

Hook never fires

inspect /hooks to confirm its source and event, then check the matcher against the exact tool name; matchers are case-sensitive.

Script fails to launch

verify its path and executable/interpreter requirements, then use claude --debug and read the hook log for the shell error.

Disable or remove it

  • In /skills, highlight the skill, press Space until off, then Esc to save the local visibility override.
  • claude plugin disable plugin-dev@claude-plugins-official --scope local (shell).
  • claude plugin uninstall plugin-dev@claude-plugins-official --scope local (shell).
  • These commands target the local installation used by the catalog. Match --scope to your actual installation. Package disable affects its other components too.
  • Disabling the authoring skill or package does not disable configuration files it helped you create in another plugin or your project. Manage those artifacts at their own location.
  • For an authored settings hook, remove its entry from the settings file. For a hook bundled in a different plugin, disable that plugin. /hooks is a read-only inspector.

Limitations & considerations

  • This is an authoring skill, not a ready-to-run hook
  • Validate generated examples against your installed Claude Code version

Source & review record

Our description is based on public documentation and manifests available on 2026-10-05. Installation formats were checked against Claude Code and the relevant installer documentation. No extension code was executed: this is a source review, not a runtime compatibility test or security audit.

Usage guide sources

Upstream revision checked for this guide: d182ca456ca09d31d139f7d3818d1d333b103cce. Command names and behavior in this guide are documentation and registration-source findings, not runtime verification.

More skills

Browse this type
Skill

Skill Development

Guidance on clear skill triggers, concise instructions and progressive disclosure.

AnthropicOfficial component
Skill

MCP Integration

Authoring guidance for connecting tool servers to a Claude Code plugin.

AnthropicOfficial component
Skill

Writing Rules

A Hookify skill for defining readable rules with event and pattern conditions.

AnthropicOfficial component

Each listing records its own source-review date. Listings are documentation reviews, not runtime tests or security audits. Our editorial method