How this command is triggered — by the user, by Claude, or both
Slash command
/jhookify:helpThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Hookify Plugin Help Explain how the hookify plugin works and how to use it. ## Overview The hookify plugin makes it easy to create custom hooks that prevent unwanted behaviors. Instead of editing `hooks.json` files, users create simple markdown configuration files that define patterns to watch for. ## How It Works ### 1. Hook System Hookify installs generic hooks that run on these events: - **PreToolUse**: Before any tool executes (Bash, Edit, Write, etc.) - **PostToolUse**: After a tool executes - **Stop**: When Claude wants to stop working - **UserPromptSubmit**: When user submits...
Explain how the hookify plugin works and how to use it.
The hookify plugin makes it easy to create custom hooks that prevent unwanted behaviors. Instead of editing hooks.json files, users create simple markdown configuration files that define patterns to watch for.
Hookify installs generic hooks that run on these events:
These hooks read configuration files from .claude/hookify.*.local.md and check if any rules match the current operation.
Users create rules in .claude/hookify.{rule-name}.local.md files:
---
name: warn-dangerous-rm
enabled: true
event: bash
pattern: rm\s+-rf
---
⚠️ **Dangerous rm command detected!**
This command could delete important files. Please verify the path.
Key fields:
name: Unique identifier for the ruleenabled: true/false to activate/deactivateevent: bash, file, stop, prompt, or allpattern: Regex pattern to matchaction: warn (default) or blockadditionalContext: Optional separate text for Claude AI (jhookify enhancement)Dual audience (jhookify): The markdown body is shown to the user. Claude AI sees additionalContext (if provided) or [rule-name] markdown-body as fallback (with [Hookify Warning] prefix for warns). Works for PreToolUse, PostToolUse, and UserPromptSubmit events. Stop events do not pass custom context to Claude.
Option A: Use /hookify command
/hookify Don't use console.log in production files
This analyzes your request and creates the appropriate rule file.
Option B: Create manually
Create .claude/hookify.my-rule.local.md with the format above.
Option C: Analyze conversation
/hookify
Without arguments, hookify analyzes recent conversation to find behaviors you want to prevent.
/hookify - Create hooks from conversation analysis or explicit instructions/hookify:help - Show this help (what you're reading now)/hookify:list - List all configured hooks/hookify:configure - Enable/disable existing hooks interactivelyPrevent dangerous commands:
---
name: block-chmod-777
enabled: true
event: bash
pattern: chmod\s+777
---
Don't use chmod 777 - it's a security risk. Use specific permissions instead.
Warn about debugging code:
---
name: warn-console-log
enabled: true
event: file
pattern: console\.log\(
---
Console.log detected. Remember to remove debug logging before committing.
Require tests before stopping:
---
name: require-tests
enabled: true
event: stop
pattern: .*
---
Did you run tests before finishing? Make sure `npm test` or equivalent was executed.
Use Python regex syntax:
\s - whitespace\. - literal dot| - OR+ - one or more* - zero or more\d - digit[abc] - character classExamples:
rm\s+-rf - matches "rm -rf"console\.log\( - matches "console.log("(eval|exec)\( - matches "eval(" or "exec("\.env$ - matches files ending in .envLocal rules (project-specific):
.claude/hookify.{name}.local.mdGlobal rules (user-wide):
~/.claude/hookify.{name}.local.mdOverride: Local rules with same name: override global rules.
Disable global locally: Create local rule with same name: and enabled: false.
No Restart Needed: Hookify rules (.local.md files) take effect immediately on the next tool use. The hookify hooks are already loaded and read your rules dynamically.
Block or Warn: Rules can either block operations (prevent execution) or warn (show message but allow). Set action: block or action: warn in the rule's frontmatter.
Claude Visibility (jhookify): Unlike original hookify, Claude AI now sees warnings via additionalContext (PreToolUse, PostToolUse, UserPromptSubmit) and block reasons via permissionDecisionReason (PreToolUse only) or additionalContext (PostToolUse, UserPromptSubmit). Stop events do not pass additionalContext to Claude. Use additionalContext: in YAML to give Claude separate technical instructions.
Rule Files: Keep rules in .claude/hookify.*.local.md (local) or ~/.claude/hookify.*.local.md (global). Local rules should be git-ignored.
Disable Rules: Set enabled: false in frontmatter or delete the file.
Hook not triggering:
.claude/ directoryenabled: true in frontmatterpython3 -c "import re; print(re.search('your_pattern', 'test_text'))"Import errors:
python3 --versionPattern not matching:
Create your first rule:
/hookify Warn me when I try to use rm -rf
Try to trigger it:
rm -rf /tmp/testRefine the rule by editing .claude/hookify.warn-rm.local.md
Create more rules as you encounter unwanted behaviors
For more examples, check the ${CLAUDE_PLUGIN_ROOT}/examples/ directory.
npx claudepluginhub a3io/jaine-custom-marketplace --plugin jhookify/helpDisplays Hookify plugin help: hook events, markdown config files with regex patterns, creation via /hookify or manual files, subcommands, and examples for safe behaviors.
/hookify-helpDisplays Hookify system overview covering event types (bash, file, stop, prompt, all), rule file format, commands (/hookify, /hookify-list, /hookify-configure), and regex pattern tips.
/hookify-helpDisplays comprehensive documentation for the hookify system, including event types, rule file format, and available commands.
/new-hookCreates and configures Claude Code hooks from a natural language description, setting up events, matchers, and shell commands for workflow automation, notifications, formatting, and behavior control.
/create-hookCreates and configures Claude Code hooks for events like PreToolUse with matcher and command, including ESLint/Prettier templates. Outputs status and hook file path.
/helpExplains Ralph Loop plugin for iterative AI development via repeated Claude prompts with file self-reference, and lists commands /ralph-loop to start loops and /cancel-ralph to cancel.