BrightGold70/skills/tree/main/mods/token-weather
token-weather
一个 Claude Code mod,在提示栏上方绘制上下文窗口的实时预测,显示填充百分比、上一轮新增的内容,以及表示窗口由什么填满的彩色条。
关于这个 mod
token-weather 是一个 Claude Code 外挂,会在提示栏上方绘制实时的上下文窗口预测。它显示当前填充百分比、上一轮增加了多少内容,以及用 /context 的颜色表示窗口填充情况的彩色条。
在 Mac 上安装:
- 将 mod 链接到 mod 目录:
mkdir -p ~/.claude/mods
ln -sfn ~/orca/skills/mods/token-weather ~/.claude/mods/token-weather
- 将以下内容加入 ~/.claude/settings.json 的 "env" 区块来注册:
"CLAUDE_CODE_PLUGIN_DIRS": "/Users/<you>/.claude/mods/token-weather"
多个外挂文件夹会以 ':' 连接。
- 验证并测试,然后重启 Claude Code:
claude plugin validate ~/.claude/mods/token-weather
claude plugin test ~/.claude/mods/token-weather
正在运行的工作阶段不会载入新注册的 mod;插件表在启动时固定,所以注册后要重启。
文件:.claude-plugin/plugin.json(清单)、hooks/hooks.json → hooks/register.tsx(hooks 模块)、hooks/weather.ts(带测试的纯辅助函数)、types/index.d.ts($.state 契约)。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add BrightGold70/skills claude plugin install token-weather
原文 / README
token-weather
A Claude Code mod: a live forecast of the context window, drawn above the prompt —
fill percentage, what the last turn added, and a bar of what fills the window in
/context's colours.
Install on a Mac
The mod loads from ~/.claude/mods/token-weather, which is a symlink into this
checkout, so a git pull updates it and the settings line is the same on every
machine.
# 1. Link the mod (adjust the checkout path if yours differs). If a real
# ~/.claude/mods/token-weather directory already exists, move it away first:
# `ln -sfn` onto a directory puts the link INSIDE it instead of replacing it.
mkdir -p ~/.claude/mods
ln -sfn ~/orca/skills/mods/token-weather ~/.claude/mods/token-weather
# 2. Register it: add to the "env" block of ~/.claude/settings.json
# "CLAUDE_CODE_PLUGIN_DIRS": "/Users/<you>/.claude/mods/token-weather"
# Several plugin folders are joined with ':'. Use an absolute path or ~.
# 3. Check it, then restart Claude Code
claude plugin validate ~/.claude/mods/token-weather
claude plugin test ~/.claude/mods/token-weather
A running session never picks up a newly registered mod — the plugin table is fixed
at launch — so restart after step 2. claude plugin list reports a fresh process,
not your session, and can say loaded while the session you are in has not.
Files
.claude-plugin/plugin.json— manifesthooks/hooks.json→hooks/register.tsx— the hooks modulehooks/weather.ts— pure helpers;hooks/weather.test.tstests themtypes/index.d.ts— the$.statecontract
.claude-plugin/types/ is written by Claude Code at every load (API typings for
tsc -p) and ignores itself; it is never committed.
其他同名作品
- token-weatherhamzafer · ★ 91
- token-weathercskwork · ★ 0
