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

show-usage

Claude Code 插件,在一条状态行上显示上下文窗口使用情况和 5 小时/7 天会话使用限制,每次响应后更新。

ricardo-martincoski@ricardo-martincoski

ricardo-martincoski/claude-lab/tree/main/plugins/show-usage

已翻译

关于这个 mod

show-usage

在一条状态行上显示上下文窗口使用情况和 5 小时和 7 天会话使用限制, 每次响应后更新:

⚠ show-usage: context 28% | session 30% [21:50] | week 5% [Sat 2026-10-10 07:00]
  • context:上下文窗口有多满。
  • session 和 week:5 小时和 7 天会话使用限制,/usage 显示为 "Current session" 和 "Current week",重置时间在括号中,采用本地时间。

Claude Code 添加 ⚠ show-usage: 前缀以标记该行来自插件。

安装

/plugin marketplace add ricardo-martincoski/claude-lab
/plugin install show-usage@claude-lab

参阅 claude-lab README 从本地克隆安装或开发该 插件。

值不显示的时候

该行仅显示 Claude Code 迄今为止报告的内容:

  • Claude Code 会话的第一次响应之前什么都不显示。
  • 压缩之后直到下次响应之前,没有 context 部分。
  • 不使用 Claude 订阅时(例如使用 API 密钥),没有 session 和 week 部分。
  • Claude Code 未报告时间时,没有重置时间。

该行仅在响应到达时改变,所以当 Claude Code 会话空闲时,即使在使用限制重置后, 它也保持最后的值。

安装

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

claude plugin marketplace add ricardo-martincoski/claude-lab
claude plugin install show-usage
原文 / README

show-usage

Shows context window usage and the 5-hour and 7-day session usage limits on one status line, updated after every response:

⚠ show-usage: context 28% | session 30% [21:50] | week 5% [Sat 2026-10-10 07:00]
  • context: how full the context window is.
  • session and week: the 5-hour and 7-day session usage limits, which /usage shows as "Current session" and "Current week", with their reset times in brackets, in local time.

Claude Code adds the ⚠ show-usage: prefix to mark the line as coming from a plugin.

Install

/plugin marketplace add ricardo-martincoski/claude-lab
/plugin install show-usage@claude-lab

See the claude-lab README to install from a local clone or to develop the plugin.

When values are not shown

The line shows only what Claude Code has reported so far:

  • Nothing at all before the first response of a Claude Code session.
  • No context part right after a compaction, until the next response.
  • No session and week parts when not using a Claude subscription (for example with an API key).
  • No reset time when Claude Code does not report one.

The line changes only when a response arrives, so while the Claude Code session is idle it keeps the last values, even after a usage limit resets.

更多类似作品