writing-hookify-rules

Define hookify rules with YAML frontmatter for bash, file, stop, and prompt events.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/murphyjoseph/dojo-kit --skill writing-hookify-rules-murphyjoseph
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/murphyjoseph/dojo-kit/tree/main/.agents/skills/writing-hookify-rules
Command: npx skills add https://github.com/murphyjoseph/dojo-kit --skill writing-hookify-rules-murphyjoseph

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hookify rules provide a structured way to specify patterns and corresponding messages that govern Claude's behavior in code and prompts, reducing drift and repetitive tasks.

Core Features & Use Cases

  • YAML frontmatter driven rule metadata (name, enabled, event, pattern) with clear messages to surfaces to Claude.
  • Support for single-pattern and multi-condition rules via a conditions block for complex scenarios.
  • Reusable templates for alerting, blocking, or guiding actions across bash, file edits, prompts, and stop events.

Quick Start

Create a new .claude/hookify.{name}.local.md in your project root and test it by triggering a sample event.

Frequently Asked Questions about writing-hookify-rules

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

FAQPage Schema
How do I define custom linting rules to enforce governance patterns for Claude interactions?

You define custom linting rules for Claude by creating hookify rule files with YAML frontmatter specifying the name, enabled state, event type, and watch patterns. This governs Claude's behavior across bash, file edits, prompts, and stop events.

What is a hookify rule and how does it guide AI behavior in workflows?

A hookify rule is a structured markdown file with YAML frontmatter that specifies watch patterns and user-facing messages to govern Claude's behavior. It reduces prompt drift and repetitive governance tasks by enforcing pattern-based interactions.

Can I use regex patterns to trigger multi-condition rules across different event types?

Yes, hookify rules support regex patterns across bash, file, stop, and prompt events. You can define single-pattern rules directly or use a conditions block to configure multi-condition patterns for complex governance scenarios.

How do I create and test a hookify rule file in my project?

Create a new .claude/hookify.{name}.local.md file in your project root with the required YAML frontmatter fields like name, enabled, event, and pattern. Test the rule by triggering a sample event that matches your specified watch patterns.

What are the limitations of using pattern-based rules for workflow governance?

Pattern-based hookify rules rely on matching regex patterns for bash, file, prompt, and stop events. Complex governance logic may require multi-condition blocks, and rules must be individually enabled in frontmatter to function within the specified event scope.

Does hookify support blocking actions or only alerting messages during Claude interactions?

Hookify rules support reusable templates for alerting, blocking, or guiding actions across bash, file edits, prompts, and stop events. Optional conditions and actions fields in the frontmatter enable advanced behavior beyond simple pattern matching.