Agent skill
hookify
Guide for creating hookify rules to prevent unwanted behaviors. Use when creating, editing, or understanding hookify rule files.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/hookify
SKILL.md
Hookify - Hook Management
Manage hookify rules that prevent unwanted Claude behaviors in the Wythm project.
Usage
/hookify help- Show documentation on how hookify works/hookify list- List all configured rules/hookify configure- Enable/disable rules interactively/hookify <behavior>- Create rule for specific behavior/hookify- Analyze conversation to find behaviors to prevent
Parse $ARGUMENTS to determine which sub-command to run.
Reference
For complete rule writing guide, syntax, examples, and testing instructions, see references/rule-guide.md.
Sub-command: help
Show comprehensive hookify documentation.
Read and present the content from references/rule-guide.md.
Explain:
- How hookify works (hook events, rule loading)
- Configuration file format (frontmatter + message)
- Pattern syntax (Python regex)
- Available commands
- Example rules
Key points to cover:
- Rule files location:
.claude/hooks/hookify/rules/*.local.md - Events: bash, file, stop, prompt, all
- Actions: warn (default), block
- Changes take effect immediately
Sub-command: list
List all configured hookify rules.
Steps:
- Glob for
.claude/hooks/hookify/rules/*.local.md - Read each file, extract frontmatter (name, enabled, event, pattern)
- Present as table:
| Name | Enabled | Event | Pattern | File |
|---|
- Show totals (X enabled, Y disabled)
- Add footer with edit/disable instructions
If no rules found, suggest /hookify <behavior> to create first rule.
Sub-command: configure
Enable/disable rules interactively.
Steps:
- Glob for
.claude/hooks/hookify/rules/*.local.md - Read each file, get name and enabled state
- Use AskUserQuestion with multiSelect to let user pick rules to toggle
- For each selected: toggle
enabled: true<->enabled: falseusing Edit tool - Confirm changes
Sub-command: create (default when $ARGUMENTS is not a sub-command)
Create hook rules from behavior description or conversation analysis.
If $ARGUMENTS contains behavior description:
- Parse the specific instruction
- Still scan recent conversation for examples
If $ARGUMENTS is empty:
- Launch conversation-analyzer agent to find problematic behaviors
- Agent scans user prompts for frustration signals
Creation steps:
- Gather behaviors (from args or agent)
- Present findings with AskUserQuestion:
- Which behaviors to hookify? (multiSelect)
- Warn or block? (for each selected)
- Generate rule files in
.claude/hooks/hookify/rules/{name}.local.md - Confirm creation, remind no restart needed
Rule file format:
---
name: {kebab-case-name}
enabled: true
event: {bash|file|stop|prompt|all}
conditions:
- field: {command|new_text|file_path|user_prompt}
operator: {regex_match|contains|equals|starts_with|ends_with|not_contains}
pattern: '{regex pattern}'
action: {warn|block}
---
{Message to show Claude when rule triggers}
Quick Reference
Events:
- bash: Bash tool commands
- file: Edit/Write tools
- stop: When agent wants to stop
- prompt: User prompt submission
- all: All events
Regex tips:
rm\s+-rf- rm -rfconsole\.log\(- console.log()\.env$- .env fileschmod\s+777- chmod 777
File location: .claude/hooks/hookify/rules/*.local.md
No restart needed - rules apply immediately!
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?