Writing Hookify Rules

Define and enforce Hookify rules for pattern-based checks in Claude workflows.

Updated Jan 13, 2026
One-click install
npx skills add https://github.com/lusya123/cloudcode --skill writing-hookify-rules-lusya123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Hookify Rules
Source: https://github.com/lusya123/cloudcode/tree/main/claude-code-main/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/lusya123/cloudcode --skill writing-hookify-rules-lusya123

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hookify rule management provides a structured way to define, validate, and enforce policy-driven patterns and messages for code edits and prompts, reducing misconfigurations and risky changes.

Core Features & Use Cases

  • Declarative, frontmatter-driven rule files stored in .claude/hookify.{name}.local.md
  • Supports events: bash, file, stop, prompt, all
  • Clear, actionable messages and conditional patterns to guide user actions

Quick Start

Create a new hookify rule file at .claude/hookify.{descriptive-name}.local.md that defines a rule for a specific 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 create custom rules to enforce security guidelines in Claude workflows?

You create Hookify rules by defining declarative, frontmatter-driven markdown files in the .claude directory to govern pattern-based checks and messaging for code edits. This enforces policy-driven security guidelines and reduces risky changes.

What are Hookify rules and how do they validate prompt and file events?

Hookify rules are frontmatter-driven markdown files that define conditional patterns and actionable messages to validate events like bash, file, stop, and prompt. They provide a structured way to enforce policy-driven checks and reduce misconfigurations.

How do I write regex patterns for Hookify rule files?

To write regex patterns for Hookify rule files, create a new markdown file at .claude/hookify.descriptive-name.local.md and define conditional regex patterns matching your target event. This applies to creating, editing, and validating rule definitions for your workflow.

Does Hookify support events for both bash commands and file edits?

Yes, Hookify supports creating and validating rule files for bash, file, stop, prompt, and all events. This allows you to enforce specific pattern-based checks and messaging across different stages of your Claude workflows.

What is the best way to structure frontmatter in local rule markdown files?

The best way to structure frontmatter in local rule markdown files is to use a declarative format that satisfies the specific frontmatter requirements for Hookify. This structured approach ensures clear, actionable messages and proper validation for your defined rules.

Why are my Hookify rules not working when I try to enforce checks on prompts?

Your Hookify rules may not be working if the markdown file does not satisfy the required frontmatter fields or if the regex patterns do not match the prompt event correctly. Properly validating and testing rule definitions ensures the checks trigger properly.