hookify

hookify is a skill for Claude Code from luiseiman/dotforge. It costs 58 tokens per session (825 once invoked), scanned C, original, MIT.

A natural-language tool for creating Claude Code hook rules that warn about or block matching commands, file changes, prompts, or session endings. Hook rules are automatic checks triggered by those events.

In plain words
What is it for?
Use it to create rules such as warning on destructive shell commands, blocking edits to sensitive files, flagging unwanted code, or requiring tests before stopping.
Why use it?
It avoids requiring manual editing of hook configuration when you want to prevent or flag a risky action.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dotforge plugin — 25 skills, 25 commands, 7 agents, 8 hooks shipped together

Good fit Use it to create rules such as warning on destructive shell commands, blocking edits to sensitive files, flagging unwanted code, or requiring tests before stopping.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luiseiman/dotforge/hookify
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add luiseiman/dotforge --skill hookify
Clone the repo
git clone --depth 1 https://github.com/luiseiman/dotforge

Made for: Claude Code.

Or install dotforge, the plugin that ships this one along with the rest of its 25 skills, 25 commands, 7 agents, 8 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hookify

README.md
[![agentmods](https://agentmods.dev/badge/skills/luiseiman/dotforge/hookify/github.svg)](https://agentmods.dev/skills/luiseiman/dotforge/hookify)
Your own site
<a href="https://agentmods.dev/skills/luiseiman/dotforge/hookify"><img src="https://agentmods.dev/badge/skills/luiseiman/dotforge/hookify/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hookify

Your own site · 80×15
<a href="https://agentmods.dev/skills/luiseiman/dotforge/hookify"><img src="https://agentmods.dev/badge/skills/luiseiman/dotforge/hookify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 825 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00058 $0.00825
Opus 5.5 $0.00023 $0.00330
Sonnet 5.5 $0.00012 $0.00165
Haiku 4.5 $0.00006 $0.00082

Measured 3mo ago against content hash de02c68b3293, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

hookify scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- "Warn me when I use rm -rf" → event: bash, action: warn, pattern: `rm\s+-rf`
stacks/hookify/skills/hookify/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hookify — Dynamic Hook Rules

Create hook rules from natural language without editing hooks.json.

Step 1: Understand Intent

Parse the user's description to determine:

  • Event type: bash (commands), file (edits/writes), stop (session end), prompt (user input)
  • Action: warn (show message, allow) or block (deny operation)
  • Pattern: regex to match against the relevant field
  • Field: what to match (command, file_path, new_text, user_prompt, etc.)

Examples:

  • "Warn me when I use rm -rf" → event: bash, action: warn, pattern: rm\s+-rf
  • "Don't let me edit .env files" → event: file, action: block, field: file_path, pattern: \.env$
  • "Block console.log in TypeScript" → event: file, action: warn, field: new_text, conditions on file_path AND new_text
  • "Don't stop without running tests" → event: stop, action: block, field: transcript, operator: not_contains, pattern: pytest|npm test

Step 2: Generate Rule File

Create .claude/hookify.<short-name>.local.md:

---
name: <descriptive-kebab-case-name>
enabled: true
event: <bash|file|stop|prompt>
action: <warn|block>
pattern: <regex>  # for single-condition rules
---

<Warning/block message in markdown. Be helpful — explain WHY and suggest alternatives.>

For multi-condition rules:

---
name: <name>
enabled: true
event: <event>
action: <action>
conditions:
  - field: <field>
    operator: <regex_match|contains|not_contains|equals|starts_with|ends_with>
    pattern: <value>
  - field: <field>
    operator: <operator>
    pattern: <value>
---

<Message>

Step 3: Confirm

Show the user:

  1. The generated file path and content
  2. What it will catch (with example triggers)
  3. What it will NOT catch (edge cases)

Step 4: Test Suggestion

Suggest a way to test the rule immediately:

  • For bash rules: "Try running <command that triggers>"
  • For file rules: "Try editing a file matching the pattern"
  • For stop rules: "The rule will trigger next time the session ends"

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 98 lines · 58 tokens per session scan C de02c68b3293

Subscribe to this mod's changes

hookify is a skill published in the GitHub repository luiseiman/dotforge (8 stars, last pushed 26d ago), licensed MIT. It adds 58 tokens to every session and 825 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

hookify compared with skills from other repositories

hookify next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hookifyluiseiman/dotforgeSkill826d agoMITC58Claude Code
zephermineDannykkh/skill-olympusSkill96d agoMITA97Codex
design-planDannykkh/skill-olympusSkill96d agoMITA108Codex
agent-teamDannykkh/skill-olympusSkill96d agoMITA132Claude Code, Codex
clioDannykkh/skill-olympusSkill96d agoMITA107Claude Code, Codex
frontend-designDannykkh/skill-olympusSkill96d agoMITA92Claude Code, Codex
argosDannykkh/skill-olympusSkill96d agoMITA89Claude Code, Codex