This directory contains reusable hookify rules. Copy any of these to your project's .claude/ directory to enable them.
| File | Description |
|---|---|
dangerous-rm.local.md |
Warns before rm -rf commands |
no-secrets.local.md |
Warns when hardcoding secrets |
no-force-push.local.md |
Warns before git push --force |
| File | Description |
|---|---|
no-console-log.local.md |
Warns when adding console.log |
no-todo-comments.local.md |
Warns when adding TODO comments |
| File | Description |
|---|---|
require-tests.local.md |
Reminds to add tests when modifying code |
-
Copy desired rules to your project:
cp hooks/dangerous-rm.local.md .claude/hookify.dangerous-rm.local.md
-
Or copy all rules:
cp hooks/*.local.md .claude/ # Rename to add hookify prefix for f in .claude/*.local.md; do mv "$f" ".claude/hookify.$(basename $f)" done
-
Customize the rules by editing the files
See the Hookify documentation for rule syntax.
Basic structure:
---
name: rule-name
enabled: true
event: bash|file|stop|prompt
conditions:
- field: command|content|file_path
operator: contains|regex_match|equals
pattern: "pattern to match"
action: warn|block
---
Message shown when rule matches.