⌘
Token Weather
v1.2.0🛡️Tier 1 Security AuditedCLI v2.1.287+ VerifiedAmbient terminal token & context window visualizer. Shows real-time token burn rates, sliding context pressure, and KV cache hits.
⚡Installation Specifier
$/plugin install token-weather@marketplace
Problem Solved & Architectural Motivation
Developed as part of the official Anthropic Claude Code playground examples. Token Weather adds a sleek status pill to the terminal interface displaying current session token expenditure, context window headroom percentage, and cache efficiency metrics without slowing down generation.
Before Execution
Zero-Time AST Interception
Evaluates tool payloads prior to kernel fork.
Scoring Model
0-100 Impact Index
Weighted heuristic scoring: files touched, git dirty state, env scope.
Non-Intrusive
Native CLI Hook
Zero proxy daemon required; hooks straight into Claude tool calls.
Lifecycle Architecture & Hook Flow
Step 01
Claude Plan
Prompt Inference
Step 02
Tool Call
tool.call Payload
HOOK INTERCEPT
token-weather
<18ms Heuristic
Step 04
OS Execution
Kernel Fork
Manifest Schema (plugin.json)
{
"name": "token-weather",
"version": "1.2.0",
"entrypoint": "dist/index.js",
"hooks": [
{
"event": "ui.render",
"priority": 10
}
]
}Hook Implementation (register.js)
export default function init({ ui, telemetry }) {
ui.registerStatusWidget({
id: 'token-weather',
render: (state) => {
const burn = state.tokensPerTurn;
const total = state.sessionTotalTokens;
return `⚡ ${burn} tok/turn | ${(total / 1000).toFixed(1)}k ctx`;
}
});
}Security Audit100/100
Network EgressNone (Zero Socket Egress)
Filesystem ScopeBounded to Workspace
Credential Exposure0 Leaks Detected
Sandbox IsolationHost User Privilege
Technical Specifications
Min CLI Versionv2.1.287+
Categorycontext-usage
Runtime Overhead< 18ms AST
LicenseMIT
Mod Publisher
@A
anthropic
github.com/anthropics ↗