writing-hookify-rules

Create hookify rules to detect undesired patterns in code and prompts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hookify rules enable automated detection of undesirable patterns in code, prompts, and workflows by guiding Claude to surface warnings and guidance when patterns are matched.

Core Features & Use Cases

  • Define and store rules in .claude/hookify.{rule-name}.local.md with YAML frontmatter (name, enabled, event, pattern, optional conditions, and action).
  • Support complex conditions and multi-event monitoring to provide actionable feedback without interrupting safe workflows.
  • Typical use case: create a rule that warns when console.log is used in a UI file, helping teams enforce safer logging practices.

Quick Start

Create a new hookify rule file at .claude/hookify.{name}.local.md with a minimal pattern to trigger a warning.

Frequently Asked Questions about writing-hookify-rules

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

FAQPage Schema
How do I automate code review checks for specific patterns in my repository?

You can automate code review by defining hookify rules that detect undesired patterns. Rules are stored as .claude/hookify.{name}.local.md files with YAML frontmatter specifying event, pattern, and optional conditions to trigger warnings.

Can I create linting rules that only trigger on file changes or bash commands?

Yes, hookify rules support bash, file, stop, and prompt events. You configure the target event in the YAML frontmatter to monitor specific workflows and apply conditions for complex scenarios without interrupting safe operations.

What is the best way to warn developers about console.log usage in UI files?

A typical use case is creating a hookify rule with a pattern matching console.log in UI files. The rule surfaces warnings and guidance when matched, helping teams enforce safer logging practices automatically during development.

Do I need any dependencies to set up custom pattern detection rules?

No external dependencies are required. You create hookify rules by writing markdown files with YAML frontmatter fields like name, enabled, event, and pattern to define detection behavior directly in your project.

How do I disable an automated hookify rule without deleting the file?

Each hookify rule file contains an enabled field in its YAML frontmatter. Setting this boolean to false disables the rule, allowing you to toggle pattern detection behavior without removing the rule definition file.