writing-hookify-rules

Create and maintain Hookify rule files with YAML frontmatter and markdown messages.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/NGTPTE/TuriX-MarketPlace --skill writing-hookify-rules-ngtpte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-hookify-rules
Source: https://github.com/NGTPTE/TuriX-MarketPlace/tree/main/plugins/hookify/skills/writing-rules
Command: npx skills add https://github.com/NGTPTE/TuriX-MarketPlace --skill writing-hookify-rules-ngtpte

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you create and maintain Hookify rules that watch for risky commands, file changes, and prompt patterns so Claude can warn, block, or guide behavior automatically.

Core Features & Use Cases

  • Rule file structure with YAML frontmatter for name, enabled, event, action, and pattern settings.
  • Advanced condition-based matching for file paths, content, and prompt text when simple patterns are not enough.
  • Guidance for naming, organizing, and testing rules in the project .claude directory.
  • Use cases include blocking dangerous shell commands, warning about .env edits, and enforcing completion checklists.

Quick Start

Create a Hookify rule file for your target behavior, choose the right event and pattern, and write a clear message that explains what should happen when the rule triggers.

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 hookify rules to block dangerous shell commands in Claude Code?

Hookify rules detect risky commands and file changes by using YAML frontmatter to define event triggers and regex patterns, paired with markdown messages that instruct Claude to warn or block the behavior automatically within the project directory.

What is a hookify rule file and how does its YAML frontmatter work?

A hookify rule file uses YAML frontmatter to define name, enabled status, event type, action, and pattern settings. This configuration allows Claude Code to watch for specific file changes, prompt patterns, or shell commands and respond with warn or block behaviors.

Can I use advanced conditions instead of simple regex for hookify file path matching?

Yes, hookify supports advanced condition-based matching for file paths, content, and prompt text. You should use these advanced conditions when simple regex patterns cannot accurately capture the complex trigger logic needed for your specific Claude Code events.

How do I warn about .env file edits using hookify rules?

You warn about .env file edits by creating a hookify rule that targets file edit events, uses a regex pattern matching the .env file path, and sets the action to warn with a clear markdown message explaining the risk so Claude can guide behavior automatically.

Does hookify require a specific directory structure for project-level rule activation?

Hookify rules require placement in the project .claude directory for project-level activation. Proper file naming and organization within this directory ensure the Claude Code-compatible hook system correctly detects events and triggers the configured warn or block behaviors.

What are the limitations of using regex patterns for prompt text detection in hookify?

Regex patterns for prompt text detection may struggle with complex contextual matching. When simple regex syntax cannot accurately capture nuanced trigger conditions, hookify allows transitioning to advanced condition-based matching for file paths, content, and prompt text.