MohamedEmbarak/token-face/tree/main/plugins/token-face
關於這個 mod
token-face
一張顯示在提示列上方的臉,context window 越滿,表情就越詭異。
(•_•) Crowded 61% · 610.1k / 1M ▁ ▂ ▃ ▄ ▅ ▲ +6.4k last turn
顯示內容
-
顯示一張臉和一段說明,表示 context window 的使用程度:
| 已使用 context | 說明 | 圖片 | |---|---|---| | under 25% | Fresh | <img src="faces/1.png" width="64" alt="Stage 1 picture"> | | 25–39% | Fine | <img src="faces/1.png" width="64" alt="Stage 1 picture"> | | 40–64% | Crowded | <img src="faces/2.png" width="64" alt="Stage 2 picture"> | | 65–89% | Too much | <img src="faces/3.png" width="64" alt="Stage 3 picture"> | | 90% and up | COMPACT. NOW. | <img src="faces/4.png" width="64" alt="Stage 4 picture"> |
-
顯示百分比與已使用的 token,例如
134.4k / 200k。 -
顯示最近 12 個回合的圖表,每根柱狀條使用該回合所在階段的顏色。
-
顯示上一回合增加了多少內容,或壓縮移除了多少內容。
每個回合後都會更新,壓縮完成後也會立即更新。
在桌面應用程式中,臉是一張圖片。在終端機中,則是類似 (•_•) 的文字臉。
安裝
/plugin marketplace add MohamedEmbarak/token-face
/plugin install token-face@token-face
這個 mod 建立在 Claude Code 的 function hooks 上。若安裝後提示列上方沒有顯示任何內容,請將這項設定加入 env 區塊,然後重新啟動 Claude Code:
"CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1"
使用自己的圖片
外掛附有 4 張圖片,每個階段一張,位於外掛的 faces/ 資料夾。要使用自己的圖片,請替換它們:
| 檔案 | context 處於該範圍時顯示 |
|---|---|
| 1.png | under 40% |
| 2.png | 40–64% |
| 3.png | 65–89% |
| 4.png | 90% and up |
png、jpg、jpeg、gif 或 webp,每張約低於 85 KB 即可(128×128 已足夠)。沒有圖片的階段會保留繪製的臉。只使用你製作或有權使用的圖片。
開發
在此資料夾執行:
claude plugin validate .
claude plugin test .
授權條款
MIT
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add MohamedEmbarak/token-face claude plugin install token-face
原文 / README
token-face
A Claude Code mod that puts a face above the prompt. The fuller your context window gets, the worse the face looks.
(•_•) Crowded 61% · 610.1k / 1M ▁ ▂ ▃ ▄ ▅ ▲ +6.4k last turn
What it shows
-
A face and a caption for how full the context window is:
| Context used | Caption | Picture | |---|---|---| | under 25% | Fresh | <img src="faces/1.png" width="64" alt="Stage 1 picture"> | | 25–39% | Fine | <img src="faces/1.png" width="64" alt="Stage 1 picture"> | | 40–64% | Crowded | <img src="faces/2.png" width="64" alt="Stage 2 picture"> | | 65–89% | Too much | <img src="faces/3.png" width="64" alt="Stage 3 picture"> | | 90% and up | COMPACT. NOW. | <img src="faces/4.png" width="64" alt="Stage 4 picture"> |
-
The percentage and tokens used, like
134.4k / 200k. -
A chart of the last 12 turns, each bar in the colour of the stage that turn was in.
-
How much the last turn added, or how much a compaction removed.
It updates after every turn, and straight after a compaction.
In the desktop app the face is a picture. In a terminal it is a text face
such as (•_•).
Install
/plugin marketplace add MohamedEmbarak/token-face
/plugin install token-face@token-face
The mod is built on Claude Code's function hooks. If nothing shows above the
prompt after installing, add this to the env block of
~/.claude/settings.json and restart Claude Code:
"CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1"
Use your own pictures
The mod ships with four pictures, one per stage, in the plugin's faces/
folder. To use your own, replace them:
| File | Shown when context is |
|---|---|
| 1.png | under 40% |
| 2.png | 40–64% |
| 3.png | 65–89% |
| 4.png | 90% and up |
png, jpg, jpeg, gif or webp, each under about 85 KB (128×128 is plenty). A stage without a picture keeps its drawn face. Only use pictures you made or have the right to use.
Develop
From this folder:
claude plugin validate .
claude plugin test .
Licence
MIT

