token-weather
Reviewed
at commit e839261
New version, not yet reviewed
A live forecast of the context window, with a prompt-cache countdown, drawn above the prompt.
0 upvotes
Log in to upvote or save- Made by
- Hamza Zafar
- Pinned commit
-
e8392612e80094e5e048907751555257da0eb790 - What we checked
-
Draws a weather-style forecast of how full the context window is above the prompt, with a sparkline of recent turns and a countdown for the prompt cache. It reads the usage figures from the end of your session transcript and, to place its band, an optional band-order file in your Claude config folder. It makes no network calls and stores only the detected cache lifetime.
Review details
Static review of the source at the pinned commit; not run. Delta review of the changes since ddd94a3; the rest carries over from the review at that commit. Registers session.start, session.end, turn.step, turn.complete and ui.render (AbovePrompt). Uses $.session.usage, $.session.root and $.session.id, $.env.get for HOME and CLAUDE_CONFIG_DIR, $.fs.stat and $.fs.read (or $.process.run with 'tail -c 1048576' for large files) on this session's own transcript, and parses only the last assistant entry's usage.cache_creation fields to detect a 5 minute or 1 hour cache. Reads Claude settings once to see whether the cache-clock mod's status line is set (one string compare). Uses $.store.get/set for detectedTtl, $.clock timers and $.ui.invalidate. New in this version: a shared hooks/bands.ts and a once-per-session read (via $.fs.exists and $.fs.read) of <config dir>/claude-code-mods/bands.json, a list of mod names that decides the order of bands above the prompt; the content is parsed as JSON, only an array of strings is accepted, and any error gives an empty order. The band is now wrapped in a keyed Box and merged with other band mods' columns; no new calls to the network, processes or settings. Failures are caught and the last value stays. No network, no writes outside its store, no tool changes.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: no
- Blocks or changes tool calls: no
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: yes
- Shows something on screen: yes
- Hooked events
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/token-weather/)