Writing Hookify Rules

Define and store Hookify rules in .claude/hookify.{name}.local.md files.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/JupitLunar/website --skill writing-hookify-rules-jupitlunar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Hookify Rules
Source: https://github.com/JupitLunar/website/tree/main/.agent/skills/rule-identifier
Command: npx skills add https://github.com/JupitLunar/website --skill writing-hookify-rules-jupitlunar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a structured way to create and manage Hookify rules for Claude, ensuring consistent guidance and safety prompts across prompts, edits, and other monitored events.

Core Features & Use Cases

  • Rule definition: Write YAML frontmatter templates and Markdown bodies to describe patterns and the messages shown when they match.
  • Local rule storage: Rules are stored as .claude/hookify.{name}.local.md files for easy testing and versioning.
  • Guided usage: Supports basic and advanced rule formats with event types such as bash, file, stop, and prompt.

Quick Start

Create a new local rule file in the project root, for example .claude/hookify.dangerous-action.local.md, containing the frontmatter with name, enabled, event, and pattern, followed by the message to display when triggered.

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 validate Claude prompts and bash events?

To create custom Hookify rules, you define YAML frontmatter templates and Markdown bodies in a .claude/hookify.{name}.local.md file, specifying the event type, pattern, and warning message to display when triggered.

What is a Hookify rule and when do I need to use it for Claude?

A Hookify rule is a structured configuration that provides consistent guidance and safety prompts for Claude across monitored events like file edits and bash commands. You need it to validate patterns and generate warnings or blocks automatically.

Can I use Hookify rules to block dangerous bash commands or file edits?

Yes, Hookify rules support bash, file, stop, and prompt event types. You can define patterns to match dangerous actions and configure the rule to generate warnings or blocks when those patterns are detected during execution.

How do I write advanced Hookify rules for complex pattern matching?

Advanced Hookify rules build on the basic YAML frontmatter format by supporting complex pattern definitions for various event types. You write them in .claude/hookify.{name}.local.md files, combining event triggers with detailed matching logic.

Does Hookify support local rule storage for testing and versioning?

Yes, Hookify rules are stored as .claude/hookify.{name}.local.md files in your project root. This local storage format enables easy testing and versioning alongside your existing project configuration.

What are the limitations of Hookify rules for event validation?

Hookify rules are limited to supported event types including bash, file, stop, and prompt. They apply pattern validation and generate warnings or blocks, but require proper YAML frontmatter structure in local .md files to function correctly.

Related Skills