Dev & Engineering ✓ Anthropic · Official hookify-rulesregex-patternsyaml-frontmatterbash-hooksfile-hookscompletion-checks

Hookify Rule Writer

Guides Claude Code users in writing Hookify rules that warn about or block matching actions.

FollowSkills review · FSRS-2.0
Not recommended
45/ 100 5-point scale 2.3 / 5
Trust13 / 25 · 2.6/5

The skill specifies rule locations, event scopes, and warn/block behavior, and discusses sensitive files and dangerous commands. It does not require user confirmation, disclose the full data flow, provide rollback guidance, or constrain rule permissions; license and dependency-security information are also incomplete, so points are deducted.

Reliability7 / 20 · 1.8/5

The format, fields, events, and workflow are mostly consistent, and regex testing is suggested. However, invalid-input behavior, parser errors, matching boundaries, and runtime failure feedback are undocumented, with no committed tests covering key paths; under static calibration the score remains below 10.

Adaptability9 / 15 · 3.0/5

Trigger phrases, event types, fields, and operators are described clearly for creating and refining Hookify rules. Non-fit scenarios, semantic trigger boundaries, and Chinese-language support are not stated, and the suggested online regex tester may have mainland-China reachability issues, so points are deducted.

Convention7 / 15 · 2.3/5

The document includes an overview, format reference, examples, workflow, and quick reference, and declares a version. It lacks a changelog, explicit maintenance owner or update path, and clear license information for the selected skill; dependency and troubleshooting guidance are also limited, so points are deducted.

Effectiveness6 / 15 · 2.0/5

The skill supplies directly reusable rule templates, event mappings, regex examples, and naming conventions that address the core writing task. Static evidence does not verify actual outputs or runtime compatibility, so the score stays within the static ceiling and is reduced for required manual validation.

Verifiability3 / 10 · 1.5/5

The selected file contains auditable syntax, examples, and procedures, while the README and workflows provide only limited repository context. There is no committed test suite, third-party execution evidence, or multi-source corroboration, so only limited credit is justified.

Evidence confidence:Low Reviewed Jul 20, 2026 Reviewed revision 015170d3fd84
Before you use it
  • Rules can block operations or stop sessions, but the document does not require confirmation before creation or explain recovery and rollback for false matches.
  • Actual compatibility of regexes, event fields, and advanced conditions is not demonstrated by committed tests; validate in an isolated project and avoid relying solely on online testing services.
  • LICENSE.md states commercial terms but does not clearly define a separate license scope for this skill.
Review evidence [1][2][3][4][5][6][7]
See the full review method →

What it does & when to use it

This skill helps users create, configure, and refine Hookify rules. Rules are Markdown files with YAML frontmatter stored in the project’s `.claude/` directory, and can match Bash commands, file edits, stop events, or user prompts. It explains simple regex rules and multi-condition rules, along with trigger messages, naming, and testing guidance. It targets Claude Code’s Hookify mechanism and may require adaptation on other platforms.

Guides users to create .claude/hookify.{rule-name}.local.md files; defines name, enabled, event, action, pattern, and conditions fields; writes regex or conditional matches for Bash, file, stop, and prompt events; drafts Markdown messages shown when a rule triggers; suggests testing regexes with python3; and explains how to edit, disable, or delete rules.

  1. A Claude Code user wants to block commands such as `rm -rf`, `sudo`, or risky permission changes.
  2. A developer wants warnings when `console.log` or `eval` is added to TypeScript files.
  3. A team needs alerts when `.env`, credential, or certificate files are edited.
  4. A project maintainer wants a checklist for tests, builds, or documentation before Claude Code stops.
  5. A developer wants a deployment checklist triggered by specific user-prompt content.

Pros & cons

Pros
  • Covers Bash, file, stop, and prompt events.
  • Supports both simple regex matching and multiple conditions.
  • Explains enabling, disabling, warning, and blocking behavior.
  • Provides concrete guidance on naming, trigger messages, and regex pitfalls.
Limitations
  • Depends on Claude Code’s Hookify mechanism and `.claude/` rule-file convention.
  • The source does not document an independent plugin installation flow, platform coverage, or a test suite.
  • Rule behavior depends on accurate regexes or conditions; the skill provides no automatic validation tool.
  • The exact effect of `action` varies by event type and should not be assumed on other Agent Skills clients.

How to install

The README documents installing Claude Code, for example with curl -fsSL https://claude.ai/install.sh | bash on macOS/Linux, then entering a project directory and running claude. The source does not provide a separate installation command for this skill or the Hookify plugin; the skill is located at plugins/hookify/skills/writing-rules/SKILL.md.

How to use

Trigger it in Claude Code with natural-language requests such as create a hookify rule to warn about rm -rf, write a hook rule for console.log in TypeScript files, or configure hookify. Then create .claude/hookify.{descriptive-name}.local.md in the project root and test the rule on the next tool use.

FAQ

Does the skill automatically create or execute rules?
The source presents it as writing and configuration guidance. It says to create rule files and test on the next tool use, but does not state that the skill automatically performs or executes those steps.
Can a rule block an operation?
Yes. Set `action: block` in the frontmatter; if omitted, the default is `warn`. Blocking behavior depends on the event type.
Does using this skill require network access?
The source does not show network access as a runtime requirement. It only mentions optional online regex testers.
What projects is it suitable for?
It suits projects using Claude Code that need warnings or blocking rules for commands, file changes, stop workflows, or user prompts.

More skills from this repository

All from anthropics/claude-code

Related skills