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

usage-ring

프롬프트 위에 한도, 컨텍스트, 할 일, 토큰, 비용과 프롬프트 캐시를 표시하는 링

번역 완료

이 mod 소개

claude-mods

Claude Code 터미널용 mod입니다. 프롬프트 위에 링을 표시해 한도, 이 대화의 사용량과 프롬프트 캐시를 보여 주고, 실행 중인 Claude 세션을 위한 보드도 제공합니다.

빠른 설치

이 프롬프트를 Claude Code에 복사하세요.

Install the Claude Code plugins from https://github.com/Oualid0/claude-mods:
add the repo as a plugin marketplace, then install every plugin listed in its
.claude-plugin/marketplace.json, and tell me to run /reload-plugins when done.

수동 설치

claude plugin marketplace add Oualid0/claude-mods
claude plugin install usage-ring@claude-mods
claude plugin install session-board@claude-mods

그다음 Claude Code에서 /reload-plugins를 실행하거나 새 세션을 시작하세요. 로컬 clone에서는 ./install.sh도 같은 작업을 수행합니다(python3 필요). 다시 실행해도 안전합니다.

Mod

자동 업데이트는 기본적으로 꺼져 있습니다. 세션에서 /plugin marketplace update claude-mods로 수동 업데이트하거나 셸에서 claude plugin update usage-ring@claude-mods와 claude plugin update session-board@claude-mods를 실행하세요. /plugin의 Marketplaces에서 이 marketplace의 Enable auto-update를 켤 수도 있습니다.

| Plugin | 기능 | |---|---| | usage-ring | 프롬프트 바로 위에 limits와 chat 두 칩을 표시합니다. 옆의 픽셀 Claude는 턴이 실행되는 동안 두드리고, 그 외에는 잠듭니다. 모델은 옆에 회색으로 표시되며 예를 들어 Opus 5.5 (mid)와 같습니다(effort는 low, mid, high, xhigh, max 중 하나이고 첫 요청부터 알 수 있습니다). | | session-board | 이 컴퓨터에서 다른 Claude 세션이 실행되는 동안 위에 sessions 칩을 표시합니다. 세션마다 한 줄(● 실행 중, 종료 후 60 s 동안 ✓ 완료)이며, 자신의 줄(○ 준비 또는 ● 실행 중)에는 ←가 붙습니다. 실행 중인 다른 세션이 없으면 보드는 숨겨집니다. |

라벨의 의미

| 라벨 | 칩 | 의미 | |---|---|---| | Wk | limits | 사용한 주간 한도(퍼센트). | | Se | limits | 사용한 세션 한도(5시간 창)와 재설정까지의 시간입니다. 4:50h, 1시간 미만이면 33m으로 표시합니다. 창이 끝나면 다음 읽기 전까지 0% 5:00h로 표시됩니다. | | Cx | chat | 사용한 컨텍스트 창(퍼센트). | | Td | chat | 완료한 할 일/전체 할 일입니다. 예: 3/5. 대화에 할 일 목록이 있을 때만 표시됩니다. | | Tk | chat | 세션 시작 후 이 대화가 사용한 토큰입니다(입력, 출력, 캐시 읽기와 쓰기, 서브에이전트 포함). 모델 요청마다 증가합니다. | | Co | chat | 지금까지 세션에 든 비용(미국 달러). | | Ca | chat | 프롬프트 캐시에 남은 시간(33m)이며, 만료되면 expired가 됩니다. |

터미널이 좁으면 중요도가 낮은 순서로 모델 라벨, limits와 chat 텍스트, Ca, Co, Tk, Td, Wk, 픽셀 Claude, Cx를 제거합니다. Se는 최대한 남기며 그것마저 들어가지 않으면 띠를 숨깁니다. 압축하거나 줄바꿈하지 않습니다.

제한

  • mod(function-hook 플러그인)을 지원하는 Claude Code 버전이 필요하며 Claude Code 2.1.288에서 테스트했습니다. mod API는 아직 early access이므로 버전 사이에서 바뀔 수 있습니다.
  • 링은 kitty와 Ghostty에서는 픽셀 이미지로, 다른 터미널에서는 글리프로 표시됩니다.
  • 주간, 세션, 컨텍스트 링은 95%부터 빨간색이 되고 캐시 시간 Ca는 마지막 3분에 빨간색이 됩니다.
  • Ca는 추정값입니다. Claude Code는 캐시가 얼마나 유지되는지(5분 또는 1시간)플러그인에 알려 주지 않으므로 보드는 1시간으로 가정하고 각 요청이 캐시에서 읽은 내용을 바탕으로 학습합니다. 5분 넘게 멈춘 뒤 적중하면 1시간, 누락되면 5분으로 봅니다. 시스템 프롬프트가 바뀌어도 누락될 수 있지만 보드는 그 사실을 알 수 없습니다.
  • 세션을 시작하거나 재개하면 Tk는 0에서 시작합니다. 재개한 세션의 이전 토큰은 사용할 수 없습니다. Co는 세션 비용에서 시작합니다.
  • Td는 TaskCreate/TaskUpdate/TaskList와 TodoWrite를 셉니다. 최신 모델에서 이 도구들을 사용하려면 CLAUDE_CODE_ENABLE_TODO_TOOLS=1이 필요합니다(문서).
  • 보드는 다른 세션을 사용 중 또는 유휴 상태로만 알 수 있으며 “입력 필요” 여부는 알 수 없습니다. 이름 없는 세션은 숨깁니다.
  • 보드는 5 s마다 ListAgents 도구에서 세션 목록을 읽습니다. 출력은 모델용 텍스트이지 고정 형식이 아니므로 Claude Code가 업데이트해 형식이 바뀌면 오류 대신 빈 상태로 남습니다.

옵션

usage-ring에는 기본적으로 꺼진 옵션이 하나 있습니다.

| 옵션 | 의미 | |---|---| | limitsFile | 세션 및 주간 한도를 $CLAUDE_CONFIG_DIR/usage-limits.json(기본 ~/.claude)에 기록해 다른 도구가 읽게 합니다. |

Claude Code에서 /plugin configure usage-ring@claude-mods를 실행하거나 다음을 실행하세요.

echo '{"limitsFile":"true"}' | claude plugin configure usage-ring@claude-mods --values-stdin

개발

  • 각 플러그인은 plugins/<name>/에 있으며 .claude-plugin/plugin.json, hooks/hooks.json, hook이 있는 hooks/register.tsx, 옆의 순수 로직 파일, 상태 계약인 types/index.d.ts, tests/로 구성됩니다.
  • 확인:claude plugin validate .를 실행한 뒤 claude plugin validate plugins/<name>과 claude plugin test plugins/<name>를 실행하세요.
  • 로컬 clone에서 설치하면 Claude Code가 파일을 그 자리에서 읽습니다. 변경 사항은 /reload-plugins 또는 다음 세션에 적용됩니다.
  • 두 mod는 프롬프트 위의 같은 띠에 그려집니다. 각 렌더 hook은 next(e)를 호출해 아래 내용을 유지합니다(session-board가 위, usage-ring이 프롬프트 옆).

라이선스

MIT, LICENSE를 참고하세요.

설치

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

claude plugin marketplace add Oualid0/claude-mods
claude plugin install usage-ring
원문 / README

claude-mods

Mods for the Claude Code terminal: a band of rings above the prompt that shows your limits, this chat's usage and the prompt cache, plus a board of your running Claude sessions.

Quick install

Copy this prompt into Claude Code:

Install the Claude Code plugins from https://github.com/Oualid0/claude-mods:
add the repo as a plugin marketplace, then install every plugin listed in its
.claude-plugin/marketplace.json, and tell me to run /reload-plugins when done.

Manual install

claude plugin marketplace add Oualid0/claude-mods
claude plugin install usage-ring@claude-mods
claude plugin install session-board@claude-mods

Then run /reload-plugins in Claude Code, or start a new session. From a local clone, ./install.sh does the same (it needs python3) and is safe to run again.

Update

Auto-update is off by default. Update by hand with /plugin marketplace update claude-mods in a session, or claude plugin update usage-ring@claude-mods and claude plugin update session-board@claude-mods in the shell. You can also turn on Enable auto-update for the marketplace under Marketplaces in /plugin.

Mods

| Plugin | What it does | |---|---| | usage-ring | Two chips right above the prompt: limits and chat, with a pixel Claude beside them that hammers while a turn runs and sleeps otherwise, and the model in grey next to it, e.g. Opus 5.5 (mid) (effort low, mid, high, xhigh or max, known from the first request on). | | session-board | A sessions chip above that while other Claude sessions on this machine are running: one row each (● running, ✓ done for 60 s after it finished), plus your own row (○ ready or ● running) marked ←. With no other session running, the board is hidden. |

What the labels mean

| Label | Chip | Meaning | |---|---|---| | Wk | limits | Weekly limit used, in percent. | | Se | limits | Session limit (the 5-hour window) used, and the time until it resets: 4:50h, or 33m under an hour. Once the window is over it shows 0% 5:00h until the next reading. | | Cx | chat | Context window used, in percent. | | Td | chat | Todos done out of all, e.g. 3/5. Only while the chat has a todo list. | | Tk | chat | Tokens this chat used since the session started (input, output, cache reads and writes, subagents included). Grows after every model request. | | Co | chat | What the session cost so far, in US dollars. | | Ca | chat | Time left on the prompt cache (33m), expired once it lapsed. |

When the terminal is narrow, the least important goes first: the model label, the words limits and chat, Ca, Co, Tk, Td, Wk, the pixel Claude, then Cx. Se stays longest; if not even it fits, the band is hidden. Nothing is squeezed or wrapped.

Limits

  • Needs a Claude Code version with mods (function-hook plugins); tested with Claude Code 2.1.288. The mod API is early access and may change between versions.
  • Rings are pixel images in kitty and Ghostty; other terminals show a glyph instead.
  • Rings for the week, session and context turn red from 95%, and the cache time Ca turns red in its last 3 minutes.
  • Ca is an estimate. Claude Code does not tell plugins how long the cache lives (5 minutes or 1 hour), so the band assumes 1 hour and learns from what each request read from the cache: a hit after a pause of more than 5 minutes means 1 hour, a miss means 5 minutes. A miss can also come from a changed system prompt, which the band cannot see.
  • Tk starts at 0 when a session starts or resumes; earlier tokens of a resumed session are not available. Co starts with the session's cost.
  • Td counts TaskCreate/TaskUpdate/TaskList and TodoWrite. Newer models only have these tools with CLAUDE_CODE_ENABLE_TODO_TOOLS=1 (docs).
  • The board knows other sessions only as busy or idle; "needs input" is not available. Sessions without a name are hidden.
  • The board reads the session list from the ListAgents tool every 5 s. Its output is text for the model, not a fixed format: if a Claude Code update changes it, the board stays empty instead of showing an error.

Options

usage-ring has one option, off by default:

| Option | Meaning | |---|---| | limitsFile | Write the session and weekly limits to $CLAUDE_CONFIG_DIR/usage-limits.json (default ~/.claude) for other tools to read. |

Set it with /plugin configure usage-ring@claude-mods in Claude Code, or:

echo '{"limitsFile":"true"}' | claude plugin configure usage-ring@claude-mods --values-stdin

Development

  • Each plugin lives in plugins/<name>/: .claude-plugin/plugin.json, hooks/hooks.json, hooks/register.tsx with the hooks, pure logic in files beside it, types/index.d.ts (the state contract) and tests/.
  • Check: claude plugin validate ., then claude plugin validate plugins/<name> and claude plugin test plugins/<name>.
  • Installed from a local clone, Claude Code reads the files in place: changes apply with /reload-plugins or the next session.
  • Both mods draw into the same band above the prompt; each render hook calls next(e) and keeps what is beneath (session-board on top, usage-ring next to the prompt).

License

MIT, see LICENSE.

비슷한 프로젝트