Agent skill · writing content · affaan-m
hookify-rules
自動フック実装、イベントドリブン実行、およびルール駆動ワークフロー。
Why this skill is useful
Provides specific YAML and regex patterns for defining event-driven workflows that the AI wouldn't reliably generate on its own.
What it needs
About 2k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.
What this skill does
Writing Hookify Rules Overview Hookify rules are markdown files with YAML frontmatter that define patterns to watch for and messages to show when those patterns match. Rules are stored in .claude/hookify.{rule-name}.local.md files. Rule File Format Basic Structure Frontmatter Fields Field Required Values Description ------- ---------- -------- ------------- name Yes kebab-case string Unique identifier (verb-first: warn-, block-, require-) enabled Yes true/false Toggle without deleting event Yes bash/file/stop/prompt/all Which hook event triggers this action No warn/block warn (default) shows message; block prevents operation pattern Yes regex string Pattern to match (or use conditions for complex rules) Advanced Format (Multiple Conditions) Condition fields by event: bash: command file: filepath, newtext, oldtext, content prompt: userprompt Operators: regexmatch, contains, equals, notcontains, startswith, endswith All conditions must match for rule to trigger. Event Type Guide bash Events Match Bash command patterns: Dangerous commands: rm\s+-rf, dd\s+if=, mkfs Privilege escalation: sudo\s+, su\s+ Permission issues: chmod\s+777 file Events Match Edit/Write/MultiEdit operations: Debug code: console\.log\(, debugger Security risks: eval\(, innerHTML\s= Sensitive files: \.env$, credentials, \.pem$ stop Events Completion checks and reminders. Pattern . matches always. prompt Events Match user prompt content for workflow enforcement. Pattern Writing Tips Regex Basics Escape special chars: . …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills affaan-m/hookify-rules