writing-hookify-rules

Create hookify rules with YAML frontmatter and regex patterns for Claude Code workflows.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/aah-stack/anthropic --skill writing-hookify-rules-aah-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/aah-stack/anthropic/tree/main/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/aah-stack/anthropic --skill writing-hookify-rules-aah-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users create and configure hookify rules correctly by turning desired safety checks, reminders, and workflow controls into valid rule definitions.

Core Features & Use Cases

  • Rule Creation Guidance: Helps write hookify markdown rules with correct YAML frontmatter, events, patterns, and messages.
  • Pattern Design Support: Guides regex creation and advanced multi-condition matching for bash, file, prompt, and stop events.
  • Use Case: Developers can use this Skill to add project safeguards such as warnings for dangerous commands, sensitive file edits, or missing completion checks.

Quick Start

Ask the writing-hookify-rules skill to create a hookify rule that warns when a specific risky command or code pattern is detected.

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 for Claude Code workflows?

Hookify rules for Claude Code workflows require valid YAML frontmatter, event-based detection patterns, regex matching, and response messages to monitor bash commands, file changes, prompts, and completion states.

What is a hookify rule and when do I need one for bash command monitoring?

A hookify rule is a markdown configuration with YAML frontmatter defining event-based detection patterns and response messages. You need one for bash command monitoring to enforce project safeguards like warnings for dangerous commands or sensitive file edits.

Can I use regex patterns for multi-condition matching in Claude Code hookify rules?

Yes, Claude Code hookify rules support regex patterns and advanced multi-condition matching across bash, file, prompt, and stop events to accurately detect specific risky commands or code patterns.

How do I add a warning for sensitive file edits using hookify rules?

To add a warning for sensitive file edits, define a file change validation hookify rule with correct YAML frontmatter, regex patterns matching target file paths, and conditional matching to trigger the desired warning response message.

Does creating hookify rules require specific YAML frontmatter formatting conventions?

Yes, creating hookify rules requires valid YAML frontmatter formatting conventions. The skill enforces correct rule formatting by requiring defined events, regex patterns, conditional matching logic, and properly structured response messages.

What are the limitations when defining event-based detection patterns in hookify rules?

Event-based detection patterns in hookify rules are constrained to specific event types: bash command monitoring, file change validation, prompt checks, and completion reminders. Valid regex patterns and conditional matching are required for accurate detection without false positives.