Create, configure, and refine Hookify rules and syntax patterns.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "hookify-rules" skill from askskill: 1. Download https://raw.githubusercontent.com/affaan-m/ECC/main/skills/hookify-rules/SKILL.md 2. Save it as ~/.claude/skills/hookify-rules/SKILL.md 3. Reload skills and tell me it's ready
Help me write a Hookify rule: when package.json is modified, automatically remind me to run a dependency check. Please provide a sample rule and explain each field.
A usable Hookify rule example with field explanations and usage notes.
I want to configure a Hookify rule that triggers only when files under src/**/*.ts change. Please provide the correct Hookify syntax and explain how the wildcard pattern matches.
A Hookify-compatible matching rule plus a clear explanation of path patterns and trigger conditions.
Here is my Hookify rule. Please check why it is not working, identify syntax issues, and provide a corrected version: [paste rule content here]
A diagnosis of the current rule, explanation of the error, and a corrected complete rule.
Hookify rules are markdown files with YAML frontmatter that define patterns to watch for and messages to show when those patterns match. Rules are stored in .claude/hookify.{rule-name}.local.md files.
---
name: rule-identifier
enabled: true
event: bash|file|stop|prompt|all
pattern: regex-pattern-here
---
Message to show Claude when this rule triggers.
Can include markdown formatting, warnings, suggestions, etc.
| Field | Required | Values | Description |
|---|---|---|---|
| name | Yes | kebab-case string | Unique identifier (verb-first: warn-, block-, require-*) |
| enabled | Yes | true/false | Toggle without deleting |
| event | Yes | bash/file/stop/prompt/all | Which hook event triggers this |
| action | No | warn/block | warn (default) shows message; block prevents operation |
| pattern | Yes* | regex string | Pattern to match (*or use conditions for complex rules) |
---
name: warn-env-api-keys
enabled: true
event: file
conditions:
- field: file_path
operator: regex_match
pattern: \.env$
- field: new_text
operator: contains
pattern: API_KEY
---
You're adding an API key to a .env file. Ensure this file is in .gitignore!
Condition fields by event:
commandfile_path, new_text, old_text, contentuser_promptOperators: regex_match, contains, equals, not_contains, starts_with, ends_with
All conditions must match for rule to trigger.
Match Bash command patterns:
rm\s+-rf, dd\s+if=, mkfssudo\s+, su\s+chmod\s+777Match Edit/Write/MultiEdit operations:
console\.log\(, debuggereval\(, innerHTML\s*=\.env$, credentials, \.pem$Completion checks and reminders. Pattern .* matches always.
Match user prompt content for workflow enforcement.
. to \., ( to \(\s whitespace, \d digit, \w word char+ one or more, * zero or more, ? optional| OR operatorlog matches "login", "dialog" — use console\.log\(rm -rf /tmp — use rm\s+-rf\\spython3 -c "import re; print(re.search(r'your_pattern', 'test text'))"
.claude/ directory in project root.claude/hookify.{descriptive-name}.local.md.claude/*.local.md to .gitignore/hookify [description] - Create new rules (auto-analyzes conversation if no args)/hookify-list - View all rules in table format/hookify-configure - Toggle rules on/off interactively/hookify-help - Full documentationMinimum viable rule:
---
name: my-rule
enabled: true
event: bash
pattern: dangerous_command
---
Warning message here
Conduct multi-source web research and produce cited, source-attributed reports.
Audit, plan, and implement SEO improvements for better search visibility.
Unify multi-channel notifications for routing, deduplication, escalation, and inbox consolidation.
Fetches up-to-date framework docs for setup, APIs, and code examples.
Refine retrieved context iteratively to improve subagent understanding and output quality.
Design adaptive agent workflows with eval gates and reusable skill extraction.
Create hook JSON files for policy enforcement and agent lifecycle automation.
Turn a repeated workflow into a reusable skill file from the current session.
Extract shared principles from skills and turn them into maintainable rule files.
Generate test scenarios and measure how well agents follow skills and rules.
Analyze and refine raw prompts into ready-to-use high-quality prompts.
Create or update skills that extend Codex with knowledge, workflows, and tools.