writing-hookify-rules

Configure hookify rules with regex patterns to enforce code security best practices.

12|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/jorgeasaurus/agent-skills --skill writing-hookify-rules-jorgeasaurus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/jorgeasaurus/agent-skills/tree/main/writing-hookify-rules
Command: npx skills add https://github.com/jorgeasaurus/agent-skills --skill writing-hookify-rules-jorgeasaurus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill helps users write and manage hookify rules to enforce code best practices and improve security.

Core Features & Use Cases

  • Define Hookify Rules: Write and configure rules that enforce code standards, block dangerous commands, and prevent security issues.
  • Regex Pattern Matching: Create rules with advanced regex patterns to detect and respond to specific code patterns.
  • Event Triggers: Set up rules to trigger on different events such as bash commands, file edits, or when an agent wants to stop.
  • Custom Messages: Design messages that guide and educate users on the reasons behind the rules and suggested alternatives.

Quick Start

Create a hookify rule to warn about the use of 'rm -rf' with the following command:

agent-run writing-hookify-rules -- create rule name=block-dangerous-rm event=bash pattern=rm\s+-rf action=block message="Are you sure you want to delete everything in this directory?"

Frequently Asked Questions about writing-hookify-rules

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

FAQPage Schema
How do I create custom rules to block dangerous bash commands in my codebase?

To block dangerous bash commands, you create custom rules using regex patterns and conditional logic. These rules trigger on specific events like bash commands, identify malicious actions through pattern matching, and block execution while displaying custom educational messages.

What are hookify rules and how do they enforce code security best practices?

Hookify rules are configurations that monitor and enforce code security best practices during development and code review. They use regex patterns and conditional logic to identify potential issues, block dangerous commands, and prevent unintended consequences in software engineering environments.

Can I set up code security rules to trigger on file edits and agent actions?

Yes, you can set up rules to trigger on different events such as bash commands, file edits, or when an agent wants to stop. This event-driven approach allows you to monitor specific development actions and enforce code standards across various editing contexts.

How do I use regex patterns to detect and prevent security issues during code review?

You use advanced regex patterns to define rules that detect specific code patterns during review. The rules employ conditional logic to identify potential security issues, block dangerous commands, and guide users with custom messages explaining safer alternatives.

What is the best way to warn developers about dangerous command line actions during development?

The best way to warn developers is to configure rules that block dangerous actions and display custom messages. These messages guide and educate users on the reasons behind the rules and suggest safer alternatives when potentially harmful patterns are detected.

Do I need any external dependencies to configure and manage these code security rules?

No external dependencies are required to configure and manage these code security rules. The system operates independently using built-in scripts to define rules, apply regex pattern matching, and enforce code standards without additional packages.