Files
ECC/commands/hookify.md
T
wellkiloandhaelyra a50ee13cac feat: execute bounded local Hookify rules in lifecycle hooks
Carry forward PR #3055 at 92f53c4c onto ef648e01, preserving contributor attribution and current main. Focused maintainer fixes reuse shared input ceilings, preserve late root context through outer bootstrap, bound frontmatter before immutable parsing, and assert real oversized input in the limits workflow.
2026-10-09 15:59:20 -04:00

1.5 KiB

description
description
Create hooks to prevent unwanted behaviors from conversation analysis or explicit instructions. Use to generate a new hook rule file from conversation analysis or a described behavior; the hookify-rules skill covers hookify rule syntax and patterns for authoring or editing rules directly.

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:

---
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. ECC's built-in hook runtime enforces enabled rules automatically; no separate Hookify plugin or Python runtime is required.