writing-hookify-rules

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

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/angrybeagles/weather-dashboard --skill writing-hookify-rules-angrybeagles
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/angrybeagles/weather-dashboard/tree/main/.claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/angrybeagles/weather-dashboard --skill writing-hookify-rules-angrybeagles

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hookify rules provide a structured way to define safety and guidance for prompts and edits in Claude, ensuring consistent responses and prevent misuse.

Core Features & Use Cases

  • Define and manage hookify rule files in .claude/hookify.{name}.local.md.
  • Offer templates and guidance to craft safe, effective rules for various events (bash, file, prompt).
  • Test and iterate rules locally to enforce best practices and reduce risky prompts.

Quick Start

Create a sample hookify rule file illustrating a basic pattern and 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 create local prompt safety rules for Claude edits?

You create local prompt safety rules by defining YAML frontmatter in .claude/hookify.{name}.local.md files. Hookify rules use fields like name, enabled, event, and pattern to match unsafe terms and display guidance messages.

What events can I target with Hookify rules for pattern matching?

Hookify rules support pattern matching across bash, file, and prompt events. You specify the target event using the event field in the YAML frontmatter of your local rule file.

Can I add conditional logic to markdown frontmatter rules for Claude?

Yes, you can add optional conditions to markdown frontmatter rules using the conditions field in the YAML header. This allows you to refine when the rule triggers alongside the required pattern and event fields.

How do I write a custom guidance message when a risky prompt is detected?

You write a custom guidance message in the Markdown body of the hookify rule file. The YAML frontmatter handles pattern detection, while the Markdown body provides the user-facing message shown when a match occurs.

What is the best way to manage and test local AI rule templates?

The best way to manage local AI rule templates is creating .claude/hookify.{name}.local.md files with YAML frontmatter. You can toggle rules using the enabled field and iterate on them locally to enforce best practices.

Why are my Hookify rules not triggering on bash commands?

Hookify rules may not trigger if the enabled field is false or the event field is not set to bash. Verify the pattern matches your target command and that all optional conditions are correctly formatted in the YAML frontmatter.