writing-hookify-rules

Create and validate Hookify rule files with YAML frontmatter and Markdown bodies for Claude tool monitoring.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hookify rule writing and validation helps teams define safe, actionable triggers for Claude to surface warnings or guidance, reducing misconfigurations and unsafe prompts.

Core Features & Use Cases

  • Rule authoring: Create per-rule YAML frontmatter that defines name, enabled, event, pattern, and optional conditions to govern when the rule fires.
  • Rule storage: Rules are stored in .claude/hookify.{rule-name}.local.md and loaded on demand to guide Claude's behavior.
  • Message customization: Provide the body message to display when a rule triggers, enabling guidance or warnings in context.
  • Use Case: You want to block risky prompts or surface warnings when a user writes a dangerous command or potentially sensitive content.

Quick Start

Create a sample hookify rule in .claude/hookify.sample.local.md and test it with a benign command to observe the 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 create markdown rules to trigger warnings during Claude tool usage?

Hookify rules are markdown files with YAML frontmatter that define name, description, and optional conditions to monitor patterns and trigger warnings or guidance during Claude tool usage.

What is the required format for storing Hookify rule definitions?

Hookify rule definitions must be stored as markdown files at .claude/hookify.{descriptive-name}.local.md, containing YAML frontmatter with required name and description fields alongside a markdown body for the runtime message.

How do I validate Hookify rules to ensure safe prompt triggers?

Validating Hookify rules involves checking the YAML frontmatter for required name and description fields, verifying optional event and pattern configurations, and testing the markdown body message with a benign command to observe warnings.

Can I use conditional logic to control when a Hookify rule fires?

Yes, Hookify rules support optional conditions fields in the YAML frontmatter, allowing you to specify when a rule should trigger based on events and patterns during Claude tool usage sessions.

How do I block risky prompts using markdown patterns and frontmatter?

You block risky prompts by authoring a Hookify rule with a pattern field in the YAML frontmatter to detect dangerous commands, then writing a markdown body message that surfaces warnings when the pattern matches.

What are the limitations of using Hookify rules for safety monitoring?

Hookify rules rely on markdown files with YAML frontmatter and basic to advanced pattern matching, meaning complex conditional logic may be constrained by the supported frontmatter fields and pattern capabilities available in the rule definition.