ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 MiguelMachado-dev

turn-telemetry

一个 Claude Code 模组,在提示词上方绘制状态带,显示上一轮的遥测数据:时长、首个 token 的时间、带近期轮次火花线的 tok/s、输出 token、输入 token 及其中缓存的数量、请求数,以及串流中 5s 或更长的停顿。响应串流时,状态带会实时更新。

MiguelMachado-dev@MiguelMachado-dev

MiguelMachado-dev/miguel-mods/tree/main/turn-telemetry

已翻译

关于这个 mod

需要 Claude Code 2.1.287 或更高版本。状态带会显示在终端和 Claude 桌面应用的 Code 标签页中;其他界面不会绘制它。

命令

  • /tps 切换状态带。
  • /tps reset 清除上一轮和火花线历史。

它读取和发送什么

模组会读取 Claude Code 为每一轮报告的计时和 token 数量,并将它们保存在自己的状态中,用于绘制状态带和火花线。它不发起网络请求,不调用模型,也不读取文件。

安装

在 Claude Code 中:

/plugin marketplace add MiguelMachado-dev/miguel-mods
/plugin install turn-telemetry@miguel-mods
/reload-plugins

如果状态带没有出现,请重新启动 Claude Code。

模组会在你电脑上的 Claude Code 内运行,拥有与 Claude Code 相同的访问权限。安装前请阅读 hooks 中的源代码。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add MiguelMachado-dev/miguel-mods
claude plugin install turn-telemetry
原文 / README

turn-telemetry

A Claude Code mod that draws a band above the prompt with telemetry for the last turn: duration, time to first token, tok/s with a sparkline of recent turns, output tokens, input tokens and how much of them was cached, request count and stalls (gaps of 5s or more in the stream). While a response streams, the band updates live.

Needs Claude Code 2.1.287 or later. The band shows in the terminal and in the Code tab of the Claude desktop app; other surfaces don't draw it.

Commands

  • /tps toggles the band.
  • /tps reset clears the last turn and the sparkline history.

What it reads and sends

The mod reads the timings and token counts Claude Code reports for each turn and keeps them in its own state to draw the band and the sparkline. It makes no network requests, calls no model and reads no files.

Install

In Claude Code:

/plugin marketplace add MiguelMachado-dev/miguel-mods
/plugin install turn-telemetry@miguel-mods
/reload-plugins

If the band doesn't show up, restart Claude Code.

A mod runs inside Claude Code on your machine with the same access Claude Code has. Read the source in hooks before installing.

License

MIT. See LICENSE.

更多类似作品