hooks-reference

Reference Claude Code hooks specifications and configuration guidelines.

1|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/silenvx/flow-development-program --skill hooks-reference-silenvx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hooks-reference
Source: https://github.com/silenvx/flow-development-program/tree/main/examples/dekita/.claude/skills/hooks-reference
Command: npx skills add https://github.com/silenvx/flow-development-program --skill hooks-reference-silenvx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Claude Code hooks documentation provides clear specifications, design principles, and configuration guidance for building reliable PreToolUse, Stop, and hook implementations, helping teams align on behavior across sessions.

Core Features & Use Cases

  • Detailed function signatures, JSON output patterns, and testing templates for new hooks.
  • Guidance for migrating to HookContext, consistent logging, and systemMessage generation.
  • Design-alignment checks with related Skills to ensure hook behavior matches skill rules.

Quick Start

Review an existing hook, generate a compliant skeleton using HookContext, and implement it with proper input parsing and JSON output.

Frequently Asked Questions about hooks-reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Claude Code hooks using HookContext for safe JSON output?

Implement Claude Code hooks using HookContext by generating a compliant skeleton with proper input parsing, enforcing safe JSON outputs, consistent logging, and systemMessage generation across PreToolUse and Stop implementations.

What is the best way to design testable PreToolUse and Stop hooks in Claude Code?

Design testable PreToolUse and Stop hooks by aligning with HookContext patterns, utilizing detailed function signatures, and applying provided testing templates to ensure maintainability and consistent behavior across sessions.

Can I migrate existing Claude Code hook implementations to HookContext without breaking sessions?

Migrate existing Claude Code hook implementations to HookContext by following provided design principles and configuration guidance, ensuring hook behavior aligns with skill rules and maintains consistent logging during the transition.

How does Claude Code enforce consistent systemMessage generation across hook configurations?

Claude Code enforces consistent systemMessage generation by providing detailed specifications and design-alignment checks that ensure hook behavior matches skill rules and maintains safe JSON output patterns across all configurations.

Do I need specific JSON output patterns for Claude Code hooks to maintain testability?

Specific JSON output patterns are required for Claude Code hooks to maintain testability, as the reference provides detailed function signatures and enforces safe JSON outputs alongside consistent logging and systemMessage generation.

Why should I use HookContext patterns instead of standard hook implementations in Claude Code?

Use HookContext patterns instead of standard hook implementations to achieve better testability, maintainability, and design-alignment with related Skills, ensuring consistent logging and safe JSON outputs across PreToolUse and Stop hooks.