hookify

hookify is a skill for Claude Code from anthony-spruyt/claude-plugins. It costs 51 tokens per session (987 once invoked), scanned C, original, MIT.

A Hookify skill for turning unwanted agent behaviors into hook rules. It can use explicit instructions or analyze recent conversation messages, then create rules using Hookify's file format.

In plain words
What is it for?
Use it when you want to prevent a named behavior, analyze a conversation for problems, or invoke the /hookify command.
Why use it?
It reduces the manual work of translating a complaint or repeated mistake into an automatic warning or prevention rule.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: names the AskUserQuestion tool.

Part of the hookify-plus plugin — 5 skills, 1 agent shipped together

Good fit Use it when you want to prevent a named behavior, analyze a conversation for problems, or invoke the /hookify command.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anthony-spruyt/claude-plugins/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 anthony-spruyt/claude-plugins --skill hookify
Clone the repo
git clone --depth 1 https://github.com/anthony-spruyt/claude-plugins

Made for: Claude Code.

Or install hookify-plus, the plugin that ships this one along with the rest of its 5 skills, 1 agent.

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/anthony-spruyt/claude-plugins/hookify/github.svg)](https://agentmods.dev/skills/anthony-spruyt/claude-plugins/hookify)
Your own site
<a href="https://agentmods.dev/skills/anthony-spruyt/claude-plugins/hookify"><img src="https://agentmods.dev/badge/skills/anthony-spruyt/claude-plugins/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/anthony-spruyt/claude-plugins/hookify"><img src="https://agentmods.dev/badge/skills/anthony-spruyt/claude-plugins/hookify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 987 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.00051 $0.00987
Opus 5.5 $0.00020 $0.00395
Sonnet 5.5 $0.00010 $0.00197
Haiku 4.5 $0.00005 $0.00099

Measured 22d ago against content hash 04b5a8f7399d, 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 22d 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")
hookify-plus/skills/hookify/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 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-plus: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 acting on explicit user instructions.

Step 1: Gather Behavior Information

If $ARGUMENTS is provided:

  • Parse the user's specific instructions from $ARGUMENTS.
  • Also scan recent conversation (last 10-15 user messages) for additional context and examples of the behavior occurring.

If $ARGUMENTS is empty:

  • Launch the hookify-plus:conversation-analyzer agent via the Agent tool to find problematic behaviors. The agent does not see this conversation - include the relevant user messages and tool calls, or the transcript path, in its prompt.

Step 2: Present Findings to the User

After gathering behaviors (from arguments or the agent), present findings using AskUserQuestion.

Question 1 — Which behaviors to hookify:

  • Header: "Create Rules"
  • multiSelect: true
  • Options: List each detected behavior (max 4)
    • Label: Short description (e.g., "Block rm -rf")
    • Description: Why it is problematic

Question 2 — Action for each selected behavior:

  • "Should this block the operation or just warn?"
  • Options:
    • "Just warn" (action: warn — shows message but allows)
    • "Block operation" (action: block — prevents execution)

Question 3 — Pattern refinement:

  • "What patterns should trigger this rule?"
  • Show detected patterns and allow the user to refine or add more.

Step 3: Generate Rule Files

For each confirmed behavior, create a .claude/hookify-plus/{rule-name}.md file.

Rule naming convention:

  • Use kebab-case.
  • Be descriptive: block-dangerous-rm, warn-console-log, require-tests-before-stop.
  • Start with an action verb: block, warn, prevent, require.

Basic rule format:

---
name: {rule-name}
enabled: true
event: {bash|file|stop|prompt|all}
pattern: {regex pattern}
action: {warn|block}
---

{Message to show Claude when rule triggers}

Read the full file on GitHub · 127 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 22d ago Changed · -32 lines 04b5a8f7399d
  2. 1mo ago First seen · 159 lines · 51 tokens per session scan C 580bc6b4a9aa

Subscribe to this mod's changes

hookify is a skill published in the GitHub repository anthony-spruyt/claude-plugins (2 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 987 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

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards…

vercel/next.js · 123 tokens