hookify-rules

Author Hookify rules with YAML frontmatter and precise regex patterns.

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/llmh333/employee_management_spring --skill hookify-rules-llmh333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hookify-rules
Source: https://github.com/llmh333/employee_management_spring/tree/main/.gemini/skills/hookify-rules
Command: npx skills add https://github.com/llmh333/employee_management_spring --skill hookify-rules-llmh333

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hookify rule writing is difficult because you must correctly structure YAML frontmatter, choose the right event type, and craft regex or conditions that match only what you intend.

Core Features & Use Cases

  • Rule Authoring Guidance: Explains the required frontmatter fields (name, enabled, event, pattern) and optional fields like action and conditions.
  • Pattern & Syntax Help: Provides tips for writing precise regex patterns, escaping characters correctly, and avoiding overly broad matches.
  • Event-Specific Condition Support: Documents how to write conditions for bash, file, stop, and prompt events so rules trigger for the right inputs.
  • Use Case: Create a rule that blocks or warns when risky operations occur, such as writing or editing sensitive files, while ensuring the match is accurate and testable.

Quick Start

Use the /egc-hookify command to create a new Hookify rule for detecting edits to .env files.

Frequently Asked Questions about hookify-rules

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

FAQPage Schema
How do I write YAML frontmatter rules for file or bash events?

To write YAML frontmatter rules, you must define required fields like name, enabled, event, and pattern, while using kebab-case naming and optional conditions to scope file, bash, or prompt events accurately.

How do I create regex patterns that match specific file paths without overmatching?

Writing safe regex patterns requires escaping characters correctly and avoiding overly broad matches so your rules trigger only for the intended file events and inputs.

What are the required and optional fields for a Hookify rule?

Required Hookify rule fields include name, enabled, event, and pattern, while optional fields like action and conditions allow you to configure specific rule behaviors and event scoping.

How do I add security guardrails to block risky file editing operations?

You can add security guardrails by creating rules that block or warn when risky operations occur, such as writing or editing sensitive files, ensuring the match is accurate and testable.

Why does my event rule trigger when it should not match?

Event rules trigger incorrectly when regex patterns are overly broad or conditions for bash, file, stop, and prompt events are not scoped properly to the right inputs.