surshar / claude-code
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Built by Anthropic · github.com/anthropics
| 1 | --- |
| 2 | description: List all configured hookify rules |
| 3 | allowed-tools: ["Glob", "Read", "Skill"] |
| 4 | --- |
| 5 | |
| 6 | # List Hookify Rules |
| 7 | |
| 8 | **Load hookify:writing-rules skill first** to understand rule format. |
| 9 | |
| 10 | Show all configured hookify rules in the project. |
| 11 | |
| 12 | ## Steps |
| 13 | |
| 14 | 1. Use Glob tool to find all hookify rule files: |
| 15 | ``` |
| 16 | pattern: ".claude/hookify.*.local.md" |
| 17 | ``` |
| 18 | |
| 19 | 2. For each file found: |
| 20 | - Use Read tool to read the file |
| 21 | - Extract frontmatter fields: name, enabled, event, pattern |
| 22 | - Extract message preview (first 100 chars) |
| 23 | |
| 24 | 3. Present results in a table: |
| 25 | |
| 26 | ``` |
| 27 | ## Configured Hookify Rules |
| 28 | |
| 29 | | Name | Enabled | Event | Pattern | File | |
| 30 | |------|---------|-------|---------|------| |
| 31 | | warn-dangerous-rm | ✅ Yes | bash | rm\s+-rf | hookify.dangerous-rm.local.md | |
| 32 | | warn-console-log | ✅ Yes | file | console\.log\( | hookify.console-log.local.md | |
| 33 | | check-tests | ❌ No | stop | .* | hookify.require-tests.local.md | |
| 34 | |
| 35 | **Total**: 3 rules (2 enabled, 1 disabled) |
| 36 | ``` |
| 37 | |
| 38 | 4. For each rule, show a brief preview: |
| 39 | ``` |
| 40 | ### warn-dangerous-rm |
| 41 | **Event**: bash |
| 42 | **Pattern**: `rm\s+-rf` |
| 43 | **Message**: "⚠️ **Dangerous rm command detected!** This command could delete..." |
| 44 | |
| 45 | **Status**: ✅ Active |
| 46 | **File**: .claude/hookify.dangerous-rm.local.md |
| 47 | ``` |
| 48 | |
| 49 | 5. Add helpful footer: |
| 50 | ``` |
| 51 | --- |
| 52 | |
| 53 | To modify a rule: Edit the .local.md file directly |
| 54 | To disable a rule: Set `enabled: false` in frontmatter |
| 55 | To enable a rule: Set `enabled: true` in frontmatter |
| 56 | To delete a rule: Remove the .local.md file |
| 57 | To create a rule: Use `/hookify` command |
| 58 | |
| 59 | **Remember**: Changes take effect immediately - no restart needed |
| 60 | ``` |
| 61 | |
| 62 | ## If No Rules Found |
| 63 | |
| 64 | If no hookify rules exist: |
| 65 | |
| 66 | ``` |
| 67 | ## No Hookify Rules Configured |
| 68 | |
| 69 | You haven't created any hookify rules yet. |
| 70 | |
| 71 | To get started: |
| 72 | 1. Use `/hookify` to analyze conversation and create rules |
| 73 | 2. Or manually create `.claude/hookify.my-rule.local.md` files |
| 74 | 3. See `/hookify:help` for documentation |
| 75 | |
| 76 | Example: |
| 77 | ``` |
| 78 | /hookify Warn me when I use console.log |
| 79 | ``` |
| 80 | |
| 81 | Check `${CLAUDE_PLUGIN_ROOT}/examples/` for example rule files. |
| 82 | ``` |