Skip to content

About

Claude Code skill to write Hookify rules that warn or block unsafe actions. Built on affaan-m/ECC by @affaan-m.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

hookify-guardrails-plus

hero

License: MIT Works with Claude Code Skill version 1.0 Zero dependencies

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.

🎯 Why

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.

🚀 Install

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.md

💬 Usage

Ask 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.

🔧 What we changed vs upstream

  • 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 mix pattern with conditions unless supported.
  • The improved excerpt omits the original file-organization, Gitignore, CLI command, testing, and quick-reference sections and ends partway through its regex table.

📄 License

This project uses the MIT License. The upstream MIT license and credit are preserved in UPSTREAM_LICENSE.

About

Claude Code skill to write Hookify rules that warn or block unsafe actions. Built on affaan-m/ECC by @affaan-m.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors