writing-hookify-rules
Write Hookify Rules for Claude Code
Hook rules can be hard to write correctly across bash, file, stop, and prompt events. This skill gives Claude, Codex, and Claude Code practical guidance for creating and testing Hookify rules.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "writing-hookify-rules" from https://skillstore.io/skills/writing-hookify-rules.md and its manifest at https://skillstore.io/api/skills/writing-hookify-rules/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "writing-hookify-rules". A user asks for a rule that warns before editing environment files.
Expected outcome:
The skill returns a clear rule plan with a file event, a sensitive filename match, and a warning message about secrets.
Using "writing-hookify-rules". A user asks how to block dangerous deletion commands.
Expected outcome:
The skill proposes a bash-event rule that targets recursive deletion patterns and explains why the message should be direct.
Using "writing-hookify-rules". A user shares a broad pattern that matches too many words.
Expected outcome:
The skill explains why the pattern is too broad and suggests a narrower expression that matches the intended behavior.
Security Audit
SafeAll static findings were false positives caused by markdown code fences, inline code formatting, and example regex patterns in SKILL.md. The skill provides documentation for writing Hookify rules and does not execute commands, evaluate code, read secrets, or access sensitive files.
Risk Factors
โก Contains scripts (2)
โ๏ธ External commands (105)
๐ Env variables (2)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/writing-hookify-rules/audits/9?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/writing-hookify-rules?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/writing-hookify-rules?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/writing-hookify-rules/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/writing-hookify-rules.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
anthropics. (2026). writing-hookify-rules security audit report (audit version 9) [Author version 0.1.0]. Skillstore. https://skillstore.io/skills/writing-hookify-rules/audits/9BibTeX citation
@techreport{anthropics-writing-hookify-rules-2026,
author = {anthropics},
title = {writing-hookify-rules security audit report (audit version 9)},
institution = {Skillstore},
year = {2026},
number = {9},
url = {https://skillstore.io/skills/writing-hookify-rules/audits/9},
note = {Author version 0.1.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "writing-hookify-rules security audit report (audit version 9)"
version: "0.1.0"
type: report
authors:
- name: "anthropics"
date-released: "2026-07-09"
url: "https://skillstore.io/skills/writing-hookify-rules/audits/9"
identifiers:
- type: other
value: "skillstore:writing-hookify-rules:audit:9"
description: "Skillstore immutable audit report identifier"
Compare variants
4 installable variantsEach author remains a separate installable skill. The recommended variant is ranked by Skillstore evidence.
Why this variant is first
writing-hookify-rules
2026-08-21
anthropics-writing-hookify-rules
2026-08-21
captaincrouton89-writing-hookify-rules
2026-08-21
davila7-writing-hookify-rules
2026-08-21
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Block risky terminal commands
Create a rule that warns or blocks commands such as recursive deletion, broad permission changes, or production deployment steps.
Warn about unsafe file edits
Build file rules that catch debug statements, sensitive file changes, or generated file edits before they enter a workflow.
Add completion checklists
Write stop-event rules that remind agents to run tests, check builds, or update documentation before finishing work.
Try These Prompts
Create a Hookify rule that warns when Claude tries to run a risky bash command. Include the event, pattern, action, and message.
Turn this team policy into a Hookify rule: [paste policy]. Explain the event type, matching pattern, and warning message.
Write a Hookify file rule with multiple conditions for TypeScript files. It should warn when new text adds debug logging.
Review these Hookify rules for clarity, false positives, naming, and maintainability. Suggest specific improvements without changing the intent.
Best Practices
- Use narrow patterns that match the behavior you actually want to catch.
- Write rule messages that explain the risk and suggest a safe next step.
- Name local rule files clearly and keep them inside the project Claude directory.
Avoid
- Using broad words that match unrelated commands, filenames, or prompts.
- Blocking common development actions without explaining the reason.
- Storing local Hookify rules in shared locations when they are project-specific.
Frequently Asked Questions
What is this skill for?
Does it create rules automatically?
Which tools can use this skill?
Can it block unsafe commands?
Does it read secret files?
How should users test a rule?
Developer Details
Author
anthropicsLicense
MIT
Author version
v0.1.0
Skillstore revision
r1
Ref
26421118b848d9f1efc0aa169d8a7a9e7e0a877e
Maintenance freshness
7/18/2026
Usage
14 downloads ยท 382 views
File structure
๐ SKILL.md