Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By BoxPistolsv0.2.1MITIn 1 marketplace
Profile Claude Code hooks from transcripts that already exist. Ranks hooks by the time they held up the main session, separates subagent runs, finds hangs, timeouts and blocked tool calls.
Claude loads one when your task matches it, or you run it by name.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Profile Claude Code hooks from transcripts that already exist.
No wrapper to install in front of your hooks, no synthetic re-runs. Claude Code already
writes durationMs for every hook run it reports, and timedOut / timeoutMs when one
hits its limit. This reads that.
Window: 63 sessions + 168 subagent transcripts, 2026-09-10 11:31 - 2026-09-18 07:20 (7.8 days)
Blocking hooks held up the main session for at least 27.7 minutes over this window
(10 of 15 observed event/hook pairs block). A floor, not a total: a hook
that succeeds with empty output is never persisted, and 15 configured hooks
were not observed at all.
A further 45.8 minutes of hook time ran inside subagents. Those run in parallel
with each other and with the main loop, so it is not time you waited.
BLOCKING (main = time the main session spent waiting, summed over its runs)
* fires on every tool call or prompt, so it blocks the loop each time. p95 needs 20 runs
main runs median p95 max event
12.7m 4644 296ms 1164ms 9045ms PreToolUse
* [status line updater]
+ 2388 of those runs were inside subagents (22.7m, in parallel)
12.3m 4542 302ms 1190ms 5277ms PostToolUse
* [status line updater]
+ 2335 of those runs were inside subagents (22.8m, in parallel)
... 8 further rows
TIMED OUT (ran until the limit fired; durationMs is a floor, and can overshoot it)
3x [UserPromptSubmit] limit=30000ms (not set; event default) [session bootstrap]
1x [PreToolUse] limit=10000ms [pre-write check]
STOPPED A TOOL CALL (hook exited 2)
Expected from a gate that is doing its job. From a reporting hook it is a bug, and
it costs a retry every time.
116x [PostToolUse] [prose linter]
32x [PostToolUse] [prose linter, from a working copy]
10x [PostToolUse] [prose linter, from the installed plugin]
An excerpt of a real report. Hook names are replaced with brackets, and the two ranked
rows are shown as they read before those hooks were marked async; every number is
measured. A real run prints the command, and --redact prints the script's file name
with its plain-word arguments.
Two hooks that each look fine at 300ms were costing 25 of those 27.7 minutes. Both only
updated a status display, so neither needed to block. Marking them "async": true
removed the wait without losing a single status update.
Then read the second number. Another 45 minutes of the same two hooks ran inside subagents, where each one holds up that subagent and nothing else. Subagents run concurrently with each other and with the main loop, so adding that time in would describe waiting that never happened. The report keeps the two apart, per hook.
The 158 stopped tool calls were one prose linter, registered three times, refusing writes. That is the hook working as intended. Those records carry no duration at all, so a hook can be costing a retry on every write while showing zero time in every other section.
/plugin marketplace add BoxPistols/claude-hook-audit
/plugin install hook-audit@claude-hook-audit
Then ask Claude to audit your hooks. To run the scanner without the plugin:
git clone https://github.com/BoxPistols/claude-hook-audit
python3 claude-hook-audit/skills/hook-audit/scan.py --project "$PWD"
Python 3.9+, no dependencies. Reads local files only, makes no network calls, and changes nothing on its own.
| Section | What it answers |
|---|---|
| Ranked by main-session total | Summed durations, main session only. Catches the cheap hook that fires thousands of times |
| Blocking vs async | Which of these are actually costing you wall clock |
| Subagent runs, per hook | How much of that time was inside a subagent, where it overlaps instead of accumulating |
| No known timeout | Which blocking hooks can stall for the event default, often minutes |
| Timed out | Which hooks ran until their limit fired. durationMs there is a floor, and can overshoot the limit |
| Stopped a tool call | Which hooks exited 2. Expected from a gate, a bug plus a retry from a reporter |
| Unrecognized outcomes | Record types this scanner does not know about, rather than silence |
| Configured but not observed | Quiet hooks. A hook that succeeds with empty output is never persisted, so a zero here is the absence of logging, not evidence |
The usual advice is a per-call ceiling: warn above 2 seconds. That misses the shape of
cost that actually hurts. A 296ms hook on PreToolUse fires on every tool call. At
4,600 calls a week that is 12 minutes of blocked loop per event it is attached to, and
every single run looks healthy. Ranking by total surfaces it immediately.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub boxpistols/claude-hook-audit --plugin hook-auditPlugins from other owners that cover similar ground