writing-hookify-rules

Create and manage custom AI behavior rules with markdown and YAML frontmatter.

Updated Feb 18, 2026
One-click install
npx skills add https://github.com/nakaj1214/trader --skill writing-hookify-rules-nakaj1214
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/nakaj1214/trader/tree/main/.claude/skills/hookify
Command: npx skills add https://github.com/nakaj1214/trader --skill writing-hookify-rules-nakaj1214

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured way to define custom rules that guide the AI's behavior, ensuring it adheres to specific patterns, avoids dangerous commands, and follows best practices.

Core Features & Use Cases

  • Rule Creation: Define rules for various events like bash commands, file edits, or user prompts.
  • Pattern Matching: Use regular expressions to specify conditions for rule triggers.
  • Action Control: Specify whether a rule should warn, block, or perform other actions.
  • Use Case: You can create a rule to automatically block any attempt to use rm -rf in a bash command, or to warn the user when they try to commit sensitive information like API keys into a .env file.

Quick Start

Create a hookify rule to warn about using console.log in TypeScript 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 create custom rules to block dangerous bash commands in AI agents?

You create custom AI behavior rules using a markdown format with YAML frontmatter, specifying bash command events and defining block actions to prevent execution of dangerous commands.

Can I use regex to match patterns for file operation rules?

Yes, regular expressions are used for pattern matching to specify conditions for rule triggers, allowing you to target specific file operations like editing TypeScript files or committing sensitive information.

What are AI behavior rules and how do they guide agent actions?

AI behavior rules are custom definitions that ensure an agent adheres to specific patterns, avoids dangerous commands, and follows best practices during bash commands, file operations, or agent stop events.

Do I need to know regex to set up file operation warnings?

Yes, understanding regex is required for effective implementation. You need it to define the pattern matching conditions that trigger warnings for file operations, such as detecting API keys in a .env file.

How do I warn users when committing sensitive information like API keys?

You create a rule for file operations that uses pattern matching to detect sensitive information like API keys in a .env file, then specifies a warn action to alert the user before committing.

What is the best way to structure custom rules for agent stop events?

The best way to structure custom rules is using a markdown-based format with YAML frontmatter, defining the agent stop event, applying conditional logic, and specifying the desired action.