How to Cut Claude Code Token Costs in 2026
A. Frans
Published July 30, 2026
Table of Contents
Most people who complain about Claude Code burning tokens are looking at the wrong number. It isn't the code you asked it to write. It's everything the model had to re-read to write it.
Every turn in an agent session resends the accumulated context: your instructions, the files it opened, the output of every tool call, the failed attempt from twenty minutes ago. A single grep that returns 400 lines of matches sits in the context for the rest of the session, getting resent on every subsequent turn. That's the actual cost curve, and it's why a two-hour session can cost more than the ten sessions before it combined.
The skills below attack that from four different angles. None of them is a magic switch, and one of them is a joke that happens to work.
Where the tokens go
Before installing anything, it helps to know what you're fighting.
Tool output bloat. A find across a monorepo, an unfiltered log tail, a cat on a 2,000-line file. The model needed six lines of it. All 2,000 stay in context.
Session accumulation. Turn 40 resends everything from turns 1 through 39. Long sessions get quadratically expensive in a way that feels linear while you're in it.
Re-discovery across sessions. You close the terminal. Tomorrow the model rediscovers your project structure from scratch, opening the same eight files it opened yesterday.
Documentation guessing. The model doesn't know the current API for a library, so it either hallucinates a method or you paste in docs. Both cost you.
Subagent fan-out. Spawning five parallel agents multiplies the cost of whatever context each one loads. Worth it when they're doing independent work. Expensive when three of them read the same file.
Each skill category below targets one or two of these. Match the tool to your actual failure mode instead of installing all of them.
| Skill | Attacks | Stars | License | Last push |
|---|---|---|---|---|
| caveman | Output verbosity | 94.3K | MIT | 2026-07-26 |
| claude-mem | Cross-session re-discovery | 89.0K | Apache-2.0 | 2026-07-29 |
| get-shit-done | Unfocused exploration | 64.8K | MIT | 2026-05-31 |
| context7 | Documentation guessing | 60.0K | MIT | 2026-07-29 |
| Agent Skills for Context Engineering | Multi-agent context design | 17.5K | MIT | 2026-07-14 |
| context-hub | Context assembly | 13.9K | MIT | 2026-05-31 |
| pro-workflow | Session memory + worktrees | 2.7K | none declared | 2026-07-27 |
| context-engineering-kit | Prompt + output quality | 1.3K | GPL-3.0 | 2026-07-26 |
The joke that works
caveman cuts tokens by making the model talk like a caveman. Its own tagline is "why use many token when few token do trick," and the repo claims a 65% reduction.
I laughed and then I thought about it, and the mechanic is sound. A large share of model output is grammatical scaffolding: articles, auxiliary verbs, transitional phrases, hedging. Strip the register down and the information density per token goes up sharply. "I'll now check whether the configuration file exists in the expected location" becomes "check config exists." Same instruction, a third of the tokens.
claude skill add JuliusBrussee/caveman
MIT licensed, 94.3K stars, actively pushed. It's the most-starred thing on this list by a margin.
Two caveats. The 65% figure is the repo's own claim and I haven't seen an independent benchmark, so treat it as directional. And it compresses output, which is the smaller half of your bill in most agent sessions; input context usually dominates. It's a real win, applied to the less expensive side of the ledger.
Don't use it when you want the model to explain its reasoning to a colleague. Caveman explanations are terse to the point of being unreviewable.
Stop rediscovering your own codebase
claude-mem captures what Claude does during a session, compresses it with the Claude Agent SDK, and injects the relevant parts back into future sessions. 89K stars, Apache-2.0, pushed the day before this article went up.
The value shows up on day three, not day one. The first session pays full price for exploration. By the fourth, the model already knows your directory layout, your test command, which module owns auth, and the three architectural decisions you explained on Monday. That exploration cost stops recurring.
claude skill add thedotmack/claude-mem
The tradeoff is real and worth stating: you're now injecting compressed history into every session, which is itself context. If the memory layer gets stale or noisy, you're paying to resend bad information. Prune it. The failure mode is a memory store full of decisions you reversed two weeks ago that the model keeps confidently repeating.
pro-workflow (2.7K stars) does something adjacent: self-correcting memory that compounds across 50+ sessions, plus parallel worktrees, agent teams, and 17 bundled skills. The worktree support is the underrated part: it's how you run parallel agents without them fighting over the same files, which is the usual reason multi-agent runs get expensive.
One flag before you install it: GitHub reports no license file on the repo. The directory metadata lists MIT, but the repo itself doesn't declare one, which means "no license" legally. Fine for personal use, a problem if your employer has a policy. Check before you ship it into a work machine.
Stop guessing at documentation
context7 solves a specific and expensive failure. The model doesn't know the current API for a library, so it invents a method signature. You run it, it fails, you paste the error back, it tries again. Three round trips, all of them carrying the full session context, to arrive at something the docs would have told it immediately.
context7 serves up-to-date library documentation to the model on demand. 60K stars, MIT, pushed 2026-07-29.
claude mcp add context7 -- npx -y upstash/context7
This is an MCP server rather than a skill, and the distinction matters for how you install and scope it. We covered the setup in detail in the context7 install guide, and the broader distinction in MCP servers versus agent skills.
The saving is largest on fast-moving libraries where the model's training data is stale. On stable, well-known APIs it's mostly redundant. The model already knows fs.readFile.
Design the context instead of trimming it
The three remaining tools are less about cutting and more about structure.
context-hub, from Andrew Ng, is an agent skill for assembling context deliberately. 13.9K stars, MIT. The repo description is thin, so read the source before committing to it. The author's track record and the star count both suggest it's worth the twenty minutes.
Agent Skills for Context Engineering (17.5K stars, MIT) is a collection aimed at people building agent systems rather than using them. If you're designing multi-agent architectures, this is where you'd look for patterns on what each subagent should and shouldn't load. Its own description says to use it when building, optimizing, or debugging agent systems, which is an accurate scope statement.
claude skill add muratcankoylan/Agent-Skills-for-Context-Engineering
context-engineering-kit (1.3K stars) focuses on prompt engineering and output quality. Note the license: GPL-3.0, not MIT like most of this list. If you're embedding it in a commercial product, that matters. For local dev use it doesn't.
get-shit-done (64.8K stars, MIT) approaches the problem from planning rather than compression. Spec-driven development means the model works from a written spec instead of exploring until it figures out what you meant. Less exploration, fewer wrong turns, less context accumulated on dead ends. Last push was 2026-05-31, two months quiet, which for a repo this size is worth noticing but not alarming.
What to do without installing anything
Four habits that cost nothing and probably beat any single skill on this list.
Start a new session per task. The single biggest win on this list. A fresh context on a new problem is almost always cheaper than continuing a session that's carrying an hour of unrelated history.
Be specific about files. "Look at src/auth/session.ts lines 40-90" instead of "find where sessions are handled." You just saved a repo-wide search and its output.
Kill failed attempts early. If an approach isn't working after two tries, start over rather than iterating in a context now full of broken code the model keeps referring back to.
Filter your tool output. grep -c when you want a count. head -50 on log tails. Every line you don't need is a line you'll pay for on every remaining turn.
For the broader developer tooling picture, see our full list for developers.
What I'd install
If you're picking one: claude-mem. Cross-session re-discovery is the largest recurring waste for most people, and it's the one that compounds in your favor.
If you're picking two: add context7, assuming you work with libraries that changed in the last year.
caveman is worth installing because it's free, MIT, and takes ten seconds. Just don't expect it to halve your bill. It compresses the cheaper half.
Skip the context-engineering collections unless you're building agent systems rather than using one. They're good at what they do; that just isn't a token-cost problem for most people.
FAQ
Do these work outside Claude Code? The MCP servers (context7) work with any MCP-compatible client. The skills are built for Claude Code's skill format, though several list compatibility with other agents. Check compatible_agents on each repo rather than assuming.
Will installing all eight save more? No, and it'll probably cost more. Every installed skill adds its own description to the context the model loads. Three well-chosen skills beat eight overlapping ones.
Does a bigger context window make this irrelevant? The opposite. A larger window means you can carry more context, and pricing is per token regardless of the ceiling. Bigger windows make discipline more valuable, not less.
How do I measure whether any of this worked? Track cost per completed task, not cost per session. Compression that makes the model less accurate can raise your total cost while lowering per-turn spend, because you're doing more turns.
Is caveman a real project or a bit? Both. It's a genuine MIT-licensed skill with 94K stars and a working mechanic, presented as a joke. The joke is the marketing.
Share this article
⚙Related Tools
📄Related Articles
Get More AI Tool Guides
New comparisons and guides every week. Join thousands of professionals staying ahead of the AI curve.