mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-07 01:33:31 +08:00
feat: restore hookify command bundle
This commit is contained in:
50
commands/hookify.md
Normal file
50
commands/hookify.md
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
description: Create hooks to prevent unwanted behaviors from conversation analysis or explicit instructions
|
||||
---
|
||||
|
||||
Create hook rules to prevent unwanted Claude Code behaviors by analyzing conversation patterns or explicit user instructions.
|
||||
|
||||
## Usage
|
||||
|
||||
`/hookify [description of behavior to prevent]`
|
||||
|
||||
If no arguments are provided, analyze the current conversation to find behaviors worth preventing.
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1: Gather Behavior Info
|
||||
|
||||
- With arguments: parse the user's description of the unwanted behavior
|
||||
- Without arguments: use the `conversation-analyzer` agent to find:
|
||||
- explicit corrections
|
||||
- frustrated reactions to repeated mistakes
|
||||
- reverted changes
|
||||
- repeated similar issues
|
||||
|
||||
### Step 2: Present Findings
|
||||
|
||||
Show the user:
|
||||
|
||||
- behavior description
|
||||
- proposed event type
|
||||
- proposed pattern or matcher
|
||||
- proposed action
|
||||
|
||||
### Step 3: Generate Rule Files
|
||||
|
||||
For each approved rule, create a file at `.claude/hookify.{name}.local.md`:
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: rule-name
|
||||
enabled: true
|
||||
event: bash|file|stop|prompt|all
|
||||
action: block|warn
|
||||
pattern: "regex pattern"
|
||||
---
|
||||
Message shown when rule triggers.
|
||||
```
|
||||
|
||||
### Step 4: Confirm
|
||||
|
||||
Report created rules and how to manage them with `/hookify-list` and `/hookify-configure`.
|
||||
Reference in New Issue
Block a user