Writing Hookify Rules

Create and manage custom hookify rules for agent behavior modification.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/FacuM/yolo-agent --skill writing-hookify-rules-facum
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Hookify Rules
Source: https://github.com/FacuM/yolo-agent/tree/main/.claude/skills/writing-rules
Command: npx skills add https://github.com/FacuM/yolo-agent --skill writing-hookify-rules-facum

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill allows users to define custom rules that govern the agent's behavior when interacting with specific tools or prompts, enabling fine-grained control over agent actions and responses.

Core Features & Use Cases

  • Custom Rule Creation: Define rules with specific patterns and conditions for various events (bash, file, stop, prompt).
  • Actionable Feedback: Configure rules to warn or block actions based on detected patterns.
  • Use Case: Prevent accidental deletion of important files by creating a rule that blocks any rm -rf command targeting specific directories.

Quick Start

Create a new hookify rule to warn when editing .env files.

Frequently Asked Questions about Writing Hookify Rules

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

FAQPage Schema
How do I define custom rules to block specific bash commands executed by an AI agent?

Define custom hookify rules with pattern matching and conditional logic to warn or block agent actions when specific bash commands are detected. This declarative system intercepts commands before execution to prevent dangerous operations like accidental file deletion.

Can I set up pattern matching rules to prevent an agent from editing .env files?

Yes, you can configure custom rules with pattern matching to detect file operations targeting .env files. The declarative rule system enables you to automatically warn or block the agent when it attempts to interact with sensitive file paths.

What events can I target when creating rules for agent behavior modification?

You can target bash commands, file operations, agent stop events, and user prompts when creating rules for agent behavior modification. This enables comprehensive enforcement of proactive risk mitigation across various operational stages.

How do I create a rule that warns when an agent runs rm -rf on specific directories?

Create a custom rule specifying the rm -rf pattern and target directory conditions to warn or block the action. This declarative approach proactively mitigates risk by intercepting dangerous bash commands before execution.

Does hookify support conditional logic for enforcing agent security policies?

Yes, hookify supports advanced pattern matching and conditional logic for enforcing agent security policies. You can define declarative rules that evaluate specific conditions before allowing, warning, or blocking agent actions.