- [Overview](#overview)
/plugin marketplace add athola/claude-night-market/plugin install hookify@claude-night-marketThis skill inherits all available tools. When active, it can use any tool Claude has access to.
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.
Create .claude/hookify.dangerous-rm.local.md:
---
name: dangerous-rm
enabled: true
event: bash
pattern: rm\s+-rf
action: block
---
š **Dangerous rm command detected!**
This command could delete important files.
Verification: Run the command with --help flag to verify availability.
The rule activates immediately - no restart needed!
name (required): Unique identifier (kebab-case)
enabled (required): true or false
event (required): bash, file, stop, prompt, or all
action (optional): warn (default) or block
pattern (simple): Regex pattern to match
For multiple field checks:
---
name: warn-env-edits
enabled: true
event: file
action: warn
conditions:
- field: file_path
operator: regex_match
pattern: \.env$
- field: new_text
operator: contains
pattern: API_KEY
---
š **API key in .env file!**
Ensure file is in .gitignore.
Verification: Run the command with --help flag to verify availability.
regex_match: Pattern matchingcontains: Substring checkequals: Exact matchnot_contains: Must NOT containstarts_with: Prefix checkends_with: Suffix checkbash events: command
file events: file_path, new_text, old_text, content
prompt events: user_prompt
stop events: transcript
\s - whitespace\d - digit\w - word character. - any character (use \. for literal dot)+ - one or more* - zero or more| - OR**Verification:** Run the command with `--help` flag to verify availability.
rm\s+-rf ā rm -rf
console\.log\( ā console.log(
chmod\s+777 ā chmod 777
Verification: Run the command with --help flag to verify availability.
python3 -c "import re; print(re.search(r'pattern', 'text'))"
Verification: Run the command with --help flag to verify availability.
---
name: block-destructive
enabled: true
event: bash
pattern: rm\s+-rf|dd\s+if=|mkfs
action: block
---
š **Destructive operation blocked!**
Can cause data loss.
Verification: Run the command with --help flag to verify availability.
---
name: warn-debug
enabled: true
event: file
pattern: console\.log\(|debugger;
action: warn
---
š **Debug code detected!**
Remove before committing.
Verification: Run the command with --help flag to verify availability.
---
name: require-tests
enabled: true
event: stop
action: warn
conditions:
- field: transcript
operator: not_contains
pattern: pytest|npm test
---
ā ļø **Tests not run!**
Please verify changes.
Verification: Run pytest -v to verify tests pass.
---
name: protect-prod
enabled: true
event: file
action: block
conditions:
- field: file_path
operator: regex_match
pattern: /production/|\.prod\.
---
šØ **Production file!**
Requires review.
Verification: Run the command with --help flag to verify availability.
Enable/Disable:
Edit .local.md file: enabled: false
Delete:
rm .claude/hookify.my-rule.local.md
Verification: Run the command with --help flag to verify availability.
List:
/hookify:list
Verification: Run the command with --help flag to verify availability.
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag
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.