Hookify Rule Writer
Guides Claude Code users in writing Hookify rules that warn about or block matching actions.
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.
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.
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.
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.
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.
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.
- 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.
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.
- A Claude Code user wants to block commands such as `rm -rf`, `sudo`, or risky permission changes.
- A developer wants warnings when `console.log` or `eval` is added to TypeScript files.
- A team needs alerts when `.env`, credential, or certificate files are edited.
- A project maintainer wants a checklist for tests, builds, or documentation before Claude Code stops.
- A developer wants a deployment checklist triggered by specific user-prompt content.
Pros & cons
- 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.
- 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.