lukeprofits

TokenSaver — AI skill for Claude Code

AI community

Cut your Claude Code token bill ~23% without changing how you work.

How to install TokenSaver

This entry records only its repository, not the path inside it, so there is no exact command to give. Open lukeprofits/TokenSaver and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What TokenSaver does

Cut your Claude Code token bill ~23% without changing how you work. A local proxy that trims what Claude Code resends. No AI model or API key needed.

Alternatives in AI

  • Rb Setup — First-time setup 1.3k ★
  • Investment News — 为 A股投资者打造的全球产业链资讯看板 · 12 大赛道一一对应 A股板块(半导体/AI/机器人/新能源车…),覆盖 100+ 权威源,用你自己的大模型每日提炼中文「今日要点」+ 翻译 · 全程本地、零 API key 447 ★
  • Uncensored AI API — Uncensored AI API and models — one key for Claude, GPT, Gemini, Grok, DeepSeek, GLM and Kimi, with uncensored 222 ★

README

TokenSaver

**A cheaper Claude Code bill, without changing how you work.** Install it once, keep typing `claude` like always, and it quietly trims what Claude Code resends on every message.

git clone https://github.com/lukeprofits/TokenSaver ~/.tokensaver/src && ~/.tokensaver/src/install.sh

The installer shows you everything it will change and asks once. After that, Claude Code in your terminal, VS Code or JetBrains goes through TokenSaver automatically. It runs on any computer, no AI model needed. You'll see a small ⚡ with the % saved in Claude Code's status line.

How it works, in 7 slides

![A local optimization layer: Claude Code, then TokenSaver, then Anthropic. Kept word for word: everything you typed, everything Claude said, the most recent ~30K tokens, any line Claude referred to later. Trimmed down: old copies of file contents and old command output, which stay on disk.](docs/slides/1-where.png)

**It sits between Claude Code and Anthropic.** Your words and Claude's are never touched; only old copies of files and command output get trimmed.

![One real request: a thin new part on top of ~390K tokens of cached context, sent again on every request.](docs/slides/2-resend.png)

**Every request resends the whole conversation.** That repeated part is most of your bill.

![Keeping a 555K cached context is billed like 28K tokens ($0.11), while swapping in a smaller 378K one is billed like 756K tokens ($3.02).](docs/slides/3-every.png)

**Anthropic's cache makes resending cheap, so sending less can cost more.** Replacing the cache is the expensive part.

![Cost over time: at each swap the TokenSaver line jumps up a little, then grows more slowly than the line without it, leaving a savings gap.](docs/slides/4-crossover.png)

**So TokenSaver swaps only when it pays off:** a small one-time cost, then every request after is cheaper.

![The same real session with and without TokenSaver: 7.36M tokens and $18.76 without, 5.13M tokens and $13.33 with.](docs