
Writing Hookify Rules
This walks you through creating Hookify rules, which are markdown files that watch for patterns in Claude's tool use and fire warnings or blocks when they match. You'd use it when you want to prevent dangerous bash commands, catch console.log statements before they ship, or enforce checklists before Claude stops working. The guide covers the YAML frontmatter structure, regex pattern writing, and the difference between simple pattern matches and multi-condition rules. It's thorough on the mechanics but light on philosophy. If you're setting up guardrails in a codebase where Claude might do something you'll regret later, this gives you the syntax and examples to write those rules quickly.
- skills.sh installs
- 168
- GitHub stars
- 476
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aiskillstore/marketplace --skill writing-hookify-rules --agent claude-codeInstalls into .claude/skills of the current project.
Files
Writing Hookify Rules
Overview
Hookify rules are markdown files with YAML frontmatter that define patterns to watch for and messages to show when those patterns match. Rules are stored in .claude/hookify.{rule-name}.local.md files.
Rule File Format
Basic Structure
---
name: rule-identifier
enabled: true
event: bash|file|stop|prompt|all
pattern: regex-pattern-here
---
Message to show Claude when this rule triggers.
Can include markdown formatting, warnings, suggestions, etc.
Frontmatter Fields
name (required): Unique identifier for the rule
- Use kebab-case:
warn-dangerous-rm,block-console-log - Be descriptive and action-oriented
- Start with verb: warn, prevent, block, require, check
enabled (required): Boolean to activate/deactivate
true: Rule is activefalse: Rule is disabled (won't trigger)- Can toggle without deleting rule
event (required): Which hook event to trigger on
bash: Bash tool commandsfile: Edit, Write, MultiEdit toolsstop: When agent wants to stopprompt: When user submits a promptall: All events
Sponsors
Details
- Repository
- github.com/aiskillstore/marketplace
- Category
- Documentation
- First seen
- Jun 3, 2026
More from aiskillstore/marketplace
All 37- Plugin Settings167
- Template Skill165
- Slack Gif Creator141
- Brand Guidelines137
- Claude Opus 4 5 Migration125
- Agent Skill Trust Check
- Alibaba Java Coding Guidelines Skill
- Diasporic Intelligence
- Example Skill
- Find Outlook Emails
- Manage Linkedin Network
- Network And Relationship Manager
- Organize Google Contacts
- Schedule With Google Calendar
- Schedule With Outlook
- Skill Creator1.1K
- Frontend Design255
- Xlsx238
- Webapp Testing235
- Pptx230
- Docx225
- Canvas Design203
- Doc Coauthoring202
- Agent Development199