writing-hookify-rules

Author Hookify rule markdown with YAML frontmatter and regex patterns.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you correctly write Hookify rules so Hookify reliably detects risky patterns and responds with the right guidance.

Core Features & Use Cases

  • Rule authoring: Defines the expected Hookify rule markdown structure with required frontmatter fields like name, enabled, event, and pattern.
  • Syntax correctness and safety: Explains regex basics, YAML frontmatter pitfalls, and how to avoid overly broad patterns that cause false positives.
  • Advanced conditions: Supports multi-condition rules using event-specific fields and match operators (regex_match, contains, equals, not_contains, starts_with, ends_with).
  • Operational workflow: Guides how to create, test, refine, and disable rules using .claude/hookify.{rule-name}.local.md files.

Quick Start

Tell the AI: "Create a Hookify rule that blocks rm -rf in bash commands and show a warning message explaining safer alternatives."

Frequently Asked Questions about writing-hookify-rules

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

FAQPage Schema
How do I write a Hookify rule to block specific bash commands?

Writing a Hookify rule requires creating a markdown file with YAML frontmatter specifying the name, enabled status, event type, and regex pattern to match the target bash command, followed by a message body containing structured safety guidance.

What is the required YAML frontmatter format for Hookify rules?

Required YAML frontmatter for Hookify rules includes name and description fields for discovery, alongside enabled, event, and pattern fields that define the trigger conditions and regex matching behavior for tool activity.

Can I use multiple conditions in a single Hookify rule?

Hookify supports multi-condition rules by utilizing event-specific fields and match operators including regex_match, contains, equals, not_contains, starts_with, and ends_with to combine multiple matching criteria within a single rule definition.

How do I test and refine Hookify rules before enabling them?

Testing and refining Hookify rules involves using local .claude/hookify.{rule-name}.local.md files to safely validate regex patterns, verify syntax correctness, and check for false positives before activating rules globally.

Why do my Hookify regex rules trigger false positives on safe commands?

False positives in Hookify rules typically stem from overly broad regex patterns that inadvertently match safe tool activity; refining regex syntax to target specific bash command structures prevents matching unintended actions.