Hookify Rule Builder
Configures custom guardrails and automated triggers to govern Claude's behavior during terminal operations and file edits.
The source repository doesn't declare a license. Check its terms before reusing the code.
Key features
- Flexible event hooks including bash, file edit, stop, and prompt
- Multi-condition triggers supporting specific file paths and text content
- Configurable actions to either warn the agent or block risky operations
- Regex-based pattern matching for bash commands and file changes
- Dynamic rule loading from the .claude/ directory for instant updates
Use cases
- Creating automated pre-completion checklists to ensure tests and documentation are updated
- Preventing accidental execution of destructive terminal commands like rm -rf
- Blocking the submission of debug statements or sensitive credentials to production code
FAQ
What types of events can Hookify rules monitor?
Hookify rules can monitor bash commands, file operations (Edit/Write/MultiEdit), session completion (stop), and incoming user prompts.
Where should I store my Hookify rules?
Rules must be saved in the .claude/ directory at your project root using the naming convention hookify.{rule-name}.local.md.
What is a Hookify rule?
A Hookify rule is a markdown file with YAML frontmatter that defines specific patterns—such as dangerous bash commands or forbidden code patterns—for Claude Code to watch and respond to.
Can Hookify rules block Claude from taking action?
Yes. By setting the 'action' field to 'block' in the YAML frontmatter, you can prevent specific commands or file edits from being executed when a pattern is matched.
Do I need to restart Claude Code for rules to take effect?
No, rules are read dynamically and changes take effect automatically on the next tool execution after the file is saved.
Related skills
Testing Writing Guidelines
Enforces a minimalist testing strategy by focusing on critical user flows, clear naming conventions, and fast execution.
Security Testing21312 ptsExpert Panel Analysis
Diagnoses complex technical issues and prompt failures by convening a panel of specialized expert personas to provide multi-faceted troubleshooting and actionable solutions.
Security Testing12 pts