ClaudeMods
☰
ZH-TW
● 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.

更多類似作品