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

statusline-band

Claude Code 插件把 statuslineV4.sh 移植到提示列上方的状态带,让 Desktop Code 标签显示两行彩色状态信息,包括目录、git、模型、effort、持续时间、版本、session id、速率限制、上下文、成本、输出风格和 RAM。

zakattack9@zakattack9

zakattack9/agentic-coding/tree/main/claude-code/plugins/statusline-band

已翻译

关于这个 mod

statusline-band 将 claude-code/statuslines/statuslineV4.sh 移植到提示列上方的状态带,因此 Claude Desktop Code 标签(不会运行 statusLine 脚本)也能显示相同的数据,两行分别着色。第 1 行显示目录、git 分支、模型、effort、持续时间、版本和缩短后的 session id;第 2 行显示 5h/7d 速率限制、上下文百分比、成本、输出风格和 RAM 用量。颜色来自脚本的 xterm-256 调色板并转换为十六进制;非空的 NO_COLOR 会禁用颜色。session id 是一个按钮:在终端中会复制完整 id,在尚未支持剪贴板写入的 Desktop 应用中则显示 toast。使用 /plugin marketplace add zakattack9/agentic-coding 和 /plugin install statusline-band@zaksak 安装。选项(show_in_terminal、dir_levels、refresh_seconds)通过 /plugin configure 或 /config 设置。需要支持 mods 的 Claude Code 构建;在 v2.1.286 上测试。

安装

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

claude plugin marketplace add zakattack9/agentic-coding
claude plugin install statusline-band
原文 / README

statusline-band

A mod that ports claude-code/statuslines/statuslineV4.sh into the band above the prompt, so the Claude Desktop Code tab (which doesn't run statusLine scripts) gets the same figures in two rows:

statusline-band  ⟡  main  ⟡  Opus 5.5  ⟡  high               2m  ⟡  v2.1.286  ⟡  f00a9b5b…afddad
5h 13% · 7d 26%  ⟡  ctx 8%  ⟡  $0.77  ⟡  Caveman                        RAM 2.03GB (6 · 2.9%)

Each row puts its main figures on the left and pushes the rest to the right edge. Each figure is drawn in its own color, labels included. The 5h/7d labels and the RAM process count are a shade darker, and the ⟡ separators are dimmed. Colors are the script's xterm-256 palette converted to hex. A non-empty NO_COLOR turns them off.

The session id is a button. In the terminal, pressing it copies the full id. The Desktop app doesn't let mods write to the clipboard yet, so there it shows the full id in a toast instead.

Install

/plugin marketplace add zakattack9/agentic-coding
/plugin install statusline-band@zaksak

Requires a Claude Code build with mods. Tested on v2.1.286 in the Desktop Code tab.

Options

Set via /plugin configure statusline-band@zaksak or /config:

| Option | Default | What it does | | --- | --- | --- | | show_in_terminal | false | Also draw the band in terminal sessions. Off so the CLI's real status line isn't doubled. | | dir_levels | 3 | Trailing path components shown; 0 shows the full path. | | refresh_seconds | 5 | How often git, RAM and duration refresh between turns. |

Differences from the script

  • Draws above the prompt: mods can't draw in the status line slot below it.
  • Two rows instead of three. Duration, version and session id sit on the right of row 1, output style ends row 2, and the session id is shortened to first8…last6. Duration and output style keep each other's old colors.
  • Effort comes from the main loop's last request (turn.step), and is blank for a model without effort. Before the first request, or after /effort or /model changes between turns, it comes from the /config row until the next request.
  • Output style comes from the engine's own /config row, matched by key name. It shows default when not found.
  • Context shows — until the first response of a fresh or just-compacted session, where the script showed 0%.
  • Rate limits read 0% once a window's reset time has passed, since the engine's reading is from the last response. A gateway's spend_limit shows as spend. With no reading at all, the segment is left out instead of saying No ongoing session.
  • Cost is left out when the host keeps no cost ledger, instead of showing $0.00.
  • Duration counts from this run's start, read from the engine process's uptime. The engine's own session start counts from a resumed session's first launch. /clear still resets it.
  • RAM sums every process named claude for this user, as the script does: all Desktop Code tabs and terminal sessions, not just this one. This session's engine is always included, and the Desktop app's disclaimer wrapper is skipped.

Develop

claude plugin validate claude-code/plugins/statusline-band
claude plugin test claude-code/plugins/statusline-band
claude --plugin-dir claude-code/plugins/statusline-band

其他同名作品

更多类似作品