create-hooks

Create and configure Claude Code hooks for automated workflows and command validation.

Updated Jan 5, 2026
One-click install
npx skills add https://github.com/Marcus-Mok-GH/Claude-code-conductor --skill create-hooks-marcus-mok-gh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-hooks
Source: https://github.com/Marcus-Mok-GH/Claude-code-conductor/tree/main/.claude/skills/create-hooks
Command: npx skills add https://github.com/Marcus-Mok-GH/Claude-code-conductor --skill create-hooks-marcus-mok-gh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides expert guidance for creating, configuring, and using Claude Code hooks, enabling automated workflows, command validation, and workflow customization without modifying core code.

Core Features & Use Cases

  • Create and Configure Hooks: Build custom hooks for various events like tool usage, session events, and user interactions.
  • Command and Prompt Hooks: Use command hooks for simple automation and prompt hooks for complex logic and decision-making.
  • Matcher and Pattern Matching: Apply regex patterns to match specific tools or tool categories for triggering hooks.
  • Security and Safety Checks: Implement safety checks and validation to prevent malicious or harmful behavior.

Quick Start

Use the create-hooks skill to set up a new hook that logs all Bash commands executed in a project directory.

Frequently Asked Questions about create-hooks

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

FAQPage Schema
How do I automate workflows and validate commands using Claude Code hooks?

Claude Code hooks automate workflows and validate commands by triggering custom scripts or LLM prompts during tool usage, session events, or user interactions. You can configure regex matchers to target specific tools and implement safety checks to prevent harmful behavior.

What is the difference between command hooks and prompt hooks for workflow automation?

Command hooks execute simple shell commands for straightforward automation, while prompt hooks leverage LLM prompts to handle complex logic and decision-making. Both hook types apply regex pattern matching to match specific tools or tool categories before triggering.

Do I need jq installed to configure event-driven hooks in Claude Code?

Yes, jq is required as a dependency to configure event-driven hooks in Claude Code. You also need knowledge of shell commands and LLM prompts to implement the hook logic effectively for automated workflows and command validation.

How do I set up a hook to log all Bash commands executed in a project directory?

To set up a Bash command logging hook, use the create-hooks guidance to configure a hook for tool usage events. Apply a regex matcher to target the Bash tool category, ensuring the hook triggers and logs every shell command executed during your Claude Code session.

Can I implement security checks to prevent malicious behavior with Claude Code hooks?

Yes, you can implement security checks and validation with Claude Code hooks to prevent malicious or harmful behavior. By configuring hooks with regex patterns and prompt-based logic, you can intercept and validate tool usage before execution.

When should I use regex matchers for triggering hooks on specific tools?

Use regex matchers when you need to trigger hooks selectively for specific tools or tool categories. This pattern matching capability allows you to apply automation and validation rules only to targeted events, preventing unnecessary execution on unrelated session interactions.