Writing Hookify Rules

Create regex-based hookify rules that block destructive commands and enforce coding standards.

11|2|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/ajsai47/holyclaude --skill writing-hookify-rules-ajsai47
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Hookify Rules
Source: https://github.com/ajsai47/holyclaude/tree/main/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/ajsai47/holyclaude --skill writing-hookify-rules-ajsai47

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Development teams often accidentally introduce dangerous commands, debug code, or sensitive file edits that cause security vulnerabilities, production bugs, or compliance issues, and manually catching these patterns across all contributions is time-consuming and error-prone.

Core Features & Use Cases

  • Multi-Event Rule Support: Create rules for bash commands, file edits, agent stop events, and user prompts to cover all common development touchpoints.
  • Flexible Pattern Matching: Use simple regex patterns for basic checks or advanced multi-condition rules with regex, substring, and prefix/suffix matching for complex validation needs.
  • Use Case: An engineering team can use this skill to set up rules that block destructive rm -rf commands, warn about console.log in production TypeScript files, and enforce that all .env file edits include a .gitignore check before saving.

Quick Start

Use the writing-rules skill to create a hookify rule that blocks all rm -rf bash commands and displays a warning when the pattern is detected.

Frequently Asked Questions about Writing Hookify Rules

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

FAQPage Schema
How do I prevent accidental destructive bash commands in development workflows?

Create custom hookify rules with regex pattern matching to block destructive bash commands like rm -rf before execution. Rules support configurable warn and block actions across bash commands, file edits, and agent stop events to prevent accidental damage.

Can I enforce coding standards automatically during code review?

Yes, hookify rules enforce coding standards automatically by warning about patterns like console.log in production files. Multi-condition matching using regex, substring, and prefix/suffix validation catches non-compliant code before completion.

How does regex pattern matching work for pre-completion step validation?

Regex pattern matching validates pre-completion steps by scanning bash commands, file edits, and user prompts against defined patterns. Simple regex handles basic checks while multi-condition rules combine regex, substring, and prefix/suffix matching for complex validation.

Do I need to restart my environment when adding new hookify rules?

No, new hookify rules load dynamically without requiring environment restarts. This core feature lets development teams add or modify validation rules on the fly, maintaining continuous workflow protection.

What's the best way to block sensitive file edits like .env without gitignore checks?

Set up a hookify rule that enforces all .env file edits include a .gitignore check before saving. Configurable block actions prevent the save if validation fails.

What types of development events can hookify rules monitor for security risks?

Hookify rules monitor bash commands, file edits, agent stop events, and user prompts to cover all common development touchpoints. Multi-event support ensures security risk prevention across the entire development workflow.