writing-hookify-rules

Monitor agent tool usage and user prompts against regex patterns.

196|20|Updated Jan 17, 2026
One-click install
npx skills add https://github.com/xiaoyuge886/aigc --skill writing-hookify-rules-xiaoyuge886
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/xiaoyuge886/aigc/tree/main/plugins/claude-plugins-official-main/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/xiaoyuge886/aigc --skill writing-hookify-rules-xiaoyuge886

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the problem of uncontrolled AI agent behavior by allowing users to define custom rules that monitor and intercept specific actions, such as executing dangerous bash commands or editing sensitive files.

Core Features & Use Cases

  • Event Monitoring: Watch for specific triggers across bash commands, file edits, agent stops, or user prompts.
  • Pattern Matching: Use regex-based conditions to identify problematic patterns like hardcoded API keys or dangerous system commands.
  • Action Enforcement: Automatically warn or block operations that violate defined safety or quality standards.

Quick Start

Use the writing-hookify-rules skill to create a new rule that blocks the execution of any command containing rm -rf.

Frequently Asked Questions about writing-hookify-rules

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

FAQPage Schema
How do I prevent an AI agent from executing dangerous bash commands?

To prevent dangerous bash commands, you can define custom guardrails that monitor agent tool usage and automatically block operations matching specific regex patterns like rm -rf. This enforces safety policies during AI-assisted coding sessions.

What are AI agent guardrails and how do they work?

AI agent guardrails are automated policy enforcement rules that monitor events like bash execution, file edits, and user prompts. They use regex-based pattern matching to identify problematic actions and automatically warn or block operations that violate defined standards.

How do I block an AI agent from editing sensitive files?

To block editing of sensitive files, configure custom rules that monitor file modification events and intercept actions matching your defined regex patterns. The guardrails automatically warn or block operations violating your safety standards.

Can I use regex patterns to intercept hardcoded API keys in user prompts?

Yes, you can use regex-based conditions to identify problematic patterns like hardcoded API keys in user prompts. The guardrails monitor prompts against defined regex patterns and automatically warn or block operations that violate security standards.

What is the best way to automate policy enforcement for AI-assisted coding?

The best way to automate policy enforcement is to define custom guardrails that monitor agent tool usage against regex patterns. This proactively mitigates risk by automatically warning or blocking operations that violate safety and quality standards across bash commands and file modifications.

What events can I monitor to enforce safety guardrails on an AI agent?

You can monitor bash commands, file edits, agent stops, and user prompts. By applying regex-based conditions to these events, the guardrails automatically enforce safety and quality standards by warning or blocking operations that violate defined rules.