writing-hookify-rules

Create and manage Hookify rules with YAML frontmatter and Markdown message bodies.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/SPRAGE/dev-template --skill writing-hookify-rules-sprage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/SPRAGE/dev-template/tree/main/templates/python/.claude/skills/writing-rules
Command: npx skills add https://github.com/SPRAGE/dev-template --skill writing-hookify-rules-sprage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hookify rules define patterns and messages to guide Claude's behavior, enabling safer and more predictable interactions.

Core Features & Use Cases

  • Defines rules as Markdown files with YAML frontmatter to watch for specific patterns and trigger messages.
  • Stores rules in .claude/hookify.{rule-name}.local.md and supports basic and advanced conditions.
  • Useful for enforcing style, safety prompts, and workflow guidance across prompts and edits.

Quick Start

Create a new rule file in the .claude directory with a descriptive name and YAML frontmatter, plus a Markdown message body.

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 hookify rules to guide Claude prompts with YAML frontmatter?

To create hookify rules, you define a Markdown file with YAML frontmatter containing a name and description, plus a Markdown body for messages. Store the rule file in the .claude directory to watch for prompt patterns and trigger guidance.

What is a hookify rule and how does it enforce prompt patterns?

A hookify rule is a Markdown file with YAML frontmatter that watches for specific patterns in prompts and edits, then displays guidance messages. It enforces style, safety prompts, and workflow guidance by matching conditions and triggering messages.

How do I add advanced conditions to hookify rules for pattern matching?

You can add advanced conditions to hookify rules by using the optional fields in the YAML frontmatter such as event, conditions, and pattern. These fields allow you to specify precise pattern matching logic for your prompts and edits.

Can I use hookify rules for syntax checks in development and QA workflows?

Yes, hookify rules are applied in development and QA workflows where users request pattern-based guidance or syntax checks. They help enforce style and safety prompts across prompts and Markdown rule files.

Where should hookify rule files be stored in my project directory?

Hookify rule files should be stored in the .claude directory using the naming convention hookify.{rule-name}.local.md. This ensures the rules are properly loaded to watch for patterns and display guidance messages.

What fields are required in the YAML frontmatter for a hookify rule?

The YAML frontmatter for a hookify rule requires a name and description field. Optional fields include event, conditions, and pattern, which allow for advanced pattern matching and message triggering.