Shunt: stop Claude Code spending your limit on big files
The short version
Claude Code reads a whole file into its context to answer one question, and every token of that read is billed on your priciest model. Shunt is a Claude Code plugin whose hooks block any whole-file read over 350 lines (and cat / head / tail-style reads in Bash) and tell Claude to delegate it. A cheaper model reads the file and sends back just the answer, with file and line citations.
| What | The number |
|---|---|
| Fewer tokens on bulk file reads | ~90% (Spotify's mean over four scenarios in a Java monorepo) |
| Read size that gets blocked | over 350 lines (configurable) |
| Extra time per handoff | 10 to 30 seconds (Spotify's setup) |
| Price | Free (Apache-2.0) |
Source: Spotify engineering blog, "Portal by Spotify cut my Claude Code token usage by 90%" (Dimitri Mazmanov, 3 Sep 2026). The 90% is the bulk-read part of the work, not Spotify's whole bill.
Your links
| What | Link |
|---|---|
| shuntkit, the free port (the one in the reel) | github.com/melonkernel/shuntkit |
| Spotify's original plugin (needs Spotify Portal) | github.com/spotify/portal-ai-plugins |
Two versions
| Spotify's shunt | shuntkit | |
|---|---|---|
| Needs | A Spotify Portal instance with AiKA modes | Claude Code, logged in; Python 3.10+ for the pip route |
| Worker model | Gemini 2.5 Flash via Portal | Claude Haiku 4.5 by default (SHUNTKIT_MODEL changes it) |
| Licence | Apache-2.0 | Apache-2.0, community port, v0.1.0 |
The three steps
- Copy the GitHub link:
https://github.com/melonkernel/shuntkit - Open Claude Code, paste it in, and type
install this plugin. Or run the installs yourself (below). - Ask about a big file:
what does this module do?Claude's whole-file read is blocked, the cheaper model reads it, and you get the answer.
Copy these prompts
Install as a Claude Code plugin:
/plugin marketplace add melonkernel/shuntkit
/plugin install shuntkit@shuntkit
Or with uv, inside your project:
uv tool install shuntkit
shuntkit install
shuntkit doctor --probe
Then ask about a file you never want read whole:
What does src/billing.py do? Give me the main functions and where retries happen, with line numbers.
The complete checklist
Shunt handles the big reads. These eight habits handle the rest of the limit:
- Run
/contextfirst. It shows what is filling the context window right now: system prompt, tools, MCP servers, memory files, messages. Fix the biggest line first. /clearbetween tasks. A new task does not need the last task's history. Every message you send re-sends it./compactbefore the chat gets long. It replaces the history with a summary. Do it at a natural break, not when you are forced to.- Keep CLAUDE.md short. It is loaded into every session. Rules Claude needs every time stay; long background moves into a doc it reads only when asked.
- Use Sonnet for routine edits.
/model sonnetfor renames, copy changes and small fixes. Switch back for hard problems. - @-mention the exact file.
@src/billing.pyhands Claude that file, so it does not search the repo to find it. - Never read
node_modules. Add a deny rule so Claude can't wander into dependencies:
{
"permissions": {
"deny": ["Read(./node_modules/**)"]
}
}
That goes in .claude/settings.json in your project. Add dist/, build/ and lockfiles the same way if they are big.
- Keep the thinking and the editing on the main model. Shunt only hands off reading. Edits, debugging and decisions stay with Claude, on the real file.
The smart part
It is a hook, not a skill. A skill is a suggestion Claude can ignore; a hook runs before the tool call and refuses it. The block message tells Claude the exact command to run instead, so it can't drift back to reading the whole file.
Read it honestly
- It only reads. Spotify's PM found the worker missed a thread-safety bug, so editing and debugging stay with Claude, and for debugging Claude still needs the real file.
- Each handoff adds 10 to 30 seconds in Spotify's setup.
- shuntkit is a small 0.1.0 community port, not Spotify's code. Read its hooks before you install it. It refuses to send files that look like secrets (
.env*, keys,.ssh/). - The 90% is Spotify's number on their scenarios. shuntkit's own summary line shows what it kept out of context on your files.
If you are building with Claude Code
- Big generated files, lockfiles, migrations and vendored code are where the savings are. Small files under the threshold are read as normal.
- Raise or lower the threshold to fit your repo (
SHUNT_MIN_LINESin Spotify's version; see the shuntkit README for its setting).
Run this on your codebase
Pick your biggest file and ask the same question twice, once with the plugin off and once on:
Explain what the largest file in this repo does, in five bullets with line numbers.
Compare the context use after each answer (/context). If the answers match and the second one cost a fraction, keep it on.