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.
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
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.