Writing Hookify Rules

Define YAML frontmatter Hookify rules for Claude hook events.

Updated Dec 1, 2025
One-click install
npx skills add https://github.com/stevessr/dotsfiles --skill writing-hookify-rules-stevessr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Hookify Rules
Source: https://github.com/stevessr/dotsfiles/tree/main/dot_claude/private_plugins/private_marketplaces/claude-code-plugins/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/stevessr/dotsfiles --skill writing-hookify-rules-stevessr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and maintaining Hookify rules for Claude can be tedious and error-prone; this skill provides a clear guide and reusable patterns to streamline rule creation.

Core Features & Use Cases

  • Defines YAML frontmatter-based rules that specify pattern matching and user-facing messages for hook events.
  • Supports both basic single-pattern rules and advanced multi-condition rules for bash and file edit events.
  • Includes workflow guidance for creating, testing, and refining rules within the project root.

Quick Start

Create a new .claude/hookify.{name}.local.md rule file with a simple pattern and a clear, actionable message.

Frequently Asked Questions about Writing Hookify Rules

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

FAQPage Schema
How do I write Hookify rules for Claude to validate bash and file events?

To write Hookify rules for Claude, you create YAML frontmatter-based markdown files specifying pattern matching and user-facing messages for bash and file edit events. Basic single-pattern rules and advanced multi-condition rules are both supported.

What is the file structure for creating a basic Hookify validation rule?

A basic Hookify validation rule is created as a .claude/hookify.{name}.local.md file in your project root. It uses YAML frontmatter to define rule metadata, pattern matching conditions, and clear actionable messages for detected hook events.

Can I use multi-condition rules for bash and file edit events in Hookify?

Yes, Hookify supports advanced multi-condition rules for bash and file edit events. You can define multiple pattern matching conditions within the YAML frontmatter to govern how Claude responds when specific patterns are detected.

How do I test and refine Hookify rules within my project?

You test and refine Hookify rules by creating them in the project root directory and validating that the YAML frontmatter conforms to naming and description requirements. The workflow involves iteratively adjusting pattern matching conditions and user-facing messages.

Does Hookify require YAML frontmatter for rule metadata and messaging?

Yes, Hookify requires YAML frontmatter to define rule metadata for pattern matching and messaging. The frontmatter must conform to specific naming and description requirements to properly govern how Claude responds to detected patterns.

Why are my Hookify rules not triggering when Claude detects patterns?

Hookify rules may not trigger if the YAML frontmatter does not conform to required naming and description specifications. Ensure your .claude/hookify.{name}.local.md file has correct pattern matching syntax and clear messaging for the specific bash or file events.