hookify

hookify is a command for Claude Code from athola/claude-night-market. It costs 10 tokens per session (627 once invoked), scanned C, original, MIT.

A command for creating persistent rules that watch actions such as shell commands or file edits and warn or block when a pattern matches.

In plain words
What is it for?
It helps turn instructions such as avoiding console.log or blocking dangerous deletion commands into project rules stored in Markdown files.
Why use it?
It prevents repeated unwanted actions without requiring you to remember every restriction during each session.

Command for Claude Code

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

Part of the hookify plugin — 2 skills, 6 commands shipped together

Good fit It helps turn instructions such as avoiding console.log or blocking dangerous deletion commands into project rules stored in Markdown files.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/athola/claude-night-market/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.

Clone the repo
git clone --depth 1 https://github.com/athola/claude-night-market

Made for: Claude Code.

Or install hookify, the plugin that ships this one along with the rest of its 2 skills, 6 commands.

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/commands/athola/claude-night-market/hookify/github.svg)](https://agentmods.dev/commands/athola/claude-night-market/hookify)
Your own site
<a href="https://agentmods.dev/commands/athola/claude-night-market/hookify"><img src="https://agentmods.dev/badge/commands/athola/claude-night-market/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/commands/athola/claude-night-market/hookify"><img src="https://agentmods.dev/badge/commands/athola/claude-night-market/hookify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 627 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.00010 $0.00627
Opus 5.5 $0.00004 $0.00251
Sonnet 5.5 $0.00002 $0.00125
Haiku 4.5 $0.00001 $0.00063

Measured 1mo ago against content hash a12df616658c, 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 1mo 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.

- /hookify Block rm -rf commands
plugins/hookify/commands/hookify.md · 131 lines

How it starts

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

Hookify Command

Creates custom behavioral rules to prevent unwanted actions.

When To Use

Use this command when you need to:

  • Creating rules from explicit instructions
  • Analyzing conversation for unwanted behaviors to block

When NOT To Use

  • Complex multi-step workflows - use agents instead
  • One-time operations that don't need persistent rules

Usage

Create Rule from Instruction

/hookify Don't use console.log in TypeScript files

This will:

  1. Parse your instruction
  2. Determine appropriate event type (bash, file, etc.)
  3. Generate regex pattern
  4. Create rule file in .claude/
  5. Enable rule immediately

Analyze Conversation

/hookify

Without arguments, hookify will:

  1. Analyze recent conversation history
  2. Identify unwanted behaviors or mistakes
  3. Suggest rules to prevent recurrence
  4. Ask if you want to create them

Rule Creation Flow

  1. Event Detection: Determines which tool the rule applies to
  2. Pattern Generation: Creates regex pattern from your description
  3. Action Selection: Chooses warn or block based on severity
  4. Message Creation: Generates helpful message for Claude
  5. File Creation: Saves to .claude/hookify.{name}.local.md

Examples

Block Dangerous Commands

/hookify Block rm -rf and other destructive operations

Creates:

---
name: block-destructive-ops
enabled: true
event: bash
pattern: rm\s+-rf|dd\s+if=|mkfs
action: block
---

🛑 **Destructive operation detected!**
This command can cause data loss.

Warn About Debug Code

/hookify Warn when I add console.log to files

Creates:

---
name: warn-console-log
enabled: true
event: file
pattern: console\.log\(
action: warn
---

🐛 **Debug code detected!**
Remove console.log before committing.

Require Tests

/hookify Remind me to run tests before stopping

Creates:

---
name: require-tests
enabled: true
event: stop
action: warn
conditions:
  - field: transcript
    operator: not_contains
    pattern: npm test|pytest
---

⚠️ **Tests not detected!**
Run tests before completing.

Read the full file on GitHub · 131 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. 1mo ago First seen · 131 lines · 10 tokens per session scan C a12df616658c

Subscribe to this mod's changes

hookify is a command published in the GitHub repository athola/claude-night-market (343 stars, last pushed today), licensed MIT. It adds 10 tokens to every session and 627 once invoked, about $0.0000 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-09-03.