usage-rings
English | 简体中文


Early version: the layout and what the band shows are still evolving.
A Claude Code mod that keeps a usage band above the prompt, drawn as ring gauges with the percentage inside:
- ctx: how full the context is against the point where auto-compact starts, so 100% is the moment it compacts, and how many tokens are left before then (the session rail and
/context measure against the larger auto-compact window, which compaction never fills, so they read lower); /rings ctx model measures against the model's whole window instead, with the token count
- 5h and 7d: plan rate-limit windows, each with the time left until it resets
- any per-model weekly window the API reports, under the model's name
- pace tick: a mark across each window's ring where its time has got to, so an arc past the mark means usage runs ahead of time
- forecast (off by default,
/rings show forecast): when the window's average rate so far would use it up before it resets, the tile says full ~1h57m and the ring turns amber
- spend: this session's whole cost, marked
session, then today's and this month's totals, either across every session (all:) or for this session alone (session:); optionally per turn and per hour
- speed: output tokens per second, live while a response streams (
~58 tok/s) and exact once it ends, plus optionally cache hits and time to first token
Ring colors follow the level: ok under 60%, warn under 85%, danger above. In the terminal the rings become ○ ◔ ◑ ◕ ● glyphs, and the pace tick an arrow (▲ ahead of pace, ▽ behind).
In the desktop app, point at a ring's colored arc and the arc lifts and glows. Against the pace tick, a bright line runs along the stretch used ahead of time, or a faint trace shows the room left before the tick, and the figure inside switches to what is left (40% left). The grey track and a grey ring (a saved reading) don't react. VS Code draws the rings as plain images, so hovering does nothing there.
Layouts
| Layout | What it looks like |
|---|
tiles (default) | Each ring with a two-line label: the name, then the forecast when there is one, else the reset time. Spend and speed are a tile each: the first figure on top, the rest below. Sized to sit in one row beside the desktop prompt box. |
minimal | Rings and the leading spend and speed figures only. |
Settings
Run /rings settings to open a pane where you pick the layout, theme, language, totals scope and what ctx measures against, switch each part on or off (grouped as rings, ring details, spend and speed), choose where new sessions show the band, and set colors; its foot names the installed version (dev for a working copy). The same can be done from the prompt. /rings help prints every command with what it does. In the terminal, typing /rings also lists each subcommand in the typeahead, then the values the one you pick takes; the desktop app's prompt box does not offer a mod's suggestions.
| Command | Does |
|---|
/rings | Hide or show the band in this session |
/rings help | List every command with what it does |
/rings mode tiles / /rings mode minimal | Switch the layout |
/rings lang en / /rings lang zh | English (default) or Chinese |
/rings scope all / /rings scope session | Whether today and month total every session (default) or this session alone |
/rings ctx compact / /rings ctx model | Whether ctx measures to auto-compact (default) or against the model's whole window |
/rings show <parts> / /rings hide <parts> | Switch parts on or off, several at once, or all |
/rings theme <name> | default, ocean, grape or mono |
/rings color <slot> <#hex> | Override one color; reset in place of the color follows the theme again |
/rings default desktop on / /rings default terminal off | Whether new sessions on that surface start with the band shown; /rings default alone shows the current choice |
/rings reset | Back to the defaults, keeping the language |
Parts: ctx, 5h, 7d, models (per-model and spend limits), resets, pace, forecast, session, day, month, turn, rate ($/h), cache, speed, ttft. All are on by default except forecast, turn, rate, cache and ttft.
Color slots: ok, warn, danger (ring levels), pace (the pace tick), track (the ring background), accent (session spend).