writing-hookify-rules
Explains hookify rule files: markdown with YAML frontmatter that sets the patterns to watch for and the message to show.
- Kind
- Skill
- Works with
- Claude Code
- Source
- anthropics/claude-plugins-official @ 58267944f921
- Path
- plugins/hookify/skills/writing-rules/SKILL.md
- Jobs
- Guardrails, Documentation
- Topics
- Blogs & articles
Credit
- Made by
- anthropics
- Original
- github.com/anthropics/claude-plugins-official/blob/58267944f9…
- License
- Apache-2.0
Listed by Skill Manifest; not made by us.
InstallInstall it from a plugin marketplace.
/plugin install hookify@claude-plugins-official
Install factsScanned 2 Nov 2026
- Adds
- .claude/skills/writing-rules/ (the skill folder)
- Runs scripts
- Yes
- shell block in the text
- Uses the network
- None found
- Needs secrets
- Yes
- API_KEY
- Reads environment variables
- API_KEY
- Source revision
- 58267944f921
- Licence
- Apache-2.0
- Last activity
- 1 Nov 2026
- Review
- Reviewed
Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.
- Only the main file is read; other files in the folder are not scanned
# 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
…