hookify-rules
This skill should be used when the user asks to create a hookify rule, write a hook rule, configure hookify, add a hookify rule, or needs guidance on hookify rule syntax and patterns.
Security Assessment
Detected risks:
About hookify-rules
The hookify-rules skill provides guidance for creating and managing Hookify rules that monitor specific patterns and trigger messages or actions based on defined conditions. It addresses the need for customizable workflow enforcement, safety checks, and automated reminders by allowing users to define rules in markdown files with YAML frontmatter. Instead of manually reviewing commands, file edits, or prompts for risky or undesired behavior, users can create structured rule definitions that automatically detect matching patterns and respond with warnings or blocking behavior when configured.
The skill supports rule creation through a structured file format that includes configurable fields such as rule names, event types, enabled states, patterns, and optional actions. It supports multiple event categories including bash commands, file modifications, prompt content, and completion events. More advanced scenarios can be configured using multiple conditions with supported operators such as regex matching, text containment, equality checks, and prefix or suffix matching. The skill also provides practical guidance for regular expression construction, common pattern-writing pitfalls, file organization conventions, and built-in commands for creating, listing, configuring, and reviewing Hookify rules.
This skill is useful for developers, technical teams, and users who want stronger workflow controls or coding safeguards in their environments. Common use cases include detecting dangerous shell commands, preventing insecure code patterns, monitoring sensitive file modifications, enforcing prompt workflows, and adding reminders before task completion. It is particularly valuable for teams that want configurable operational rules without manually reviewing every action.
FAQ
How do I create a new Hookify rule?
You can create a new rule using the /hookify command or by manually creating a markdown file in the .claude/ directory with YAML frontmatter and a rule message body.
What types of events can Hookify rules monitor?
Rules can monitor bash events, file events, stop events, prompt events, or all event types depending on the event field configuration.
Can a rule use multiple matching conditions?
Yes. Rules can use a conditions section with multiple entries. All defined conditions must match for the rule to trigger.
Are rules limited to simple pattern matching?
No. Rules can use either a single pattern field or more advanced condition-based matching with operators such as regex_match, contains, equals, starts_with, and ends_with.
Are there any file location requirements for Hookify rules?
Yes. Rules are stored in the .claude/ directory and follow the naming convention .claude/hookify.{descriptive-name}.local.md.
Install hookify-rules
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
affaan-m/everything-claude-code