crane-valley/claude-plugins/tree/main/plugins/session-band

crane-valley/claude-plugins/tree/main/plugins/session-band

seconds_since_last_response),因此恢复后的倒计时只是估算值,最长可能比实际多运行该响应的生成时间;在下一次读取或写入缓存的主线程响应将其替换为精确倒计时前,它会以暗色文字显示并跟在 estimated 后面,例如 4:00 estimated。当 Claude Code 在恢复时报告提示缓存可能已过期,该行会改为显示 expired。showCredits 后,会把每月使用额度支出作为 Credits 添加到该行。它会在会话启动时读取,因此开启后,即使还没有任何响应,该行也可能显示。/context 使用的颜色拆分为最大的类别。Function hooks 是 Claude Code 的早期访问 API,版本之间可能在不另行通知的情况下改变。CI 在 Claude Code 2.1.288 上测试此插件。如果状态带没有出现,请更新 Claude Code;如果某个版本仍默认关闭 function hooks,需要在其环境中设置 CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1。
claude plugin marketplace add crane-valley/claude-plugins
claude plugin install session-band@crane-valley
使用 /plugin configure session-band@crane-valley、在 /config 中设置,或在 claude plugin install 上使用 --config KEY=VALUE。未设置的选项使用下面的默认值。
| 选项 | 默认值 | 含义 |
| --- | --- | --- |
| cacheTtl | 5m | 主线程使用的提示缓存 TTL(5m 或 1h)。插件无法从 Claude Code 读取它,因此错误的值会显示错误的倒计时。 |
| showCost | true | 显示会话成本。使用订阅方案时,这是使用量的 API 价格,不是你被收取的金额。 |
| showCredits | false | 将账户每月的使用额度支出添加到 Limits 行,正如 Claude Code 的 /usage 在 Usage credits 下显示的那样。插件使用你的登录信息,最多每隔 5 分钟请求一次同一端点。该端点没有公开文档,因此当它发生变化或返回错误时,会省略这一行。它不提供重置时间,因此不会显示。它需要 claude.ai 登录:在 Bedrock、Vertex、网关或 API key 模式下,插件不会发送请求,也不会显示 Credits。 |
提示符上方的状态带是所有插件共享的一个位置。session-band 会把自己的行追加到下方插件已经绘制的内容中,因此其他插件的行仍然可见;不调用 next(e) 就绘制状态带的插件,会隐藏位于它下方的内容。
MIT
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add crane-valley/claude-plugins claude plugin install session-band
Session figures in the band directly above the Claude Code prompt, on the terminal and in the desktop app's Code tab:

seconds_since_last_response), so the restored countdown is an estimate that can run long by up to that response's generation time and is shown followed by the word estimated in dim text, for example 4:00 estimated, until the next main-thread response that reads or writes the cache replaces it with the exact countdown. When Claude Code reports on resume that the prompt cache has likely expired, the row shows expired instead.showCredits to add their monthly credit spend as Credits, which is read when the session starts, so with it the row can show before any response./context's colors.Function hooks are an early-access Claude Code API that may change between releases without notice. CI tests this plugin on Claude Code 2.1.288. If the band does not appear, update Claude Code; a build where function hooks are still off by default needs CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 in its environment.
claude plugin marketplace add crane-valley/claude-plugins
claude plugin install session-band@crane-valley
Set them with /plugin configure session-band@crane-valley, in /config, or with --config KEY=VALUE on claude plugin install. Unset options take the defaults below.
| Option | Default | Meaning |
| --- | --- | --- |
| cacheTtl | 5m | The prompt cache TTL your main thread uses (5m or 1h). The plugin cannot read it from Claude Code, so a wrong value shows a wrong countdown. |
| showCost | true | Show the session's cost. On a subscription this is the API price of the usage, not what you are billed. |
| showCredits | false | Add the account's monthly usage-credit spend to the Limits row, as Claude Code's /usage shows it under Usage credits. The plugin asks the same endpoint with your own login at most every 5 minutes. The endpoint is undocumented, so when it changes or answers with an error the row is left out. It carries no reset time, so none is shown. It needs a claude.ai login: on Bedrock, Vertex, a gateway or an API key the plugin sends no request and shows no Credits. |
The band above the prompt is one slot shared by every plugin. session-band appends its rows to whatever the plugins beneath it drew, so other plugins' rows stay visible; a plugin that draws the band without calling next(e) hides the ones beneath it.
MIT