writing-hookify-rules

Write configurable Hookify rules detecting unwanted patterns in agent interactions.

2|Updated May 8, 2026
One-click install
npx skills add https://github.com/xotong/claude-marketplace --skill writing-hookify-rules-xotong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/xotong/claude-marketplace/tree/main/plugins/anthropic-hookify/skills/writing-rules
Command: npx skills add https://github.com/xotong/claude-marketplace --skill writing-hookify-rules-xotong

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables writing safe, configurable Hookify rules that monitor agent interactions for unwanted patterns and show actionable messages.

Core Features & Use Cases

  • Define hookify rules with YAML frontmatter that specify event, pattern, and optional conditions.
  • Compose clear, context-rich messages that guide users when a rule matches.
  • Manage rules as Markdown files under .claude/hookify.{name}.local.md to enable on-demand control.

Quick Start

Create a new .claude/hookify.{name}.local.md file containing the frontmatter and a sample warning message.

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 pattern-matching rules to detect unwanted patterns in agent interactions?

You can create configurable hookify rules using Markdown files with YAML frontmatter to specify event types, pattern matching, and optional conditions. These rules monitor agent interactions and trigger actionable warning messages when unwanted patterns are detected.

What is the file format for hookify rules in the .claude directory?

Hookify rules use Markdown-based files named hookify.{name}.local.md containing YAML frontmatter fields for event and pattern configuration, followed by messaging content. This format enables on-demand control of rule activation within the .claude directory structure.

Can I write hookify rules for bash events and file edits in agent workflows?

Yes, hookify rules support monitoring multiple event types including bash events, file edits, prompt inputs, and stop events. Each rule's frontmatter specifies the target event type and pattern-matching conditions for comprehensive agent interaction coverage.

How do I add warning messages to hookify rules when a pattern match occurs?

Compose clear, context-rich messages directly in the Markdown body of the hookify rule file. These messages guide users with actionable instructions when the rule's specified pattern and conditions match during agent interactions.

Do I need any dependencies to write hookify rules with frontmatter?

No external dependencies are required to author hookify rules. You only need to create Markdown files with YAML frontmatter under the .claude directory, specifying event types, patterns, and optional conditions without additional libraries or tools.

What are the limitations of using Markdown frontmatter for hookify rule configuration?

Hookify rules are limited to pattern-matching configurations defined in YAML frontmatter and messaging content in Markdown. Complex conditional logic beyond frontmatter fields may not be supported, and rules must follow the specific file naming convention to function properly.