Agent skill · Documentation

writing-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.

Anthropic33,591★ · +352/wk · 2 repos on radarProfile →
claude-codeApache-2.0
Install
npx skills add anthropics/claude-plugins-official --skill writing-rules --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 8 KB
Bundled scripts: none
Version: 0.1.0
Path: plugins/hookify/skills/writing-rules/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 33,027 · +241 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 ```markdown --- 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 active - `false`: Rule is disabled (won't trigger) - Can toggle without deleting rule **event** (required): Which hook event to trigger on - `bash`: Bash tool commands - `file`: Edit, Write, MultiEdit tools - `stop`: When agent wants to stop - `prompt`: When user submits a prompt - `all`: All events **action** (optional): What to do when rule matches - `warn`: Show message but allow opera

What's inside
Steps it walks through
  1. Overview
  2. Rule File Format
  3. Basic Structure
  4. Frontmatter Fields
  5. Advanced Format (Multiple Conditions)
  6. Message Body
  7. Event Type Guide
  8. bash Events
  9. file Events
  10. stop Events
  11. prompt Events
  12. Pattern Writing Tips
  13. Regex Basics
  14. Testing Patterns
Commands it runs
python3 -c "import re; print(re.search(r'your_pattern', 'test text'))"
More from claude-plugins-official
All skills →
About this skill
What does the writing-hookify-rules skill do?

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.

How do I install it?

Run `npx skills add anthropics/claude-plugins-official --skill writing-rules --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From anthropics/claude-plugins-official, a repository with 33,027 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going