BrightGold70/skills/tree/main/mods/token-weather
token-weather
一個 Claude Code 外掛,在提示列上方繪製執行階段內容視窗的即時預測,顯示填充百分比、上一輪新增的內容,以及表示視窗由什麼填滿的彩色列。
關於這個 mod
token-weather 是一個 Claude Code 外掛,會在提示列上方繪製執行階段內容視窗的即時預測。它顯示目前的填充百分比、上一輪增加了多少內容,以及用 /context 的色彩表示視窗填充情況的彩色列。
在 Mac 上安裝:
- 將外掛連結到外掛目錄:
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
正在執行的工作階段不會載入新註冊的外掛;外掛表在啟動時固定,因此註冊後要重新啟動。
檔案:.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
