gmorubio/claude-mods/tree/main/turn-usage
이 mod 소개
각 Claude 답변 아래에 흐린 줄을 표시해 현재 세션 사용량 한도의 사용량과 방금 끝난 턴이 사용한 양을 보여 줍니다.
Session: 39% used · this turn: <1%
“current session” 수치는 5시간 사용량 창을 뜻하며 Claude 사용량 설정에서 “Current session”이라고 부르는 것과 같습니다.
종량제(API key, Bedrock 또는 Vertex)에는 사용량 창이 없습니다. 따라서 /cost가 계산하는 방식대로 세션과 턴의 비용을 미국 달러로 표시합니다.
Session: $1.84 · this turn: $0.12
읽는 방법
구독에서는 다음과 같이 표시됩니다.
| 표시 | 의미 |
| --- | --- |
| this turn: +2% | 턴 동안 세션 수치가 2포인트 상승함 |
| this turn: <1% | 턴이 세션 수치를 온전한 1포인트만큼 움직이지 않음 |
| this turn: — | 비교할 값이 없음: 세션의 첫 턴이 어떤 읽기도 오기 전에 끝남 |
구독 창(5시간 또는 주간)을 모두 사용한 뒤에도 완료되는 턴은 추가 사용량으로 실행됩니다. 따라서 포인트 대신 그 턴의 비용을 표시합니다.
Session: 100% used · this turn: $0.12 (extra usage)
100%를 넘기는 턴까지는 여전히 포인트로 측정하고, 다음 턴부터 비용을 표시합니다.
종량제와 추가 사용량에서는 1센트 미만인 턴을 <$0.01로 표시합니다. 비용은 토큰과 공개 API 가격으로 Claude Code가 추정한 값입니다. 청구 통화와 관계없이 항상 달러이며 청구서 금액은 아닙니다.
세션의 첫 턴에는 이전 읽기가 없습니다. 수치는 API 응답과 함께 처음 도착하기 때문입니다. 5시간 창이 그 턴과 함께 시작했다면 0%에서 시작하고, 그렇지 않으면 첫 요청에 함께 온 읽기를 대신 사용합니다. 따라서 빠지는 것은 그 요청 하나뿐입니다.
사용량 수치는 API의 rate-limit 헤더에서 오며, 헤더는 온전한 퍼센트 포인트만 보고합니다. 그래서 턴의 비율도 그 정도로만 정확합니다. +1%는 작은 턴이 우연히 한 포인트를 넘은 것일 수 있습니다. 이 수치는 계정 단위이므로 동시에 실행 중인 다른 Claude 세션도 포함됩니다.
언어
이 줄은 영어로 표시되며 Claude Code의 language 설정이 스페인어(~/.claude/settings.json의 "language": "spanish")일 때는 스페인어로 표시됩니다.
Sesión: 39% usado · este turno: <1%
요구 사항
- Claude 구독 또는 종량제를 사용하는 데스크톱 앱이나 터미널의 Claude Code.
- function-hook mod가 포함된 Claude Code 빌드(
hooks/hooks.json에modules가 있음).
설치
셸에서 실행하세요.
claude plugin marketplace add gmorubio/claude-mods
claude plugin install turn-usage@claude-mods
또는 Claude Code 세션 안에서 한 번에 실행하세요.
/plugin install turn-usage --marketplace gmorubio/claude-mods
또는 한 세션에서 로컬 checkout을 불러오세요.
claude --plugin-dir /path/to/claude-mods/turn-usage
구현 방식
hooks/register.tsx가 mod 전체입니다. 턴이 시작되고 끝날 때 5시간 창(없으면 세션 비용)을 읽고, 답변의 최종 텍스트와 사용량 줄을 함께 유지합니다. 데스크톱이나 터미널이 답변 텍스트 블록을 그릴 때 해당 답변을 끝내는 블록 아래에 줄을 추가합니다.
개인정보 보호
turn-usage는 네트워크 요청을 보내지 않으며 어디에도 내용을 전송하지 않습니다. 개인정보 처리방침을 참고하세요.
라이선스
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add gmorubio/claude-mods claude plugin install turn-usage
원문 / README
turn-usage
A dim line under each Claude reply that shows how much of your current session's usage limit is used, and how much the turn that just ended spent:
Session: 39% used · this turn: <1%
The "current session" figure is the five-hour usage window, the same one Claude's usage settings call "Current session".
On pay as you go (an API key, Bedrock or Vertex) there is no usage window, so the line shows what the session and the turn cost instead, in US dollars, as /cost counts it:
Session: $1.84 · this turn: $0.12
How it reads
On a subscription:
| Shown | Meaning |
| --- | --- |
| this turn: +2% | The session figure rose 2 points during the turn |
| this turn: <1% | The turn didn't move the session figure a whole point |
| this turn: — | Nothing to compare against: the session's first turn ended before any reading came |
Once a subscription window (the five-hour or the weekly one) is used up, a turn that still completes ran on extra usage, so the line shows that turn's cost instead of its points:
Session: 100% used · this turn: $0.12 (extra usage)
The turn that crosses 100% is still measured in points; the cost shows from the next one.
On pay as you go and extra usage, a turn under a cent shows <$0.01. The cost is Claude Code's estimate from the tokens and the public API prices, always in dollars whatever your billing currency, not your invoice.
A session's first turn has no reading from before it, since the figure only arrives with an API response. If the five-hour window began with that turn, the turn started it at 0%; otherwise the reading that came with the turn's first request stands in, which leaves out only that one request.
The usage figure comes from the API's rate-limit headers, which report whole percentage points, so a turn's share is only as precise as that: a +1% can be a smaller turn that happened to cross a point. The figure is your account's, so other Claude sessions running at the same time count towards it too.
Language
The line is in English, or in Spanish when Claude Code's language setting is Spanish ("language": "spanish" in ~/.claude/settings.json):
Sesión: 39% usado · este turno: <1%
Requirements
- Claude Code in the desktop app or the terminal, on a Claude subscription or pay as you go.
- A Claude Code build with function-hook mods (
hooks/hooks.jsonwithmodules).
Install
In your shell:
claude plugin marketplace add gmorubio/claude-mods
claude plugin install turn-usage@claude-mods
Or both at once from inside a Claude Code session:
/plugin install turn-usage --marketplace gmorubio/claude-mods
Or load it from a local checkout for one session:
claude --plugin-dir /path/to/claude-mods/turn-usage
How it's built
hooks/register.tsx is the whole mod. It reads the five-hour window (or, with none, the session's cost) when a turn starts and again when it completes, keeps the reply's final text with its usage line, and when the desktop or the terminal draws a reply's text block, adds the line under the block that ends that reply.
Privacy
turn-usage makes no network requests and sends nothing anywhere. See the privacy policy.
