hook-health

hook-health is an agent for Claude Code from Kastalien-Research/thoughtbox. It costs 61 tokens per session (1,098 once invoked), scanned A, original, MIT.

A diagnostic agent for Claude Code hook infrastructure, which consists of scripts that run automatically during development workflows. It investigates hook failures, corrupted state data, and mismatched data formats, then prepares patch templates for a person to install.

In plain words
What is it for?
It is for examining hook logs, finding missing or suspicious entries, detecting repeated default values, and producing human-applied fixes.
Why use it?
Hooks can fail quietly and corrupt information used by later parts of the workflow. Because the hooks are write-protected, this agent separates diagnosis from the actual repair.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths.

Good fit It is for examining hook logs, finding missing or suspicious entries, detecting repeated default values, and producing human-applied fixes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kastalien-research/thoughtbox/hook-health
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/Kastalien-Research/thoughtbox

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/kastalien-research/thoughtbox/hook-health/github.svg)](https://agentmods.dev/agents/kastalien-research/thoughtbox/hook-health)
Your own site
<a href="https://agentmods.dev/agents/kastalien-research/thoughtbox/hook-health"><img src="https://agentmods.dev/badge/agents/kastalien-research/thoughtbox/hook-health/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-health

Your own site · 80×15
<a href="https://agentmods.dev/agents/kastalien-research/thoughtbox/hook-health"><img src="https://agentmods.dev/badge/agents/kastalien-research/thoughtbox/hook-health.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 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,098 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.00061 $0.01098
Opus 5.5 $0.00024 $0.00439
Sonnet 5.5 $0.00012 $0.00220
Haiku 4.5 $0.00006 $0.00110

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

Security

Grade A, and why

hook-health 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 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.

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.

.claude/agents/hook-health.md · 110 lines

How it starts

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

You are the Hook Health Agent (triage-fix-02). You are a Triage & Fix variant specialized for the hook infrastructure — the nervous system of the continual improvement loop.

Why This Agent Exists

Hooks are write-protected (.claude/hooks/ cannot be modified by agents). This changes the triage workflow fundamentally: you can diagnose but not directly repair. Your output is a diagnosis plus a template patch that the human installs.

Silent hook failures are the most dangerous class of bug in this system. A hook that runs but produces wrong data (like always returning a default value) corrupts downstream state files without any visible error. Your job is to catch these before they compound.

Ulysses Protocol (Time-Boxed Phases)

Phase 1: Log Audit (30% of turns)

Examine all hook execution logs for anomalies:

  • .claude/state/fitness-tracker.log — DGM pattern tracking
  • .claude/state/eval-collector.log — Session metrics
  • .claude/state/memory-calibration.log — Memory usefulness
  • Any other *.log files in .claude/state/

Look for:

  • Silent failures: Hooks that should be producing log entries but aren't
  • Default flooding: The same value appearing in every entry (suggests a fallback path is always taken)
  • Timestamp gaps: Expected periodic entries that stop appearing
  • Schema violations: Log entries that don't match the expected format

Phase 2: Data Validation (25% of turns)

Check that hook outputs match their consumers' expectations:

  • .dgm/fitness.json — Does it reflect actual pattern usage from logs?
  • .eval/metrics/session-*.json — Do metric values look plausible? Any always-zero fields?
  • .assumptions/registry.jsonl — Are verification timestamps being updated?

Cross-reference: if the fitness tracker log shows pattern references but fitness.json usage counts haven't changed, the write-back is broken.

Phase 3: Hook Source Analysis (25% of turns)

Read the hook scripts themselves to identify potential failure modes:

Read the full file on GitHub · 110 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 · 110 lines · 61 tokens per session scan A beb75130a220

Subscribe to this mod's changes

hook-health is an agent published in the GitHub repository Kastalien-Research/thoughtbox (66 stars, last pushed 3mo ago), licensed MIT. It adds 61 tokens to every session and 1,098 once invoked, about $0.0002 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-09-03.

Related

Other agents, from other repositories

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over runshellcommand/readfile for any semantic or exploratory question.

MinishLab/semble · 46 tokens

challenger

Use when: before the lead reports a root-cause conclusion, a 'done/verified' claim, an irreversible action about to run (commit/deploy/rm/push), or a 2nd-time fix — in APEX or plain conversation; also every eLicit round and Verify gate. Do NOT use for: code correctness/lint/types/API usage (sniper's job), or as a veto…

fusengine/agents · 92 tokens

sniper

Use when: after ANY code modification (mandatory post-edit validation). Do NOT use for: new features, quick fixes already identified (use sniper-faster), read-only analysis.

fusengine/agents · 38 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Grep/Glob/Read for any semantic or exploratory question.

MinishLab/semble · 47 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Bash/Read for any semantic or exploratory question.

MinishLab/semble · 44 tokens

changelog-watcher

Use when: checking for Claude Code updates (/watch command), detecting breaking changes in our plugins, monitoring community feedback (/watch --pulse). Do NOT use for: code fixes (use sniper), general web research (use research-expert).

fusengine/agents · 52 tokens