gutt-claude-code-plugin: Agent for Claude Code

.claude/agents/hook-expert.md

hook-expert is an agent for Claude Code from iBrain-BVBA/gutt-claude-code-plugin. It costs 36 tokens per session (3,121 once invoked), scanned A, original, MIT.

A hook that runs a Python program when the coding agent finishes a response.

In plain words
What is it for?
Use it to run the configured stop-validator.py script at the end of an agent response.
Why use it?
It provides a fixed point for checking or validating work after the agent stops.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_DATA} variable. Also seen: model in frontmatter; mentions subagents; names the NotebookEdit tool.

This is iBrain-BVBA/gutt-claude-code-plugin's own configuration. It tells Claude Code how to work on gutt-claude-code-plugin itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gutt-claude-code-plugin configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is echo '{"session_id":"debug-001","tool_name":"Task","tool_input":{"prompt":"test"}}' | node hooks/pre-task-memory.cjs.

Reuse

Borrowing it

Nothing to install: this file belongs to iBrain-BVBA/gutt-claude-code-plugin. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/iBrain-BVBA/gutt-claude-code-plugin/main/.claude/agents/hook-expert.md
Clone the repo
git clone --depth 1 https://github.com/iBrain-BVBA/gutt-claude-code-plugin

Made for: Claude Code.

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-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/ibrain-bvba/gutt-claude-code-plugin/hook-expert/github.svg)](https://agentmods.dev/agents/ibrain-bvba/gutt-claude-code-plugin/hook-expert)
Your own site
<a href="https://agentmods.dev/agents/ibrain-bvba/gutt-claude-code-plugin/hook-expert"><img src="https://agentmods.dev/badge/agents/ibrain-bvba/gutt-claude-code-plugin/hook-expert/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-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/ibrain-bvba/gutt-claude-code-plugin/hook-expert"><img src="https://agentmods.dev/badge/agents/ibrain-bvba/gutt-claude-code-plugin/hook-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,121 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00036 $0.03121
Opus 5.5 $0.00014 $0.01248
Sonnet 5.5 $0.00007 $0.00624
Haiku 4.5 $0.00004 $0.00312

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

Security

Grade A, and why

hook-expert scanned grade A 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

node -e "const fs=require('fs'),p=require('path'),t=p.join(require('os').tmpdir(),'h.json');fs.writeFileSync(t,JSON.stringify({session_id:'debug-001',tool_name:'Task',tool_input:{prompt:'test'}}));console.log(require('ch
.claude/agents/hook-expert.md · 291 lines

How it starts

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

Hook Expert Agent

Deep specialist in the gutt-pro hook system. Focuses on debugging hook failures, diagnosing state corruption, optimizing hook performance, resolving cross-platform issues, and understanding the full interaction between hooks, shared libraries, and IDE lifecycle events.

Trigger

Invoke this agent when:

  • A hook is silently failing or producing unexpected output
  • State files under ${CLAUDE_PLUGIN_DATA} appear corrupt or stale
  • Hooks work in Claude Code but fail in Cursor (or vice versa)
  • Hook execution is slow or causing IDE lag
  • Debugging complex interactions between multiple hooks
  • Investigating race conditions in parallel subagent hooks
  • User asks "why isn't this hook working?" or "debug hook X"

Do NOT invoke for: Basic hook creation or registration — use plugin-dev instead.

Hook Architecture

CommonJS Requirement

All hooks MUST be CommonJS (.cjs). The project uses ES modules ("type": "module" in package.json), but hooks require .cjs for synchronous IDE execution. Every hook must:

  1. Consume all stdin (even if unused) to avoid broken pipe errors
  2. Parse stdin as JSON
  3. Process the event
  4. Exit with code 0 (unless intentionally blocking)

Lifecycle Events

Event When Fired Stdin Fields Expected Output
SessionStart New session begins session_id, cwd Setup messages or empty
UserPromptSubmit User submits prompt session_id, user_prompt Modified prompt or empty
PreToolUse Before tool executes session_id, tool_name, tool_input JSON with decision or additionalContext
PostToolUse After tool executes session_id, tool_name, tool_input, tool_result followup_message or empty
SubagentStart Subagent spawned session_id, agent_type, agent_prompt Context injection or empty
SubagentStop Subagent completes session_id, agent_type, agent_result Capture or empty
Stop Task completes session_id, stop_hook_output Summary or empty
statusLine HUD refresh session_id Single-line string

Read the full file on GitHub · 291 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 · 291 lines · 36 tokens per session scan A 9482af4e4e84

Subscribe to this mod's changes

hook-expert is an agent published in the GitHub repository iBrain-BVBA/gutt-claude-code-plugin (5 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 3,121 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

debugger

Diagnoses and fixes failed modules using root-cause analysis, not guessing.

TT-Wang/forge · 17 tokens

debugger

Investigate errors systematically to find root cause before attempting fixes. Gathers evidence, analyzes patterns, and forms testable hypotheses.

bostonaholic/rpikit · 28 tokens

loom-advisor

Read-only advisory agent for debugging and repeated failures. Spawned instead of a blind retry when an implementer has failed twice on the same task, or a bug resists straightforward diagnosis. Returns a root-cause diagnosis plus one concrete next step.

cosmix/loom · 53 tokens

evolve-retrospective

Failure post-mortem agent for the Evolve Loop. Fires only on Auditor FAIL or WARN verdicts. Reads cycle artifacts and produces a structured retrospective + failure-lesson YAML files. READ-ONLY outside the lessons directory.

mickeyyaya/evolve-loop · 51 tokens

runtime-observer

Dynamic observation agent designed to inspect running applications, trace state transitions, log API traffic, and flag race conditions, cache states, or timing issues. Trigger with "start runtime observer", "observe live system", "trace API calls", or during characterization test validation.

richfrem/agent-plugins-skills · 56 tokens

type-reconstructor

Dedicated struct/class reconstruction from IDA Pro decompiled binaries. Scans every function for memory access patterns, merges evidence across the module, resolves vtable and COM interface layouts, and generates compilable C++ header files with per-field confidence annotations. Use for full-module or single-class…

marcosd4h/DeepExtractRuntime · 63 tokens