writing-rules

Creates standardized hookify rule files for managing AI assistant behaviors and workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a structured approach to creating and refining hookify rules, enabling consistent guidance for AI interactions and prompt management.

Core Features & Use Cases

  • Define and manage hookify rule files with clear frontmatter and message bodies.
  • Validate rule syntax and event specifications across bash, file, stop, and prompt events.
  • Reuse and share rule patterns to enforce safety and consistency across projects.

Quick Start

Create a new hookify rule by specifying a descriptive name, an activation event, and a short message, then save it in the .claude/hookify directory.

Frequently Asked Questions about writing-rules

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

FAQPage Schema
How do I create hookify rules to guide AI prompts and safety checks?

To create hookify rules, define a descriptive name, an activation event, and a short message, then save the markdown file in the .claude/hookify directory. This enforces consistent guidance for AI interactions and prompt management.

What frontmatter fields are required when defining markdown hookify rule files?

Defining markdown hookify rule files requires frontmatter containing a name and description. The file body must also specify standard fields like event, pattern, and message to ensure proper validation and storage.

What activation events are supported for validating hookify rule syntax?

Validating hookify rule syntax supports activation across bash, file, stop, and prompt events. Specifying these events correctly ensures the rules trigger the intended automation and safety checks.

What is the best way to standardize hookify rule storage across multiple projects?

Standardize hookify rule storage by saving files in the .claude/hookify.{name}.local.md format. This ensures consistent pattern validation and allows safe reuse of rule definitions across different projects.

Can I reuse and share hookify rule patterns to enforce consistency across projects?

Yes, you can reuse and share hookify rule patterns to enforce safety and consistency across projects. This structured approach standardizes prompt guidance and validation for all defined automation events.

Why does my hookify rule fail validation when updating markdown frontmatter?

Hookify rule validation fails if the markdown frontmatter lacks a name or description, or if the event field does not match valid bash, file, stop, or prompt specifications. Ensure all required fields are present.