Guide for creating hookify rules to prevent unwanted AI behaviors. Use when user asks to create, write, or configure hookify rules.
From hookifynpx claudepluginhub ancplua/ancplua-claude-plugins --plugin hookifyThis skill uses the workspace's default tool permissions.
references/patterns-and-examples.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
.claude/hookify.{name}.local.md---
name: rule-identifier
enabled: true
event: bash|file|stop|stopfailure|prompt|all
pattern: regex-pattern-here
---
Message shown to Claude when rule triggers.
| Event | Matches Against | Use For |
|---|---|---|
bash | Command text | Dangerous commands, privilege escalation |
file | File path + content | Debug code, sensitive files, security risks |
stop | Always (use .*) | Completion checklists, required steps |
stopfailure | error_type, error_message | API error alerts, rate limit handling |
prompt | User prompt text | Deployment gates, process enforcement |
all | All events | Cross-cutting concerns |
warn (default): Show message, allow operationblock: Prevent operation entirelyconditions:
- field: file_path
operator: regex_match
pattern: \.env$
- field: new_text
operator: contains
pattern: API_KEY
Operators: regex_match, contains, equals, not_contains, starts_with, ends_with
Fields: bash → command | file → file_path, new_text, old_text, content | prompt → user_prompt
All conditions must match for the rule to trigger.
.claude/hookify.{descriptive-name}.local.md.claude/*.local.md to .gitignorewarn-dangerous-rm, block-console-log, require-testsSee references/ for regex patterns, examples, and common pitfalls.