hookify-rules

Create valid hookify rules for Claude Code with YAML and regex guidance.

2|Updated May 11, 2026
One-click install
npx skills add https://github.com/himanshu231204/AI_Research_agent --skill hookify-rules-himanshu231204
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hookify-rules
Source: https://github.com/himanshu231204/AI_Research_agent/tree/main/.opencode/skills/hookify-rules
Command: npx skills add https://github.com/himanshu231204/AI_Research_agent --skill hookify-rules-himanshu231204

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating and managing hookify rules for Claude Code can be tedious and error-prone, especially when dealing with regex patterns, YAML formatting, and complex matching conditions. This Skill eliminates that friction by providing clear, actionable guidance for writing valid, effective hook rules.

Core Features & Use Cases

  • Syntax Guidance: Complete reference for hookify rule frontmatter fields, event types, and condition operators.
  • Pattern Writing Support: Tips and examples for writing correct regex patterns for bash commands, file edits, and user prompts.
  • Use Case Example: Use this Skill to create a rule that warns you whenever you attempt to run a dangerous bash command like rm -rf, or when you add sensitive API keys to a .env file.

Quick Start

Use the hookify-rules skill to create a new rule that blocks any bash command containing the pattern rm\s+-rf.

Frequently Asked Questions about hookify-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create Claude Code hookify rules to block dangerous bash commands?

You can create Claude Code hookify rules to block dangerous bash commands by defining regex patterns like `rm\s+-rf` within valid YAML frontmatter, using syntax guidance to specify event types and condition operators that trigger warnings.

What is the correct YAML frontmatter format for hookify rules?

Correct YAML frontmatter for hookify rules requires specific fields for event types and condition operators. This Skill provides complete syntax references and templates to ensure your YAML formatting adheres to hookify rule specifications without errors.

How do I write regex patterns for Claude hooks to prevent edits to sensitive files?

To prevent edits to sensitive files with Claude hooks, you write regex patterns targeting file paths like `.env` files. This Skill provides pattern writing tips and examples for matching file edits, bash commands, and user prompts accurately.

Can I use hookify rules to add workflow reminders for common development tasks?

Yes, you can use hookify rules to add workflow reminders for common development tasks. By configuring the appropriate event types and condition operators in the YAML frontmatter, you can trigger custom reminders during your development process.

Why does my hookify rule fail to match the intended bash command pattern?

Your hookify rule may fail due to incorrect regex construction or invalid YAML frontmatter. This Skill helps troubleshoot by providing pattern writing tips, syntax guidance, and rule structure templates to ensure your conditions match bash commands accurately.

Do I need any dependencies to manage hookify rules for Claude Code?

No dependencies are required to manage hookify rules for Claude Code. This Skill operates standalone, providing the necessary syntax guidance, regex pattern construction tips, and YAML formatting references to create functional rules directly.