---
title: "token-weather"
url: "https://claudemods.dev/en/builds/token-weather-59c6a5"
source: "https://github.com/cskwork/claude-code-mods/tree/main/token-weather"
source_type: "github"
repo: "https://github.com/cskwork/claude-code-mods/tree/main/token-weather"
author: "cskwork"
author_handle: "cskwork"
stars: 0
category: "Dashboards & HUD"
categories: ["hud"]
tags: ["claude-code", "context-window", "hooks", "plugin", "statusline", "token-usage", "ui"]
permission_level: 0
scan_complete: true
install: "claude plugin marketplace add cskwork/claude-code-mods\nclaude plugin install token-weather@claude-code-mods"
added: "2026-10-05T15:34:28.026Z"
updated: "2026-11-06T03:14:49Z"
locale: "en"
content_locale: "en"
---

# token-weather

A Claude Code mod that draws a one-line context window forecast above the prompt, showing tokens used, a 12-turn sparkline, and the last turn's token delta.

## Description

token-weather is a Claude Code plugin (2.1.287+) that adds a live one-line forecast of the context window directly above the prompt. It displays a status indicator (☀ Clear → ↯ Compact soon), tokens used, a sparkline covering the last 12 turns, and how many tokens the most recent turn added. It is part of the cskwork/claude-code-mods marketplace and is installed with:

```
/plugin marketplace add cskwork/claude-code-mods
/plugin install token-weather@claude-code-mods
/reload-plugins
```

The repository also documents the mod structure (manifest, hooks.json, register.tsx, optional types contract, tests) and includes tooling to scaffold new mods.

## Install

```
claude plugin marketplace add cskwork/claude-code-mods
claude plugin install token-weather@claude-code-mods
```

## Original README

# claude-code-mods

Mods for Claude Code (2.1.287+): plugins of function hooks that observe, rewrite or answer
what Claude Code does and draw their own UI. Based on
[Getting started with Claude Code mods](https://claude.dev/blog/getting-started-with-claude-code-mods/).

Landing page: https://cskwork.github.io/claude-code-mods/

| Mod | What it does |
| --- | --- |
| [`token-weather`](token-weather) | A one-line forecast of the context window above the prompt: ☀ Clear → ↯ Compact soon, tokens used, a sparkline of the last 12 turns, and how much the last turn added. |
| [`blast-radius`](blast-radius) | Before a risky Bash command runs (recursive `rm`, `git reset --hard`, `git clean -f`, force push, `git branch -D`, `git stash drop/clear`, `kubectl delete`, SQL `DROP`/`TRUNCATE`, migrations), dry-runs what it would touch and asks **Proceed** or **Cancel**. Cancel or dismiss denies the call. |
| [`template`](template) | Starter mod, not installed: a slash command, a status line entry, a band, and a `$.state` contract with a test. |

## Install

Inside Claude Code:

```
/plugin marketplace add cskwork/claude-code-mods
/plugin install token-weather@claude-code-mods
/plugin install blast-radius@claude-code-mods
/reload-plugins
```

## Make a new mod

```bash
scripts/new-mod.sh my-mod "One line about what it does"
claude --plugin-dir "$PWD/my-mod"     # hot-reloads on every save
```

The script copies `template/`, renames it, adds it to `.claude-plugin/marketplace.json`,
then runs `claude plugin validate` and `claude plugin test` on it.

A mod is three files plus an optional state contract:

```
my-mod/
├── .claude-plugin/plugin.json   name, version, description, "types"
├── hooks/hooks.json             { "modules": ["./register.tsx"] }
├── hooks/register.tsx           export const register: Register = on => { ... }
├── types/index.d.ts             PluginState contract for $.state values
└── tests/my-mod.test.ts         claude plugin test my-mod
```

Rules that bite:

- Every hook is `($, e, next)`. Call `next(e)` to pass on, `next({ ...e, x })` to rewrite, return without it to answer.
- Keep values in `$.state` (`atom` / `read` / `update`); module variables reset on every hot reload.
- No Node, no DOM: files, processes, clock and UI go through `$`. UI elements come from `$.ui.resolve(e)`.
- Test mocks are hooks too: `on('process.run', ($, e) => ({ value: ... }))`.
- After the engine loads a mod it writes `.claude-plugin/types/` beside it, so `tsc -p <mod>` type-checks it (gitignored).

## Check

```bash
for m in token-weather blast-radius template; do claude plugin validate $m && claude plugin test $m; done
```
