Skip to content
Development
Command

/hookify

Create behavioral rules to prevent unwanted actions

From plugin
claude-night-market
343162 skills60 agents162 commands1 MCP
> /plugin marketplace add athola/claude-night-market

Command definition

hookify.md
name: hookify
description: Create behavioral rules to prevent unwanted actions
usage: /hookify [instruction]
examples:
  - /hookify Don't use console.log in TypeScript files
  - /hookify Block rm -rf commands

Hookify Command

Creates custom behavioral rules to prevent unwanted actions.

When To Use

Use this command when you need to:

  • Creating rules from explicit instructions
  • Analyzing conversation for unwanted behaviors to block

When NOT To Use

  • Complex multi-step workflows - use agents instead
  • One-time operations that don't need persistent rules

Usage

Create Rule from Instruction

/hookify Don't use console.log in TypeScript files

This will: 1. Parse your instruction 2. Determine appropriate event type (bash, file, etc.) 3. Generate regex pattern 4. Create rule file in `.claude/` 5. Enable rule immediately

Analyze Conversation

/hookify

Without arguments, hookify will: 1. Analyze recent conversation history 2. Identify unwanted behaviors or mistakes 3. Suggest rules to prevent recurrence 4. Ask if you want to create them

Rule Creation Flow

1. **Event Detection**: Determines which tool the rule applies to 2. **Pattern Generation**: Creates regex pattern from your description 3. **Action Selection**: Chooses warn or block based on severity 4. **Message Creation**: Generates helpful message for Claude 5. **File Creation**: Saves to `.claude/hookify.{name}.local.md`

Examples

Block Dangerous Commands

/hookify Block rm -rf and other destructive operations

Creates:

---
name: block-destructive-ops
enabled: true
event: bash
pattern: rm\s+-rf|dd\s+if=|mkfs
action: block
---

🛑 **Destructive operation detected!**
This command can cause data loss.

Warn About Debug Code

/hookify Warn when I add console.log to files

Creates:

---
name: warn-console-log
enabled: true
event: file
pattern: console\.log\(
action: warn
---

🐛 **Debug code detected!**
Remove console.log before committing.

Require Tests

/hookify Remind me to run tests before stopping

Creates:

---
name: require-tests
enabled: true
event: stop
action: warn
conditions:
  - field: transcript
    operator: not_contains
    pattern: npm test|pytest
---

⚠️ **Tests not detected!**
Run tests before completing.

See Also

  • `/hookify:list` - View all rules
  • `/hookify:configure` - Enable/disable rules
  • `/hookify:help` - Show help
  • `Skill(hookify:writing-rules)` - Learn rule syntax
Read more
@athola
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

343200 skills60 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
343
Star history of athola/claude-night-market on GitHub, a chart by star-history.com

Other commands on claude-night-market.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command