shunt
Reviewed
at commit 3a82c8f
A Claude Mod for the shunt gateway: a band above the prompt shows how much of each window is used and the time to reset — the shared account pool's, read from…
0 upvotes
Log in to upvote or save- Made by
- Minsu Lee
- Pinned commit
-
3a82c8f49187cc2c5713e507c5b877803ec350de - What we checked
-
Shows a usage band above the prompt and a /shunt:usage command with how much of the shared account pool of your shunt gateway is used and when it resets, or your own Claude rate limits when you are not on shunt. It asks your own gateway for /usage every minute and after each turn, using the credential your session already sends there. It reads no prompts or files and stores nothing.
Review details
Static review of the source at the pinned commit; not run. Delta review of the changes since 532f5c7; the rest carries over from the review at that commit. Registers command.run for shunt:usage and, unless the usageBand option is off, session.start (starts a 60 s clock poll), session.measure, turn.complete and ui.render (AbovePrompt). Network: GET <base>/usage via $.http.fetch, where base is SHUNT_BASE_URL else ANTHROPIC_BASE_URL (the gateway the session already uses); with neither set it makes no request. Credential: SHUNT_TOKEN, else ANTHROPIC_AUTH_TOKEN (Bearer), else ANTHROPIC_API_KEY (x-api-key), else the token printed by shunt's own apiKeyHelper. That helper is run through $.process.run only when the apiKeyHelper setting read from $.settings.read matches exactly '<path>/shunt gateway token' (no shell; any other helper is ignored), only when SHUNT_BASE_URL is unset or equals ANTHROPIC_BASE_URL, and the token is cached in memory for 5 minutes. If SHUNT_BASE_URL names a different host than ANTHROPIC_BASE_URL, an environment credential is sent to that host, which the user configured. It also reads HOME/USERPROFILE to expand a leading ~/. The response is parsed as JSON and rendered; errors leave the band showing a short problem text. The hooks.json-listed module imports only local files; the unresolved ../types import is a type-only import. commands/usage.md is a fallback prompt that tells Claude to GET the same endpoint with the same variables, and not to print or store the token. Changes in this version: only the vitest dev dependency range in package.json (^5.0.0 to ^5.0.5) and the lock file; no plugin code changed.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: no
- Blocks or changes tool calls: no
- Reads or writes files: no
- Runs programs on your machine: yes
- Calls the model (uses tokens): no
- Sends data over the network: yes
- Stores data: no
- Shows something on screen: yes
- Hooked events
A Claude Mod for the shunt gateway: a band above the prompt shows how much of each window is used and the time to reset — the shared account pool's, read from shunt's GET /usage, or the session's own Claude rate limits off shunt — and /shunt:usage prints the pool's full breakdown.
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/shunt/)