spacehub

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

claude-code / plugins / hookify / commands / list.md
82 lines · 2.0 KBPreviewCodeRaw
1---
2description: List all configured hookify rules
3allowed-tools: ["Glob", "Read", "Skill"]
4---
5
6# List Hookify Rules
7
8**Load hookify:writing-rules skill first** to understand rule format.
9
10Show all configured hookify rules in the project.
11
12## Steps
13
141. Use Glob tool to find all hookify rule files:
15 ```
16 pattern: ".claude/hookify.*.local.md"
17 ```
18
192. 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
243. 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
384. 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
495. Add helpful footer:
50```
51---
52
53To modify a rule: Edit the .local.md file directly
54To disable a rule: Set `enabled: false` in frontmatter
55To enable a rule: Set `enabled: true` in frontmatter
56To delete a rule: Remove the .local.md file
57To create a rule: Use `/hookify` command
58
59**Remember**: Changes take effect immediately - no restart needed
60```
61
62## If No Rules Found
63
64If no hookify rules exist:
65
66```
67## No Hookify Rules Configured
68
69You haven't created any hookify rules yet.
70
71To get started:
721. Use `/hookify` to analyze conversation and create rules
732. Or manually create `.claude/hookify.my-rule.local.md` files
743. See `/hookify:help` for documentation
75
76Example:
77```
78/hookify Warn me when I use console.log
79```
80
81Check `${CLAUDE_PLUGIN_ROOT}/examples/` for example rule files.
82```