neostryder/augur/tree/main/apps/claude-mod
augur
Augur 的 Claude Code 外掛:在狀態列顯示用量,以 toast 呈現警示,在提示列上方保留可關閉的列,並附上安裝與測試指令。
關於這個 mod
Augur 的 Claude Code 外掛
在 Augur 設定中的 Claude 頁面開啟 Claude Code 後,Augur 會把這個外掛安裝到 Claude Code。它會把用量放在狀態列,例如 Claude 5h 27% | wk 48% | Grok wk 81% | 1 Augur alert。其他供應商只要有一項額度達到 70%,或最近一次讀取失敗,就會加入這一列;如果 Augur 已經 15 分鐘沒有寫入數值,狀態列也會標示數值有多舊。
Augur 發出給 Claude Code 的警示時,外掛會先以 toast 顯示一次,接著把最新警示留在提示列上方的一列。按 D 可關閉警示,按 O 可開啟 Augur。外掛第一次載入時已經等待中的警示不會顯示 toast,因此安裝不會突然跳出一大批通知。
它如何與 Augur 溝通
Augur 每次重新整理後會儲存 usage.json,並在旁邊保留 alerts.json。外掛只會讀取這兩個檔案。關閉警示時,會在同一個資料夾的 alerts-acks.jsonl 追加類似 {"id":"a1b2c3","at":"2026-10-03T20:00:00.000Z","by":"claude"} 的一行;Augur 下次檢查時,就會在面板與配對的手機上清除那則警示。
Augur 的安裝程式會把這個資料夾複製到 ~/.augur/claude-mod,並將該路徑加入 ~/.claude/settings.json 的 CLAUDE_CODE_PLUGIN_DIRS。它也會在副本中寫入 augur-app.json,指定用量檔案與 Augur 程式。如果缺少這個檔案,外掛會讀取 ~/.augur/usage.json,並省略 Open Augur 按鈕。
修改方式
格式化邏輯位於 hooks/view.ts 的純函式中,hooks/register.tsx 則負責把它們接到 Claude Code。tests/augur.test.ts 中的測試會使用假的檔案系統與時鐘執行。
claude plugin validate apps/claude-mod
claude plugin test apps/claude-mod
執行 tsc -p . 時,請將 Claude Code 的 claude-code.d.ts 與該檔案頂端的 tsconfig.json 放入 .claude-plugin/types/。該資料夾被 git 忽略,因為宣告檔取決於你使用的 Claude Code 版本。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add neostryder/augur claude plugin install augur
原文 / README
Augur's Claude Code mod
This folder is the mod Augur installs into Claude Code when you turn on Claude Code under Claude in Augur's settings. It keeps your usage in the status line, for example Claude 5h 27% | wk 48% | Grok wk 81% | 1 Augur alert. Other providers join the line once one of their limits reaches 70% or their last read failed, and the line says how old the numbers are once Augur has not written them for 15 minutes.
When Augur raises an alert meant for Claude Code, the mod shows it once as a toast and then keeps the newest one in a row above the prompt. Press D to dismiss it or O to open Augur. Alerts that were already waiting when the mod first loaded do not get a toast, so installing it does not set off a burst of them.
How it talks to Augur
Augur saves usage.json after each refresh and keeps alerts.json beside it. The mod only reads those two files. Dismissing an alert appends a line like {"id":"a1b2c3","at":"2026-10-03T20:00:00.000Z","by":"claude"} to alerts-acks.jsonl in the same folder, and on its next check Augur clears that alert in the panel and on a paired phone.
Augur's installer copies this folder to ~/.augur/claude-mod and adds that path to CLAUDE_CODE_PLUGIN_DIRS in ~/.claude/settings.json. It also writes augur-app.json into the copy, naming the usage file and the Augur program. If that file is missing, the mod reads ~/.augur/usage.json and leaves out the Open Augur button.
Changing it
The formatting lives in hooks/view.ts as plain functions, and hooks/register.tsx connects them to Claude Code. The tests in tests/augur.test.ts run against a fake file system and clock.
claude plugin validate apps/claude-mod
claude plugin test apps/claude-mod
For tsc -p ., put Claude Code's claude-code.d.ts and the tsconfig.json from the top of that file into .claude-plugin/types/. That folder is ignored by git because the declarations belong to whichever Claude Code version you have.
