ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 mohammed-alsalhi

usage-band

각 속도 제한 창(5h, week, per-model week)과 마지막 재설정 이후의 사용량을 그래프로 보여 주는 밴드를 프롬프트 위에 그리는 Claude Code 플러그인입니다.

번역 완료

이 mod 소개

usage-band는 프롬프트 위에 상태 밴드를 렌더링하는 Claude Code 플러그인(hooks 모듈)입니다. 5h 창, 주간 창, 모델별 주간 창의 속도 제한 링과 함께 세션, 일일, 월간 사용량을 보여 줍니다. 각 링의 바깥쪽 호는 사용 비율을, 안쪽 파이는 창에서 경과한 시간을 나타내며 사용량에 따라 초록색, 호박색, 빨간색으로 표시됩니다. 각 링 옆에는 비율, 창 레이블, 재설정 시각, 사용량 그래프(SVG, 터미널에서는 텍스트 스파크라인)가 나옵니다. ~/.claude/mods에 복제하고 ~/.claude/settings.json의 CLAUDE_CODE_PLUGIN_DIRS가 해당 폴더를 가리키게 한 뒤 CLAUDE_CODE_PLUGIN_DIR_WATCH를 활성화해 설치합니다. 세션과 계정 사용량 엔드포인트에서 사용량을 읽으며 자격 증명은 엔진이 보관합니다.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add mohammed-alsalhi/usage-band
claude plugin install usage-band
원문 / README

usage-band

A band above the Claude Code prompt that shows your rate limits and spend, built as a Claude Code plugin (a hooks module).

(ring)  3%  5h            · resets 4h31m  [graph]            (ring) 32%  7d        · resets 4d7h  [graph]
($)  $2.99  $12.08 today  · $12.08 mo                        (ring) 11%  7d fable  · resets 4d7h  [graph]

Layout

The band is two groups. The 5h window and the cost sit on the left; the weekly windows (7d and each per-model weekly, such as 7d fable) are pinned to the right edge.

Within a group, every field is its own column, so they line up down the rows whatever the text widths: rings, then percentages (right-aligned, so 3% sits under the 9 of $2.99), then labels (5h, 7d, $12.08 today), then reset times, then graphs. The cost row shares those columns.

The space between the two groups is left free, so more can be added in the middle.

If the window is too narrow for both groups side by side, they stack into one group, so all four rows share the same columns instead of each group lining up on its own, with the cost row last.

The rings

Each rate-limit ring has two parts: the outer ring is how much of the limit you have used, and the inner pie is how much of the window has gone by since its last reset. If the ring is further round than the pie, you are burning faster than time is passing.

| | | | --- | --- | | <img src="docs/ring-ahead.svg" width="40" alt="Outer ring about an eighth full, inner pie about 40% full"> | Ahead of pace. 12% used, 40% of the window gone. Green below 70%. | | <img src="docs/ring-behind.svg" width="40" alt="Outer ring three-quarters full in amber, inner pie almost full"> | Close to the line. 75% used, 95% of the window gone. Amber from 70%. | | <img src="docs/ring-over.svg" width="40" alt="Outer ring almost full in red, inner pie half full"> | Burning too fast. 95% used, only half the window gone. Red from 90%. | | <img src="docs/ring-cost.svg" width="40" alt="Full green ring with a dollar sign"> | Cost. This session's spend, then today and this month. No window, so no pie. |

Beside each ring: the percent used, the window (5h, 7d, or a per-model weekly such as 7d fable), when it resets, and a line graph of usage since the reset. The graph spans the whole window, so where the line stops is how far in you are. In a terminal, which can't draw SVG, the graph is text instead: one cell per slice of the window, ▁▂▃▄▅▆▇█ by usage and · where the slice is still ahead.

Install

git clone https://github.com/mohammed-alsalhi/usage-band ~/.claude/mods/usage-band

Point Claude Code at the folder in ~/.claude/settings.json, and set the watch flag so a running session reloads the mod when you save it:

{
  "env": {
    "CLAUDE_CODE_PLUGIN_DIRS": "~/.claude/mods/usage-band",
    "CLAUDE_CODE_PLUGIN_DIR_WATCH": "1"
  }
}

Then start a new session. The mod needs a Claude Code build with the plugin hooks API (2.1.286 here).

How it works

  • Readings come from the session's own usage plus the account usage endpoint, which is where the per-model weekly limits live. The engine holds the credential; the mod never sees the token.
  • Readings and spend are kept in the plugin store, shared by every session, so graphs and the today/month totals carry across sessions. Spend is counted once per session however often it is measured.
  • The rings are plain SVG built in hooks/register.tsx. The files in docs/ are samples made with the same code.

Develop

claude plugin validate .
claude plugin test .

동명의 다른 작품

비슷한 프로젝트