writing-hookify-rules

Create Hookify guardrail rules using regex and YAML syntax.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/Shawn-Guo-CN/agentfoundry-plugin-marketplace --skill writing-hookify-rules-shawn-guo-cn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/Shawn-Guo-CN/agentfoundry-plugin-marketplace/tree/main/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/Shawn-Guo-CN/agentfoundry-plugin-marketplace --skill writing-hookify-rules-shawn-guo-cn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users create custom rules for the Hookify tool, enabling them to define specific patterns and actions to prevent or warn about certain code behaviors.

Core Features & Use Cases

  • Rule Creation Guidance: Provides detailed syntax and examples for writing Hookify rules.
  • Pattern Matching: Helps define regex patterns for various events like bash commands, file edits, and user prompts.
  • Use Case: You want to ensure no sensitive API keys are accidentally committed to your repository. This Skill guides you in creating a Hookify rule that triggers a warning if a pattern matching API_KEY is found in .env files during edits.

Quick Start

Use the writing-hookify-rules skill to create a new hookify rule for blocking dangerous rm 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 create custom code guardrails to block dangerous bash commands?

To create custom code guardrails, use the Hookify tool to define validation rules that trigger actions when matching specific regex patterns in bash commands, preventing risky executions during development workflows.

How do I prevent sensitive API keys from being committed to repository files?

To prevent sensitive API keys from being committed, define a Hookify rule that triggers a warning if a regex pattern matching your key is found during file modification events, stopping accidental exposure in edits.

What events can I target when defining validation rules for code development workflows?

You can target bash commands, file modifications, agent stop events, and user prompts when defining validation rules for code development workflows, allowing granular control over specific actions in your pipeline.

Do I need to know regex and YAML to write custom Hookify rules?

Yes, you need to understand regex and YAML to write custom Hookify rules effectively, as rule definition requires configuring detailed syntax and pattern matching for event type validations.

What is the best way to configure pattern matching for agent stop events?

The best way to configure pattern matching for agent stop events is to write a Hookify rule utilizing detailed YAML syntax and regex patterns to validate conditions before the agent execution terminates.