hookifylisted
Install: claude install-skill luiseiman/dotforge
# Hookify — Dynamic Hook Rules
Create hook rules from natural language without editing hooks.json.
## Step 1: Understand Intent
Parse the user's description to determine:
- **Event type**: bash (commands), file (edits/writes), stop (session end), prompt (user input)
- **Action**: warn (show message, allow) or block (deny operation)
- **Pattern**: regex to match against the relevant field
- **Field**: what to match (command, file_path, new_text, user_prompt, etc.)
Examples:
- "Warn me when I use rm -rf" → event: bash, action: warn, pattern: `rm\s+-rf`
- "Don't let me edit .env files" → event: file, action: block, field: file_path, pattern: `\.env$`
- "Block console.log in TypeScript" → event: file, action: warn, field: new_text, conditions on file_path AND new_text
- "Don't stop without running tests" → event: stop, action: block, field: transcript, operator: not_contains, pattern: `pytest|npm test`
## Step 2: Generate Rule File
Create `.claude/hookify.<short-name>.local.md`:
```markdown
---
name: <descriptive-kebab-case-name>
enabled: true
event: <bash|file|stop|prompt>
action: <warn|block>
pattern: <regex> # for single-condition rules
---
<Warning/block message in markdown. Be helpful — explain WHY and suggest alternatives.>
```
For multi-condition rules:
```markdown
---
name: <name>
enabled: true
event: <event>
action: <action>
conditions:
- field: <field>
operator: <regex_match|contains|not_contains|equals|starts_with|ends_with>
pattern: <value>
- fi