ClaudeCodeMod

All shelves / Mods / Usage

rtk-gain

By rtk-ai

rtk-gain is a Claude Code usage mod by rtk-ai.

Draws what RTK saves while Claude works: a band above the prompt, the saving in the spinner, and a /rtk-gain pane where a viking breaks the saved tokens.

Draws

Install

The marketplace name is rtk.

In Claude Code
/plugin marketplace add rtk-ai/rtk-gain-mod
/plugin install rtk-gain@rtk
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.5.0
License
Apache-2.0
Repo stars
6
Last change
2026-10-09

What it can reach

  • Draws in the session
  • Reads usage or context figures
  • Sees tool calls
  • Calls another program on this machine

Claude Code 2.1.287 or later in the terminal, 2.1.286 in the desktop app, rtk on your PATH, and the RTK hook installed with rtk init -g; without the hook no command goes through RTK, and the pane says so. The band and the spinner saving start at once. Type /rtk-gain to open the pane, which does not open on its own; /rtk-gain again, or Esc, closes it. The viking shows in the terminal only. For one session without installing: git clone https://github.com/rtk-ai/rtk-gain-mod.git, then claude --plugin-dir ./rtk-gain-mod. Two sessions on one project mix their numbers, and RTK counts bytes / 4 with no tokenizer, so absolute values are approximate, as the pane says. Nothing draws in the VS Code extension's panel or in a cloud session.

The marketplace name is rtk, and it lists this one plugin, from the repository. rtk-ai also makes vox. The tokens RTK keeps out of the context are why this page files it under usage. output-diet trims long shell, search, and subagent results itself and counts the savings on the status line. context-bar draws the context window as one stacked bar, a color per category. This one trims nothing itself: RTK's hook rewrites the commands, and after each one the mod reads rtk gain again for that command's saving and the session's, beside a context bar that adds what RTK kept out. With RTK's LLM proxy running, the pane adds what the proxy removed from requests, read from its database with sqlite3.

Demo

The author's recording of the rtk · session pane: a pixel viking strikes as git log, git diff, and git show run through RTK, and the COMMANDS bar under it goes from 0% to −38% to −76% saved. The commands and figures are the author's sample.
From the author's repo.

What it hooks into

  • session.startWhen a session starts
  • tool.callAround a tool call, where it can hold oneBash
  • turn.startWhen Claude starts a turn
  • turn.completeWhen a turn ends
  • command.runWhen you run its slash command/rtk-gain
  • ui.closeWhen its pane closes
  • ui.renderDraws into the sessionPaneAbovePromptSpinner

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Slash commands 1

  • /rtk-gain

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
rtk-ai
Category
Usage
Marketplace
rtk
Repo
rtk-ai/rtk-gain-mod
Version
0.5.0
License
Apache-2.0
Repo stars
6
Last change
2026-10-09
Language
JavaScript
Files
23

Other mods in Usage

tokendoctorrsaryevShows where your Claude Code tokens went, audits your settings with 33 checks, and changes a setting only after a dialog shows the change and you press Apply.catnapLippIncHas Claude compact at a clean break: from 50% of the context it asks Claude to finish the piece it is on, write a handoff, and compact, then carry on by itself.pitwallaxlaserDraws live cost, cache, and limits above the prompt and in a side panel, with a card per subagent you can stop, and fourteen themes that repaint Claude Code.jev-routerdominicricoAsks TypeSafe's Jev which Claude model and effort fit each prompt, step, and subagent, runs it there, and draws every pick in a band above the prompt.usage-statsomeerdvrnOpens a /usage-stats pane of this machine's Claude Code tokens over 7 days, 30 days, or all time, by day, project, and model, with Linear issues closed.claujev-modCivalskiHolds a commandDraws a status line of the checks and actions TypeSafe's Jev made today for the ClauJev plugin, with the effort Jev suggests, and can apply that effort.jev-orchestratorhiyokuSends each subagent's task to TypeSafe's Jev, which picks its model, effort, and tool profile, and draws the picks, tokens, and cost on the status line.vitalsnaicudDraws a framed live dashboard above the prompt: model, effort, context, plan limits with a forecast, cost, tokens and cache, subagents, shells, and tools.dispatch-gatewdsewdser-bitHolds a commandRefuses one tool call once the main session has made 8 requests in a row itself, and a subagent past 3 an hour, so Claude hands work out. A retry goes through.usage-baromeerdvrnDraws your 5-hour and 7-day plan limits under the prompt, used or left, with the git branch and file counts, the model, context, and the session's cost.limitsRyan-LTDraws a band above the prompt with the 5-hour and weekly limits, a pace warning, and context fill, and toasts at 75%, 90%, and 100%.context-guardmelodic-softwareShows a toast when the session's context crosses into a worse zone, smart, acceptable, or dumb, and can draw the zone and percent in a row above the prompt.
All 183 in Usage