Writing Hookify Rules

Document Hookify rule authoring with YAML frontmatter fields and conditions.

2|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/Poorgramer-Zack/copilot-cli-things --skill writing-hookify-rules-poorgramer-zack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Hookify Rules
Source: https://github.com/Poorgramer-Zack/copilot-cli-things/tree/main/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/Poorgramer-Zack/copilot-cli-things --skill writing-hookify-rules-poorgramer-zack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hookify rule authoring can be confusing without a consistent reference. This guide clarifies how to define rules using a YAML frontmatter with required fields and optional conditions, helping teams create predictable, testable behavior.

Core Features & Use Cases

  • Clear frontmatter schema for rules: name, enabled, event, pattern, and optional conditions.
  • Supports single-condition and multi-condition rules across events like bash, file, stop, and prompt.
  • Provides practical examples and testing tips to validate rules before deployment.

Quick Start

Create a new rule file using YAML frontmatter and place it under .github/hookify/<name>.local.md.

Frequently Asked Questions about Writing Hookify Rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Hookify rules using YAML frontmatter?

To write Hookify rules, define a YAML frontmatter block with required fields: name, enabled, event, and pattern. You can add optional conditions for single or multi-condition rules across Bash, File, Stop, and Prompt events.

What frontmatter fields are required for Hookify validation rules?

Required frontmatter fields for Hookify validation rules are name, enabled, event, and pattern. Optional conditions can be appended to build multi-condition rules with specific field and operator guidance.

Where should I place Hookify rule files for local testing?

Place Hookify rule files under the .github/hookify/ directory using the <name>.local.md naming convention. This ensures your YAML frontmatter rules are discovered and validated for predictable behavior before deployment.

Can I use multiple conditions in a single Hookify rule?

Yes, Hookify supports multi-condition rules by defining optional conditions in the YAML frontmatter. You can combine field, operator, and pattern guidance across Bash, File, Stop, and Prompt events for complex validation logic.

What events are supported by Hookify rules?

Hookify rules support Bash, File, Stop, and Prompt events. You configure the target event in the YAML frontmatter event field to trigger validation patterns and conditions safely.

How do I test Hookify rules to ensure safe execution?

Test Hookify rules by validating the YAML frontmatter schema and applying the provided testing tips before deployment. This ensures your single-condition and multi-condition rules execute predictably across configured events.

Related Skills