hook-creator

hook-creator is an agent for Claude Code from kochetkov-ma/claude-brewcode. It costs 26 tokens per session (1,865 once invoked), scanned A, original, MIT.

Tools for creating and debugging Claude Code hooks. Hooks are automatic actions that run before or after specified coding-agent operations.

In plain words
What is it for?
Use them to create a hook, including a PreToolUse hook that runs before a tool is used, or diagnose a hook that is not working.
Why use it?
They help when you need automatic checks or behaviour around the assistant's actions but are unsure how to configure or fix them.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter; reads .claude/ paths; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the brewcode plugin — 4 skills, 7 agents shipped together

Good fit Use them to create a hook, including a PreToolUse hook that runs before a tool is used, or diagnose a hook that is not working.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add kochetkov-ma/claude-brewcode
Claude Code
/plugin install brewcode

Made for: Claude Code.

Or install brewcode, the plugin that ships this one along with the rest of its 4 skills, 7 agents.

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 hook-creator

README.md
[![agentmods](https://agentmods.dev/badge/agents/kochetkov-ma/claude-brewcode/hook-creator/github.svg)](https://agentmods.dev/agents/kochetkov-ma/claude-brewcode/hook-creator)
Your own site
<a href="https://agentmods.dev/agents/kochetkov-ma/claude-brewcode/hook-creator"><img src="https://agentmods.dev/badge/agents/kochetkov-ma/claude-brewcode/hook-creator/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 hook-creator

Your own site · 80×15
<a href="https://agentmods.dev/agents/kochetkov-ma/claude-brewcode/hook-creator"><img src="https://agentmods.dev/badge/agents/kochetkov-ma/claude-brewcode/hook-creator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 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,865 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00026 $0.01865
Opus 5.5 $0.00010 $0.00746
Sonnet 5.5 $0.00005 $0.00373
Haiku 4.5 $0.00003 $0.00186

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

Security

Grade A, and why

hook-creator scanned grade A with 0 findings 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 today.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

brewcode/agents/hook-creator.md · 118 lines

How it starts

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

[DICT: AC=additionalContext, CC=Claude Code, MD=MessageDisplay, PCD=PostCompact, POT=PostToolUse, PR=PermissionRequest, PTU=PreToolUse, SA=subagent, SS=SessionStart, UI=updatedInput]

Hook Creator

Create/debug CC bash/JS/mjs hooks: event-specific routing, schemas, failure policy.

Ref ver: 2.1.296 | 33 hook events | 5 hook types (command, http, mcp_tool, prompt, agent).

Return contract

Give the verdict first, in <=30 lines with path:line references. Never paste hook bodies, stdin/stdout payload dumps, debug-log excerpts or a preamble; this holds whether or not a return guard is installed. Add one block per hook:

=== HOOK CREATED ===
File: /path/to/hook.sh or hook.mjs
Event: PreToolUse | Matcher: Bash
Purpose: Brief description
Routing: additionalContext -> Claude sees as <system-reminder>
Config: .claude/settings.json (or specify location)
Test fire: exit code, malformed-input policy, event-specific decision verified

Add your assumptions about the brief and any path you could not test-fire. Debug logs, payloads and failing runs go to .claude/reports/YYYYMMDD-HHMMSS_hook-creator/ beside the checkpoint, and you return its path. An installed agent-return guard blocks a return over ~2500 est-tokens (chars/4) for compression; over ~6000, file the detail and return path + verdict + <=3 lines.

Scope and never

Size the task before starting: one deliverable, ~5 files, ~10 steps. Exceeds that, or spans several independent deliverables -- stop before starting; return a split proposal (2-N bounded subtasks, scope

  • suggested owner each). Mid-flight the same: stop at the next clean boundary, report done/remaining/how to split. An hour of unsupervised work is a failure even when it succeeds. Brief missing GOAL, SCOPE, CONTEXT, CONSUMER, or acceptance -- state the assumption in the report and return the question to the caller; never invent scope. Deliver for the CONSUMER, not the literal wording.

maxTurns: 80 is an anti-loop stop, not a budget: on hit CC returns resumable partial output; unwritten work remains lost. After each hook is written and test-fired, append its path, event, exit-code result to .claude/reports/YYYYMMDD-HHMMSS_hook-creator/report.md -- never hold to the end. On resume, read that file first and continue from the last hook listed.

Read the full file on GitHub · 118 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. today Changed · +2 lines faa5d766d936
  2. yesterday Changed 2de8e26eed86
  3. 2d ago Changed 28dba96b8154
  4. 3d ago Changed d3eeacefbaca
  5. 4d ago Changed · +2 lines 8bea6b445193
  6. 11d ago Changed 94c318fb41f0
  7. 16d ago Changed · +6 lines 108d016eee52
  8. 1mo ago Changed · -691 lines scan B → A 8c9cc6cfaa5b
  9. 1mo ago First seen · 799 lines · 26 tokens per session scan B 5e8422370063

Subscribe to this mod's changes

hook-creator is an agent published in the GitHub repository kochetkov-ma/claude-brewcode (33 stars, last pushed today), licensed MIT. It adds 26 tokens to every session and 1,865 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

scout

Cheap read-only explorer on Haiku. Use proactively when a question needs several files read, a wide code search, or web docs fetched — anything that would pull more than 10K tokens into the main conversation. Returns a short answer with file:line references. Not worth it for one known file or a single grep.

egorfedorov/claude-context-optimizer · 68 tokens

brain-merge

Semantically merge brain knowledge from multiple Claude Code machines. Use when brain-sync or brain-join detects unstructured content (memory, CLAUDE.md) that needs intelligent merging. This agent gets smarter over time by remembering merge patterns and user preferences.

toroleapinc/claude-brain · 54 tokens

job-search

Use this agent for finding job opportunities, searching job boards, tracking applications, and researching companies. Invoke when the user needs job listings, salary data, company research, or application management. Handles LinkedIn, Indeed, TrueUp, Glassdoor, and Levels.fyi data through MCP tools. Context: User…

Aznatkoiny/zAI-Skills · 220 tokens

idea-validator

Isolated Claude Opus that critiques ideas, designs, patterns, hypotheses, or plans without context from the parent conversation. Use proactively when a non-trivial design decision needs adversarial review from a fresh perspective. Pair with Gemini second-opinion (parallel call) for two independent opinions from…

awrshift/claude-friends · 94 tokens

skill-analyzer

Deep analysis agent for skill quality review. Reviews skill content, instruction clarity, trigger phrase effectiveness, and provides actionable improvement suggestions.

VersoXBT/skill-manager · 29 tokens

sync-spec-kit-agent

Analyzes implementation changes on a feature branch and updates the spec-kit specification folder (.specify/specs/ /) to reflect the current state — new requirements, architecture changes, completed tasks, research findings, and any drift from the original specification. Context: User finished implementing something…

lukaskellerstein/claude-my-marketplace · 229 tokens