hookify

A command for creating Hookify rules from explicit instructions or unwanted behaviour found in the conversation. These rules can warn against or prevent matching actions.

In plain words
What is it for?
Use it to create checks for risky commands, unwanted code patterns, or other behaviours that should trigger a warning or be blocked.
Why use it?
It turns repeated problems into automatic project safeguards instead of relying on memory.

Command for Claude Code

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.

agentmods
npx agentmods add commands/opensesh/karimo-overview/hookify
Clone the repo
git clone --depth 1 https://github.com/opensesh/karimo-overview

Made for: Claude Code.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,884 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00012 $0.01884
Opus 5 $0.00006 $0.00942
Sonnet 5 $0.00002 $0.00377
Haiku 4.5 $0.00001 $0.00188

Measured 2d ago against content hash 7560e58edc6c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

- Label: Short description (e.g., "Block rm -rf")
Origin

Copies of this mod

3 near-identical copies found in the catalogue:

  • hookify — 100% identical, 0 lines differ
  • hookify — 100% identical, 0 lines differ
  • hookify — 88% identical, 38 lines differ
.claude/plugins/hookify/commands/hookify.md · 232 lines

How it starts

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

Hookify - Create Hooks from Unwanted Behaviors

FIRST: Load the hookify:writing-rules skill using the Skill tool to understand rule file format and syntax.

Create hook rules to prevent problematic behaviors by analyzing the conversation or from explicit user instructions.

Your Task

You will help the user create hookify rules to prevent unwanted behaviors. Follow these steps:

Step 1: Gather Behavior Information

If $ARGUMENTS is provided:

  • User has given specific instructions: $ARGUMENTS
  • Still analyze recent conversation (last 10-15 user messages) for additional context
  • Look for examples of the behavior happening

If $ARGUMENTS is empty:

  • Launch the conversation-analyzer agent to find problematic behaviors
  • Agent will scan user prompts for frustration signals
  • Agent will return structured findings

To analyze conversation: Use the Task tool to launch conversation-analyzer agent:

{
  "subagent_type": "general-purpose",
  "description": "Analyze conversation for unwanted behaviors",
  "prompt": "You are analyzing a Claude Code conversation to find behaviors the user wants to prevent.

Read user messages in the current conversation and identify:
1. Explicit requests to avoid something (\"don't do X\", \"stop doing Y\")
2. Corrections or reversions (user fixing Claude's actions)
3. Frustrated reactions (\"why did you do X?\", \"I didn't ask for that\")
4. Repeated issues (same problem multiple times)

For each issue found, extract:
- What tool was used (Bash, Edit, Write, etc.)
- Specific pattern or command
- Why it was problematic
- User's stated reason

Return findings as a structured list with:
- category: Type of issue
- tool: Which tool was involved
- pattern: Regex or literal pattern to match
- context: What happened
- severity: high/medium/low

Focus on the most recent issues (last 20-30 messages). Don't go back further unless explicitly asked."
}

Step 2: Present Findings to User

After gathering behaviors (from arguments or agent), present to user using AskUserQuestion:

Read the full file on GitHub · 232 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. 2d ago First seen · 232 lines · 12 tokens per session scan C 7560e58edc6c

Subscribe to this mod's changes

hookify is a command published in the GitHub repository opensesh/karimo-overview (11 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 12 tokens to every session and 1,884 once invoked, about $0.0001 per session on Opus 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-30.