ClaudeCodeMod

All shelves / Mods / Usage

token-speed

By liuyejinghong

token-speed is a Claude Code usage mod by liuyejinghong.

Draws a line above the prompt for the main agent and each running subagent: model, effort, context fill, and the last and 24-hour output speed from Magpie.

Draws

Install

The marketplace name is claude-workflow-mods.

In Claude Code
/plugin marketplace add liuyejinghong/Claude-workflow
/plugin install token-speed@claude-workflow-mods
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.6.0
License
MIT
Repo stars
3
Last change
2026-10-28

What it can reach

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

Claude Code 2.1.296, and the Magpie gateway on this machine with curl; the author ties the speed figures to Magpie v0.1.1792. ANTHROPIC_BASE_URL must be localhost, 127.0.0.1, or [::1] with no user name or password, and a remote address is not used. Without a reading the speed shows as unknown. /tok-speed lists each agent's speeds and where they came from, and /tok-speed reset clears them. A tagged checkout loads with claude --plugin-dir. The README is in Chinese.

The marketplace, claude-workflow-mods, holds only this plugin. The context fill and output speed are why this page files it under usage. agentpane, by xuanji86, draws a side pane of every subagent with its current tool, tokens, model, and effort. sidebar, by FayequeP, docks a stats sidebar with output speed among its figures. This one gives the main agent and each subagent a row of its own, takes a speed only from a request Magpie measured and it can match one to one, and shows an unknown as unknown rather than 0%. The main agent's context is the same figure the status line uses. The last row is the repository and its branch, read with git about every 5 seconds. The author says it calls no extra model or tokenizer.

Demo

The top of the token-speed README, in Chinese: a mod for Claude Code 2.1.296 that draws one row above the prompt for the main thread and each active subagent, with model, effort, context, and output speed, and the workspace last; a sample of three rows with the context bar, Last and Avg tokens per second, and streaming; then the compact rows it falls back to on a narrow terminal. The model names are the author's samples.
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • session.endWhen a session ends
  • agent.spawnWhen a subagent starts
  • turn.stepAt each step of a turn
  • turn.completeWhen a turn ends
  • classic.PostToolUseA Claude Code event
  • classic.StopA Claude Code event
  • session.compactWhen the context is compacted
  • command.runWhen you run its slash command/tok-speed
  • ui.renderDraws into the sessionAbovePrompt

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

Slash commands 1

  • /tok-speed各代理 Last;本会话同请求模型共享24h Avg;reset 清空统计

Files

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

Facts

Author
liuyejinghong
Category
Usage
Marketplace
claude-workflow-mods
Repo
liuyejinghong/Claude-workflow
Folder
mods/token-speed
Version
0.6.0
License
MIT
Repo stars
3
Last change
2026-10-28
Language
TypeScript
Files
19

Other mods in Usage

effort-routernextscapePicks the main thread's effort for each prompt with a Haiku judgment, raises it a level when a turn runs long, and shows the level on the status line.quality-routernextscapeHolds a commandPicks each prompt's effort and each subagent's model and effort with Haiku, refuses rule-breaking Workflow scripts, and shows its state on the status line.context-meternoash-xrcDraws two rows at the right of the band above the prompt: context fill, the rate-limit windows, session cost, the prompt cache, the model, and its effort.idle-compactnoash-xrcRuns /compact on a session idle for 55 minutes with 120k tokens or more, just before the prompt cache expires, and shows a toast when it did.swiss-knifenocodehackHolds a commandChimes and turns its strip red when Claude needs you, forecasts when plan limits run out, writes handoffs, and asks before destructive commands.sesscloneNotTahaAliReports each turn's tokens, model, and timings to a SessClone dashboard, with a line above the prompt that shows whether this session is synced.context-widgetoMaN-RodDraws the context window as a stacked bar, one color per /context category, on a card under the prompt or docked beside the transcript.cost-visibilitypatitowHolds a commandDraws a two-line band above the prompt with the plan windows, this chat's list-price cost split into main and subagents, and context. /spend opens a pane.usage-barspepperonasShows the 5-hour and 7-day limits as animated bars under the prompt, with a reset countdown, a pace mark, a projection, and six styles.clawd-dashpinkpixel-devDraws a session dashboard under the prompt: plan limits, context, cost, model, effort, git status, and file changes, beside a pixel Clawd who reacts.usage-paneT-AI-LabsOpens a /tokens pane that adds up tokens, cache hit rate, and API price by day, model, and project, and lists each session's prompts by cost and why.ribbonrobonuggetsDraws a slim band above the prompt with the 7-day and 5-hour usage left and when each resets, and whether the prompt cache is warm or cold with the next cost.
All 183 in Usage