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

session-band

터미널과 데스크톱 앱의 Code 탭에서 Claude Code 프롬프트 바로 위에 세션 정보를 표시합니다.

crane-valley@crane-valley

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

원본 게시물 이미지1
번역 완료

이 mod 소개

  • 캐시: 메인 스레드의 프롬프트 캐시가 만료되기까지 남은 시간입니다. 캐시를 읽거나 쓴 마지막 메인 스레드 요청의 시작부터 계산하며, 생성 시간도 캐시 수명에 포함되기 때문입니다. 세션을 재개하거나 포크한 뒤에는 플러그인에 요청 시작 시각이 없고 마지막 응답이 끝난 시각(Claude Code의 SessionStart 필드 seconds_since_last_response)만 있습니다. 따라서 복원된 카운트다운은 추정치이며 해당 응답의 생성 시간만큼 길게 실행될 수 있습니다. 다음에 캐시를 읽거나 쓰는 메인 스레드 응답이 정확한 카운트다운으로 바꿀 때까지 흐린 글씨로 estimated가 뒤에 붙어 표시됩니다. 예를 들면 4:00 estimated입니다. 재개할 때 Claude Code가 프롬프트 캐시가 곧 만료될 가능성을 알리면 행에는 대신 expired가 표시됩니다.
  • 세션: 세션의 API 기준 비용과 실행된 시간입니다.
  • 제한: API가 보고하는 각 속도 제한 창을 사용량 막대 및 재설정까지 남은 시간과 함께 표시합니다. 플러그인이 이름을 지정하지 않은 창(예: 조직 지출 한도)은 원래 종류 이름으로 표시됩니다. 세션의 첫 응답이 값을 보고할 때까지 이 행은 숨겨집니다. Enterprise 좌석처럼 사용 크레딧으로 과금되는 플랜은 응답에서 창을 보고하지 않습니다. 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 | Claude Code의 /usage가 Usage credits 아래에 표시하는 계정의 월간 사용 크레딧 금액을 Limits 행에 추가합니다. 플러그인은 로그인 정보를 사용해 같은 엔드포인트를 최대 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
원문 / README

session-band

Session figures in the band directly above the Claude Code prompt, on the terminal and in the desktop app's Code tab:

session-band in the desktop app's Code tab

  • Cache: time left before the main thread's prompt cache expires, counted from the start of the last main-thread request that read or wrote the cache, since generation time counts against the cache lifetime. After a session is resumed or forked, the plugin has no request start time, only the time the last response finished (Claude Code's SessionStart field 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.
  • Session: the session's API-priced cost and how long it has run.
  • Limits: each rate-limit window the API reports, with a usage bar and the time to its reset. Windows the plugin does not name (an organization spend limit, for example) show under their raw kind. The row is hidden until the first response of the session reports a reading. Plans billed in usage credits, such as Enterprise seats, report no window on responses; turn on 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: the context window fill, split by the largest categories in /context's colors.

Requirements

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.

Install

claude plugin marketplace add crane-valley/claude-plugins
claude plugin install session-band@crane-valley

Options

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. |

Sharing the band

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.

License

MIT

동명의 다른 작품

비슷한 프로젝트