aiskillstore avatar

Hook Development

Helps you build event-driven automation for Claude Code using hooks that trigger on tool use, session events, and stop conditions. The real value is in the prompt-based hooks API, which lets you use LLM reasoning to validate tool calls or enforce policies instead of writing brittle bash scripts. You can block dangerous file writes, verify task completion before stopping, or inject project context on session start. The documentation clearly separates the plugin hooks.json format (which needs a wrapper object) from the settings format (which doesn't), something easy to mess up. If you're building plugins or want to add guardrails to your workflow, this covers the full hook lifecycle with practical examples for each event type.

skills.sh installs
188
GitHub stars
476
last updated
Aug 21, 2026

Install

$ npx -y skills add aiskillstore/marketplace --skill hook-development --agent claude-code

Installs into .claude/skills of the current project.

Files

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:

{
  "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:

{
  "type": "command",
  "command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh",
  "timeout": 60
}

Sponsors

Details

Repository
github.com/aiskillstore/marketplace
Categories
Frontend Development, Backend & APIs, AI & Agent Building, Automation & Workflows
First seen
Jun 3, 2026

More from aiskillstore/marketplace

All 37
1ingpoc avatarscroll-storytelleringpoc/skillsUse when creating interactive scroll-based storytelling experiences with mouse-following spotlight effects, animated SVG art, and the Anthropic design language.186skills.sh installs
2davila7 avatarplugin-forgedavila7/claude-code-templatesCreate and manage Claude Code plugins with proper structure, manifests, and marketplace integration. Use when creating plugins for a marketplace, adding plugin 184skills.sh installs
3delorenj avatarfal-text-to-imagedelorenj/skillsGenerate, remix, and edit images using fal.ai's AI models. Supports text-to-image generation, image-to-image remixing, and targeted inpainting/editing.184skills.sh installs
4levnikolaevich avatarln-637-test-structure-auditorlevnikolaevich/claude-code-skillsAudits test maintainability and structure: layout drift, orphan tests, fragmented duplicates, test-to-source mapping, and domain grouping. Use when auditing tes184skills.sh installs
5davepoon avatarauth-patternsdavepoon/buildwithclaudeThis skill should be used when the user asks about "authentication in Next.js", "NextAuth", "Auth.js", "middleware auth", "protected routes", "session managemen182skills.sh installs
6zhylq avatarzhy-wechat-writingzhylq/yuan-skillsUse when generating a complete WeChat article from a topic, with optional source research, evidence tracking, illustration, HTML conversion, and draft-box publi181skills.sh installs