hooks-designer

Design and debug Claude Code lifecycle event handlers for automated enforcement.

4|1|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/AreteDriver/ai-skills --skill hooks-designer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hooks-designer
Source: https://github.com/AreteDriver/ai-skills/tree/main/personas/claude-code/hooks-designer
Command: npx skills add https://github.com/AreteDriver/ai-skills --skill hooks-designer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables the creation and debugging of custom lifecycle event handlers (hooks) for Claude Code, automating quality gates, safety checks, and workflow processes during tool execution.

Core Features & Use Cases

  • Design Quality Gates: Implement hooks to enforce coding standards, ensure tests pass before commits, or validate output.
  • Build Safety Rails: Create hooks to block dangerous operations like writing to sensitive directories or force-pushing to main branches.
  • Implement Logging: Set up hooks to audit tool usage and track file modifications.
  • Use Case: Automatically format code on save using prettier or black by creating a PostToolUse hook.

Quick Start

Create a PreToolUse hook that blocks git commit commands if tests have not passed.

Frequently Asked Questions about hooks-designer

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

FAQPage Schema
How do I create Claude Code hooks to block dangerous operations like force-pushing?

Custom Claude Code hooks automate quality gates by implementing PostToolUse lifecycle event handlers that trigger auto-linting or formatting tools like prettier after file modifications. You configure these handlers in Claude settings to enforce coding standards.

How do I automate code formatting and linting after Claude Code edits a file?

Custom Claude Code hooks automate quality gates by implementing PostToolUse lifecycle event handlers that trigger auto-linting or formatting tools like prettier after file modifications. You configure these handlers in Claude settings to enforce coding standards.

What are Claude Code PreToolUse and PostToolUse lifecycle event handlers?

Claude Code hooks for audit logging capture tool usage and file modifications by implementing custom lifecycle event handlers. These handlers parse stdin JSON during the PreToolUse or PostToolUse execution context to track and record operational data.

How do I set up audit logging for tool usage in Claude Code?

Claude Code hooks for audit logging capture tool usage and file modifications by implementing custom lifecycle event handlers. These handlers parse stdin JSON during the PreToolUse or PostToolUse execution context to track and record operational data.

Why is my Claude Code hook not blocking tool execution?

Claude Code hooks fail to block execution when the lifecycle event handler returns exit code 0 instead of 2, or improperly parses the stdin JSON payload. Correctly configuring exit codes and JSON parsing in Claude settings resolves enforcement failures.