Built on affaan-m/ECC by @affaan-m (266,800 stars, MIT). All credit for the original idea to them. This fork improves and repackages it; upstream license preserved in UPSTREAM_LICENSE.
A Claude Code skill that helps you write safer Hookify rules for shell commands, file changes, prompts, and final checks.
Made for developers who use Hookify with Claude Code. It plugs into your current flow and has no extra tools to install.
Hookify rules can warn you before a risky action.
Small mistakes can make a rule miss danger or match too much. Fields also change by event type. A shell rule cannot use the same data as a file rule.
This skill gives Claude clear steps, safe examples, and simple checks.
Replace YOUR_NAME with the GitHub owner, then run this one command:
mkdir -p ~/.claude/skills/hookify-rules && curl -fsSL https://raw.githubusercontent.com/YOUR_NAME/hookify-guardrails-plus/main/skill/SKILL.md -o ~/.claude/skills/hookify-rules/SKILL.mdAsk Claude Code:
Create a Hookify rule that warns me when I add console.log to a JavaScript or TypeScript file.
Expected output:
---
name: warn-console-log
enabled: true
event: file
action: warn
conditions:
- field: file_path
operator: regex_match
pattern: '\.(js|jsx|ts|tsx)$'
- field: new_text
operator: regex_match
pattern: 'console\.log\s*\('
---
You added console.log to a JavaScript or TypeScript file. Remove it if it is only for debug work.Save it as:
.claude/hookify.warn-console-log.local.md
Claude may also help you test the pattern before you change action: warn to action: block.
- Rewritten from Chinese into clearer, plain English with a more concise skill description.
- Adds practical cautions about version compatibility, event-specific data, case sensitivity, empty-text matching, and avoiding overly broad rules.
- Improves structure with a complete basic example, clearer field/operator tables, and separate guidance for every event type, including
all. - Makes multi-condition rules safer and more explicit by adding
action, quoting the regex, and warning not to mixpatternwithconditionsunless supported. - The improved excerpt omits the original file-organization, Gitignore, CLI command, testing, and quick-reference sections and ends partway through its regex table.
This project uses the MIT License. The upstream MIT license and credit are preserved in UPSTREAM_LICENSE.
