Writing Hookify Rules

Creates hookify rules with YAML frontmatter and regex patterns for AI-assisted development workflows.

Updated Sep 6, 2024
One-click install
npx skills add https://github.com/rafazsh/dotfiles --skill writing-hookify-rules-rafazsh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Writing Hookify Rules
Source: https://github.com/rafazsh/dotfiles/tree/main/apps/claude/skills/writing-rules
Command: npx skills add https://github.com/rafazsh/dotfiles --skill writing-hookify-rules-rafazsh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users create and configure hookify rules that prevent mistakes, enforce workflows, and provide guidance during AI-assisted development tasks.

Core Features & Use Cases

  • Hook Rule Creation: Guides users through writing markdown-based hookify rules with correct YAML frontmatter and event configuration.
  • Pattern Design Guidance: Helps define regex patterns, conditions, and trigger events for bash commands, file edits, prompts, and completion checks.
  • Use Case: A developer can use this Skill to create a rule that warns about dangerous shell commands or reminds agents to run tests before finishing work.

Quick Start

Use the writing hookify rules skill to create a rule that warns when sensitive files are edited.

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 for Claude Code?

To create hookify rules for Claude Code, you write markdown files with correct YAML frontmatter to configure event triggers, regex patterns, and safety reminders that guide AI-assisted development workflows.

What are hookify rules used for in AI development workflows?

Hookify rules are used to prevent mistakes, enforce developer workflows, and provide safety guidance during AI-assisted development tasks by triggering warnings or reminders for specific events like dangerous bash commands.

How do I configure regex patterns and events in hookify YAML frontmatter?

You configure regex patterns and events in hookify YAML frontmatter by defining markdown-based rules that specify trigger conditions for bash commands, file edits, prompts, and completion checks to control agent behavior.

Do I need prior knowledge of hookify markdown formats to write rules?

Yes, writing hookify rules requires knowledge of hookify markdown formats, YAML frontmatter fields, and rule organization conventions to correctly structure event configurations and pattern matching for Claude Code tasks.

Can I set up a hookify rule to warn when sensitive files are edited?

Yes, you can set up a hookify rule to warn when sensitive files are edited by defining a file edit event trigger and regex pattern in your markdown rule that detects unauthorized modifications and issues a safety reminder.

What's the best way to enforce running tests before an AI agent finishes work?

The best way to enforce running tests before an AI agent finishes work is to create a hookify rule with a completion check event trigger that reminds the agent to execute tests before finalizing the development task.