rtk-gain: RTK's token savings, live in Claude Code
A Claude Code mod that shows what RTK saves while Claude works: one bar for the commands (planned, used, saved), one for the context window broken down by category, and a viking who breaks the saved tokens with a different animation each time.
Français

Tested with Claude Code 2.1.290 in the terminal. Mods need Claude Code 2.1.287 or later in the terminal, 2.1.286 in the Desktop app.
Quick start
With rtk and its hook installed (rtk init -g), in Claude Code:
/plugin marketplace add rtk-ai/rtk-gain-mod
/plugin install rtk-gain@rtk
/rtk-gain
The last command opens the pane with the viking; it does not open on its own. Details and other ways to install in Install.
What you see
Three places in Claude Code:
- The pane, opened with
/rtk-gain: the viking, both bars with their legends, and the last commands with each one's own saving. /rtk-gain again, or Esc, closes it.
- The band above the prompt: one line, always visible once a command has gone through rtk.
- The spinner: the running saving at the end of the line while Claude works, and a line under each answer with the turn's saving.
Reading the bars:
- Commands: the whole bar is what was planned (what the commands would have returned without RTK). Blue is what was used, green is what was saved.
- Context: what fills the context window, by category (the four largest, the rest folded into "other"), as Claude Code counts it for
/context. The hatched part extends the bar by what RTK kept out: "without RTK", the context would be the sum of the two.

In that turn, RTK kept 26.2k tokens out of the context: 79.7k instead of 106k.
The viking
At the top of the pane, a pixel-art viking breaks the tokens: two pixels per terminal cell (the ▀ character, its color for the top pixel, its background for the bottom one).
While a command runs he waits, weapon raised, in front of a grey block. When it returns, he strikes the command's block at the cut between what was kept (blue) and what RTK saved (green), and the saved part is destroyed. The command's name and its saving show above.
There are fifty animations, ten attacks times five ways the saved part goes:
| Attacks | Effects |
|---|
| axe, hammer, sword, spear, torch, twin axes, thrown axe, bow, lightning, raven | shards, explosion, melt, dust, swept |
One is drawn at random for each command, never the same attack or effect twice in a row. A big saving leans toward the loud effects (shards, explosion, swept), a small one toward the quiet ones (melt, dust); all fifty stay possible.
The viking shows in the terminal only: text in the Desktop app need not be monospaced, and the drawing would come apart there.
Screenshots
All taken in a real Claude Code 2.1.290 session, on a clone of the rtk repository, with the RTK hook installed. Claude ran git log -30, git diff HEAD~10, git show HEAD~3, git log --stat -8 and git status.
| |
|---|
 |  |
1. /rtk-gain when it opens: the viking at rest, the starting context, no command yet. | 2. Claude runs git diff: the viking readies his attack, the command shows as running. |
 |  |
3. git diff returns: the strike lands on the cut and the bars move toward their new values. | 4. After the commands: git diff 31.8k → 6.7k (−79%), git log 2.9k → 1.8k (−38%). |
Install
You need Claude Code 2.1.287 or later, rtk in your PATH, and the RTK hook installed (rtk init -g): without the hook no command goes through RTK, and the pane says so.
-
Install the mod from the marketplace in this repository:
/plugin marketplace add rtk-ai/rtk-gain-mod
/plugin install rtk-gain@rtk
Or, for one session only, without installing:
git clone https://github.com/rtk-ai/rtk-gain-mod.git
claude --plugin-dir ./rtk-gain-mod
/plugin shows 1 mod active · rtk-gain when the mod is loaded. Right away you get the band above the prompt and the saving in the spinner.
-
Open the pane, with the viking and both bars:
/rtk-gain
It does not open on its own: without this step you only see the band. /rtk-gain again, or Esc, closes it.
-
Ask Claude for a few commands (git log, git diff, cargo test) and watch the viking strike each one.