writing-hookify-rules

Create and manage regex-based rules for monitoring scripting and file editing activities.

3|Updated May 3, 2026
One-click install
npx skills add https://github.com/chloebrett/slay --skill writing-hookify-rules-chloebrett
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/chloebrett/slay/tree/main/.claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/chloebrett/slay --skill writing-hookify-rules-chloebrett

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables users to define, configure, and enforce rules that monitor and control scripting and file editing behaviors, enhancing safety and code quality.

Core Features & Use Cases

  • Rule Creation & Management: Write markdown-based rules with YAML frontmatter that detect dangerous commands, insecure code patterns, or unwanted edits.
  • Pattern Matching & Alerts: Use regex patterns to trigger warning or block messages when specific patterns are detected during shell commands or file modifications.
  • Use Case: Configure a rule to warn when a command attempts to delete critical directories or when sensitive API keys are added to configuration files.

Quick Start

Write a hookify rule to notify when a shell command includes 'rm -rf' to prevent accidental data loss.

Frequently Asked Questions about writing-hookify-rules

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

FAQPage Schema
How do I use regex to block dangerous bash commands during code review?

Regex rules can block dangerous bash commands during code review by defining markdown-based rules with YAML frontmatter that trigger warning messages when specific patterns are detected. This prevents unsafe shell operations and ensures adherence to best practices.

How do I create custom file monitoring rules to prevent unsafe edits?

To create custom file monitoring rules, you write markdown-based configurations with YAML frontmatter that use regex patterns to detect and block unwanted file modifications. These rules safeguard your scripts by alerting you when sensitive data or configuration files are altered.

What is the best way to monitor shell commands for accidental data loss?

Monitoring shell commands for accidental data loss involves configuring regex-based rules that notify you when dangerous patterns like 'rm -rf' are detected. This mechanism intercepts unsafe operations before they execute, preventing critical directory deletion.

Can I enable or disable specific regex patterns for bash safety rules?

Yes, you can enable or disable specific regex patterns for bash safety rules. This rule safety feature allows you to toggle configurations as needed, ensuring flexible enforcement of code review and file monitoring without permanently deleting your defined patterns.

Do I need any external dependencies to manage regex-based code review rules?

No external dependencies are required to manage regex-based code review rules. The rule creation and management process operates independently, allowing you to define markdown-based patterns for monitoring scripting and file editing without additional environment setup.

What are the limitations of using regex for file monitoring and code review?

Using regex for file monitoring and code review is limited to detecting specific text patterns within bash commands and file edits. It cannot understand complex semantic code logic, meaning rule safety relies entirely on accurately matching unsafe string patterns against your defined configurations.