Token Beggar is a plugin for Claude Code. Before the big model does a job, it checks whether a cheaper model can do it just as well. Small tasks stay in the chat. A large task, such as fixing a bug in a repository you have not read yet, goes to one cheaper worker, and the chat then checks the whole diff and runs the tests. Design, root causes and the final answer stay with the model you picked.
On 18 real bug fixes it cost 1.42x less quota and money than working alone, with the same share of hidden tests passing (69% against 70%).
It runs on your machine, in your Claude Code session. It uses the Claude Code you are already signed in to, sends nothing about you anywhere, and writes only to its own folder. Exactly what it does.
[!TIP]
Not sure it is working? Run token-beggar doctor. It lists what can quietly stop routing and exits 1 when something is broken.
Install
Needs Claude Code and Python 3.10 or newer. It uses the standard library only.
# From the marketplace in this repository (inside Claude Code)
/plugin marketplace add Arthur031221/Token-Beggar
/plugin install token-beggar@token-beggar
# Try it for one session without installing
git clone https://github.com/Arthur031221/Token-Beggar
claude --plugin-dir ./Token-Beggar
# From a shell, the same two steps as the first block
claude plugin marketplace add Arthur031221/Token-Beggar
claude plugin install token-beggar@token-beggar
Restart the agent or run /reload-plugins. More in docs/install.md, including how to use the skill in another agent that reads skills.
Quick start
Work as you always do. On the first real prompt of a session a hook adds a short routing card, and the chat model sizes the task. At the end of a reply where something was routed and a saving was measured, you get one line:
Token Beggar: about 1.4x less quota than Opus 5.5 high alone, saved about $0.21 (est.) | large task | routed 1: haiku medium x1
The multiple is the measured ratio of list price cost without Token Beggar over with it, for your model and effort. The dollars are the reply's own cost times that ratio minus one. Both are estimates and say so. The line never counts tokens, and under 1.15x it states no multiple, because that is inside the run to run spread.
To switch it on for a prompt that did not trigger it, say /token-beggar. Then confirm the hooks run:
token-beggar doctor
Results
Two setups, and only two. Without Token Beggar is the chat model working alone, the way you use it normally. With Token Beggar is the card shipped in this release, version 0.3.0. Opus 5.5 at high effort is the chat model. Cost is list price for the chat and every worker, cache included. Intervals are 95 percent.
Hard tasks are 18 merged pull requests from 12 open source Python projects (Django, Sphinx, pylint, sympy, click and others). The chat starts from the commit before the fix with the issue text, and is scored by the tests the maintainers added, which it never sees. 3 runs per task, 54 per setup.