Writing Hookify Rules

Define Hookify rules in Markdown with YAML frontmatter for event patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/arlenagreer/claude_configuration_docs --skill writing-hookify-rules-arlenagreer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Hookify Rules
Source: https://github.com/arlenagreer/claude_configuration_docs/tree/main/plugins/marketplaces/claude-code-plugins/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/arlenagreer/claude_configuration_docs --skill writing-hookify-rules-arlenagreer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solves?

This Skill eliminates guesswork and manual oversight by automatically triggering warnings, blocks, and reminders when Claude encounters specific patterns in commands, code edits, or user prompts.

Core Features & Use Cases

  • Pattern Detection: Create regex-based rules that monitor bash commands, file edits, and user interactions.
  • Safety Enforcement: Block dangerous operations like rm -rf or warn about console.log in production code.
  • Use Case: Imagine you're working on a critical project. Use this Skill to automatically warn Claude whenever it attempts to use dangerous commands or edit sensitive files like .env.

Quick Start

Use the Writing Hookify Rules skill to create a rule that warns about console.log statements 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 regex rules to detect dangerous bash commands in Claude's outputs?

Hookify rules use regex patterns in YAML frontmatter to monitor bash commands. Define a pattern matching `rm -rf` or similar destructive operations, set the event type to capture command execution, and specify a warning message that displays when Claude attempts the matched pattern.

Can I use Hookify rules to warn about console.log statements in production code?

Yes. Write a rule with a regex pattern targeting `console.log` in TypeScript or JavaScript files, set the event to file edits, add conditions filtering for production paths, and trigger a reminder message when the pattern matches during code modifications.

What's the structure of a Hookify rule file?

Hookify rules are Markdown files with YAML frontmatter containing name, enabled status, event type, regex pattern, optional conditions for multi-condition logic, and a message body. The frontmatter specifies what to watch; the message tells Claude what to do when a rule triggers.

How do multi-condition Hookify rules work?

Multi-condition rules combine multiple patterns or checks in the conditions field of the YAML frontmatter. All conditions must match for the rule to trigger, enabling precise targeting—for example, flagging file edits only in sensitive directories or specific file types.

What events can Hookify rules monitor?

Hookify rules monitor bash commands, file edits, and user prompts. Each rule specifies an event type in its frontmatter to determine what triggers pattern matching—allowing safety enforcement across command execution, code changes, and user interactions.

Do I need programming experience to write Hookify rules?

Basic regex knowledge helps but isn't required for simple patterns. Hookify rules use straightforward YAML syntax and plain-text regex; you can start with common patterns like exact strings or character classes and expand as needed for complex matching logic.