hook-creator

Design and validate Claude Code hooks with templates and safety checks.

3|3|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/twikus/claude-configuration --skill hook-creator-twikus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-creator
Source: https://github.com/twikus/claude-configuration/tree/main/claude-code-config/skills/meta-hooks-creator
Command: npx skills add https://github.com/twikus/claude-configuration --skill hook-creator-twikus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of designing and validating Claude Code hooks.

Core Features & Use Cases

  • Templates and guidance for PreToolUse, PostToolUse, Stop, SessionStart, and UserPromptSubmit enable consistent hook behavior across projects.
  • Validation and safety patterns provide checks to prevent unsafe operations, enforce best practices, and improve reliability.
  • Context injection and automation patterns describe how to inject context, trigger notifications, and chain hooks for complex workflows.
  • Use Case: bootstrap a robust hook system for a project with auditable configurations and predictable outcomes.

Quick Start

  • Create a basic hook configuration in .claude/hooks.json to log and validate a PreToolUse event for a Bash command.
  • Run claude --debug to verify hook matching, inputs, and output behavior.

Frequently Asked Questions about hook-creator

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

FAQPage Schema
How do I create and validate Claude Code hooks for workflow automation?

To create and validate Claude Code hooks, use structured templates and safety patterns for events like PreToolUse and PostToolUse. This enforces consistent behavior, reliable context injection, and auditable configurations across your projects.

What is the difference between command and prompt hooks in Claude Code?

Command hooks execute shell commands for automated checks, while prompt hooks inject context to guide Claude's reasoning. Choosing between command versus prompt hooks depends on whether your workflow requires strict validation or flexible contextual automation.

How do I set up a PreToolUse hook for Bash validation in Claude Code?

Set up a PreToolUse hook by defining a configuration in .claude/hooks.json to log and validate Bash commands. Run claude --debug to verify hook matching, inspect inputs, and ensure predictable outcomes before tool execution.

When should I use SessionStart and UserPromptSubmit hooks in Claude Code?

Use SessionStart hooks to initialize project context and UserPromptSubmit hooks to validate or augment user inputs. These event-driven hooks ensure your automation workflows maintain required safety considerations and structured schemas from the beginning.

Can I chain multiple hooks together for complex event-driven workflows?

Yes, you can chain hooks together to build complex event-driven workflows. Chaining hooks allows you to trigger notifications, inject context sequentially, and enforce validation patterns across PreToolUse, PostToolUse, and Stop events reliably.

Why are my Claude Code hooks not matching or executing correctly?

Hook matching issues often stem from unstructured input/output schemas or incorrect configurations. Run claude --debug to verify hook matching, inspect event inputs, and ensure your hook configurations follow the required safety patterns.