writing-hookify-rules

Create and manage Hookify rules using YAML frontmatter and regex patterns.

Updated May 29, 2026
One-click install
npx skills add https://github.com/Hex-4/dots --skill writing-hookify-rules-hex-4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/Hex-4/dots/tree/main/dot_claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/Hex-4/dots --skill writing-hookify-rules-hex-4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill simplifies the process of creating and managing Hookify rules, streamlining the configuration of patterns and messages to enforce code quality and best practices.

Core Features & Use Cases

  • Rule Creation: Define patterns and messages for various hook events like bash commands, file edits, and user prompts.
  • Regex Pattern Matching: Utilize regex to create precise conditions for rule triggers.
  • Event Type Specificity: Handle bash, file, stop, prompt, and all events for comprehensive rule management.
  • Message Customization: Craft informative messages that guide users or block actions as needed.
  • Advanced Rule Crafting: Support for complex rules with multiple conditions and conditional logic.
  • Use Case: When writing a new rule to prevent the execution of potentially dangerous bash commands, this skill provides a framework to create and implement the rule effectively.

Quick Start

Use the writing-hookify-rules skill to create a new rule that warns about the use of 'rm -rf' in bash scripts.

Frequently Asked Questions about writing-hookify-rules

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

FAQPage Schema
How do I automate rule creation for Hookify to enforce code quality?

Automate Hookify rule creation by defining regex patterns and custom messages within YAML frontmatter. This enforces code quality by triggering warnings or blocking actions across bash scripts, file edits, and user prompts.

Can I use regex to block dangerous bash commands in my scripts?

Yes, you can use regex to match dangerous bash commands. By configuring regex patterns in your Hookify rules, you can detect commands like 'rm -rf' and trigger informative messages or block the execution entirely.

What types of events can I target when managing Hookify rules?

Hookify rule management supports targeting bash, file, stop, prompt, and all events. This allows you to apply regex pattern matching and customized messages to specific operational scenarios for comprehensive coverage.

How do I write complex rules with multiple conditions for file edits?

Write complex rules for file edits using YAML frontmatter that supports multiple conditions and conditional logic. This framework allows you to combine regex patterns to create precise triggers for specific editing scenarios.

Does creating Hookify rules require any external dependencies?

No, creating Hookify rules requires no external dependencies. You can define patterns and messages directly using YAML frontmatter and regex to enforce operational best practices without needing additional packages.

What is the best way to customize warning messages for user prompts?

The best way to customize warning messages for user prompts is to craft informative text within your Hookify rule definitions. These messages are triggered by regex pattern matches to guide users or block actions as needed.