How many tokens are your Claude Code hooks actually costing you?
Paste your hooks config below and see an estimated token cost per hook, worst first, classified by how often each one fires.
Those are the exact measured example figures from Do Claude Code hooks actually cost you tokens? - this project's own guide, sourced from code.claude.com's hooks reference. This calculator applies the same five patterns to your own hooks config instead of a single worked example, and multiplies by how often each event actually fires in a session.
A clean setup is just the beginning.
UsageCut trims that for free. Want Claude Code to be genuinely better, not just leaner? ClockedCode is the curated, conflict-free setup - installed in one paste.
Upgrade your Claude Code- 10x your Claude Code with hand-picked tools
- Specialist agents on your team
- Stop spending hours researching plugins
Priced by cadence, not just by size
A hook's own stdin input - session_id, tool_input, cwd- never reaches Claude; it's process I/O between Claude Code and your script, detailed in the hooks token cost guide. What costs tokens is what the script writes back, through one of a small set of fields, and this calculator prices exactly that: parse the event and matcher for every hook in your config, classify each event's cadence (once a session, once a turn, or on every matched tool call), then multiply by whichever of the five sourced output patterns you tell it that hook actually uses.
No static tool can read a hook script's own logic - only running it can - so the assumption fields (turns, matched calls, and subagent spawns per session) and the per-hook output-pattern picker are what turn a generic worked example into a number shaped like your own setup. For the schema-size side of a session's standing overhead, see the MCP server token cost checker, or run the free scan below for what your real sessions load.
More free tools for Claude Code
Small, focused, no-signup tools from the maker of ClockedCode. Free to use, forever.
More free Claude Code tools are on the way - built one at a time by a solo dev who ships daily.
Claude Code tips, every Sunday
One short email a week: the token-saving tricks, setup tweaks, and tools worth your time. Free, unsubscribe anytime.
About this estimate
Where do I get my hooks config to paste in?
It's the "hooks" object in settings.json - either ~/.claude/settings.json for hooks that apply everywhere, or a project's .claude/settings.json for project-scoped ones. You can paste the whole file or just the hooks block; both parse the same way.
How does it know what a hook actually writes back?
It doesn't - no client-side tool can read what your hook script does at runtime. You tell it per hook, picking from the same five patterns this project's own hooks-token-cost guide measured: silent (0 tok), a short note (~38 tok), a one-time context block (~66 tok), filtered output (~28 tok), or raw output echoed back (~447 tok). Changing that selection is what makes the estimate yours instead of a generic guess.
Why do the assumption numbers (turns, calls, subagents per session) matter so much?
Cadence compounds faster than per-call size does. A 38-token PreToolUse deny reason at the default 30 matched calls already adds up to 1,140 tokens - over 17x a one-time SessionStart block at the same per-write cost. Set the three assumption fields to match your own real session shape for a number that's actually yours.
Does a hook's own stdin input cost anything?
No. Claude Code hands your script the same tool_input Claude just generated to make the call - it's process I/O between Claude Code and the script, never re-sent to the model. Only what the script's own output writes into a handful of specific fields ever reaches Claude, which is exactly what this calculator prices.
Questions, answered
Is UsageCut really free?
Yes. The scan and every fix are free - no card, no subscription, no signup. You only give an email if you want the optimization plan and one-command undo sent to your inbox.
Is my code safe? Does UsageCut upload anything?
The scan runs entirely on your machine. It never uploads your code, never reads your API key, and never sends your prompts or conversations anywhere. Only anonymous summary counts leave, and only if you choose to share them.
How does it reduce Claude Code token usage?
It reads your local setup and session history to find waste - idle MCP servers loaded into every session, an oversized CLAUDE.md re-sent on every request, duplicate file reads, and bloated tool output - then trims it losslessly, so each session carries less context and you hit your limit far less often.
What is ClockedCode?
ClockedCode is the curated, conflict-free Claude Code setup from the same maker. UsageCut makes your current setup leaner; ClockedCode makes it genuinely better - a set of hand-picked tools, specialist agents, and a tuned CLAUDE.md, installed in one paste.
Who is ClockedCode for?
Developers who use Claude Code daily and want a setup that is powerful out of the box instead of spending hours researching and wiring up plugins, agents, and MCP servers themselves.
What's included in ClockedCode?
A vetted, conflict-free bundle of hand-picked tools, specialist agents, and a tuned CLAUDE.md - everything installed together in one paste, with no setup archaeology.
Is ClockedCode a one-time payment?
Yes. ClockedCode is a one-time purchase with an instant download - no subscription and no recurring fees.
Does ClockedCode work with my existing setup?
Yes. It installs alongside what you already have and is fully reversible. Run UsageCut first to clean your current setup, then add ClockedCode to level it up.