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