Writing Hookify Rules

Create custom AI behavior rules using markdown with YAML frontmatter.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/CuCryptos/sixroundsdeep --skill writing-hookify-rules-cucryptos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Hookify Rules
Source: https://github.com/CuCryptos/sixroundsdeep/tree/main/.agents/skills/writing-hookify-rules
Command: npx skills add https://github.com/CuCryptos/sixroundsdeep --skill writing-hookify-rules-cucryptos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill allows users to define custom rules that govern the AI's behavior during specific events, such as executing bash commands or editing files, preventing unwanted actions and enforcing best practices.

Core Features & Use Cases

  • Custom Rule Creation: Define rules with specific patterns and conditions to trigger actions.
  • Event-Driven Triggers: Rules can be activated by bash commands, file operations, agent stop events, or user prompts.
  • Action Enforcement: Rules can warn users or block operations based on defined criteria.
  • 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 by defining its name, event type, and pattern in a .local.md file within the .claude/ 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 define custom AI behavior rules for bash commands and file operations?

You define custom AI behavior rules for bash commands and file operations by creating a declarative markdown file with YAML frontmatter. This format specifies event-driven triggers, complex conditions, and regex patterns to govern agent actions.

Can I block specific bash commands like rm -rf from executing in an AI agent workflow?

Yes, you can block specific bash commands like rm -rf by creating a custom rule with a blocking action. The rule uses event-driven triggers and regex patterns to intercept the command and prevent execution before it happens.

What is event-driven AI safety enforcement and how does it work?

Event-driven AI safety enforcement works by triggering predefined rules during specific agent events, such as user prompts, file edits, or bash execution. Rules evaluate complex conditions and regex patterns to either warn users or block operations proactively.

How do I set up rules to prevent accidental deletion of important files during prompt engineering tasks?

To prevent accidental file deletion, create a rule in a .local.md file within the .claude directory. Define the event type, match file operation patterns, and set a blocking action to stop the agent from deleting targeted directories.

Does this rule format support regex patterns for matching complex conditions in user prompts?

Yes, the rule format supports regex patterns for matching complex conditions in user prompts. You can define declarative rules that evaluate user prompt text against regex patterns to trigger warning or blocking actions.

What are the limitations of using markdown rules to manage AI behavior?

Rules are limited to the specific event triggers defined in the format: bash commands, file operations, agent stops, and user prompts. Complex conditional logic outside these events or beyond regex pattern matching capabilities cannot be enforced.