writing-hookify-rules

Create and manage Hookify rules using Python regex and YAML frontmatter.

Updated Jan 13, 2025
One-click install
npx skills add https://github.com/phucle297/dotfiles --skill writing-hookify-rules-phucle297
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/phucle297/dotfiles/tree/main/.claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/phucle297/dotfiles --skill writing-hookify-rules-phucle297

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill assists users in creating, editing, and managing Hookify rules to automate tasks and ensure code safety and security in their workflows.

Core Features & Use Cases

  • Rule Creation: Define patterns and actions for various events like file edits, Bash commands, and more.
  • Syntax Guidance: Learn about rule syntax and best practices.
  • Message Customization: Craft clear and helpful messages for rule triggers.
  • Event Handling: Manage rules for Bash, file operations, completion checks, and user prompts.
  • Use Case: For developers looking to automate repetitive tasks like code formatting or block dangerous commands.

Quick Start

Use the writing-hookify-rules skill to create a new rule that warns against the use of 'rm -rf' in Bash commands.

Frequently Asked Questions about writing-hookify-rules

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

FAQPage Schema
How do I automate bash command monitoring and block dangerous commands?

Bash command monitoring uses Hookify rules with regex patterns to match commands like 'rm -rf' and trigger warnings. Define rule syntax with YAML frontmatter to intercept and block dangerous commands automatically.

What are Hookify rules and how do they work for code safety checks?

Hookify rules are definitions using YAML frontmatter and Python regex to automate task execution and perform code safety checks. They apply pattern matching to monitor file operations and bash commands, ensuring workflow security.

Do I need to know Python regex to create file operation rules?

Yes, understanding Python regex is required to create file operation rules. Defining patterns for event handling and command monitoring relies on regex syntax to accurately match target file operations and bash commands.

How to customize warning messages for triggered automation rules?

Customize warning messages for triggered automation rules by defining clear text within the Hookify rule structure. Message customization helps developers understand why a pattern matched and how to resolve the safety trigger.

What is the best way to manage hookify rules for repetitive tasks like code formatting?

The best way to manage Hookify rules for repetitive tasks is defining event-based patterns and actions. This automates task execution safely by applying consistent regex pattern matching across file edits and bash commands.