writing-hookify-rules

Create Hookify rules for bash events using regex patterns.

Updated May 13, 2026
One-click install
npx skills add https://github.com/vepat-a11y/Odoo-Quote-Calc --skill writing-hookify-rules-vepat-a11y
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/vepat-a11y/Odoo-Quote-Calc/tree/main/.claude-user/plugins/marketplaces/claude-plugins-official/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/vepat-a11y/Odoo-Quote-Calc --skill writing-hookify-rules-vepat-a11y

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill simplifies the process of writing Hookify rules, which are used to monitor and control code and file edits within a Claude environment.

Core Features & Use Cases

  • Rule Creation: Guide users in creating rules to monitor code and file changes.
  • Syntax and Pattern Explanation: Offer explanations and examples for common rule patterns and regex expressions.
  • Event Type Guide: Provide a detailed guide on the different event types available for rule triggering (bash, file, stop, prompt, all).
  • Pattern Writing Tips: Offer best practices for writing effective regex patterns and handling common pitfalls.
  • File Organization: Explain how to properly name and store rule files in the .claude/ directory.
  • Workflow Guide: Outline the workflow for creating, refining, and disabling rules.
  • Quick Start: Use the writing-hookify-rules skill to write a basic Hookify rule for bash events that warns about the use of dangerous rm commands.

Quick Start

To write a rule for warning about dangerous rm commands, follow these steps:

  1. Open a text editor and create a file named hookify.dangerous-rm.local.md in the .claude/ directory.
  2. Add the following content to the file:
---
name: dangerous-rm
enabled: true
event: bash
pattern: rm\s+-rf
---
  1. Save the file and the next time you use a tool, the rule will trigger and display a warning.

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 a Hookify rule to warn about dangerous bash commands?

To write a Hookify rule for dangerous bash commands, create a markdown file in the `.claude/` directory, set the `event` field to `bash`, and use a regex pattern like `rm\s+-rf` to trigger warnings.

What event types are available for triggering Hookify rules?

Hookify rules can be triggered using several event types: `bash`, `file`, `stop`, `prompt`, and `all`, allowing you to monitor different actions within your environment.

How should I name and store Hookify rule files?

Hookify rule files should be stored in the `.claude/` directory. A standard naming convention is `hookify.[rule-name].local.md`, ensuring proper organization and recognition by the system.

What is the best way to write regex patterns for monitoring file edits?

The best way to write regex patterns for file edits is to follow established best practices for regex syntax, focusing on accurately matching target strings while avoiding common pattern matching pitfalls.

Can I disable a Hookify rule without deleting the file?

Yes, you can disable a Hookify rule by setting the `enabled` field to `false` in the rule's markdown frontmatter, allowing you to retain the rule configuration without active triggering.

Does Hookify support monitoring all file changes at once?

Yes, Hookify supports monitoring all file changes at once by setting the event type to `all`, which triggers the rule across multiple event categories within the environment.