sivori/claude-mods/tree/main/plugins/commit-drift
commit-drift
適用於 [Claude Code](https://claude.com/claude-code) 的小型外掛:狀態列、提示列上方的列、停駐面板和收音機。每個都是 function hooks 外掛。
關於這個 mod
claude-mods
適用於 Claude Code 的小型外掛:狀態列、提示列上方的列、停駐面板和收音機。每個都是 function hooks 外掛。
安裝
claude plugin marketplace add sivori/claude-mods
claude plugin install radio@claude-mods # 或下面的任一外掛
之後使用 claude plugin marketplace update claude-mods 更新。
如果不想安裝,先複製儲存庫,然後執行 claude --plugin-dir ./plugins/<mod> 試用。
這些外掛
radio
/tune 會在 Claude Code 中串流網路收音機:SomaFM、lo-fi、古典樂和合唱音樂。(使用 /tune 是因為 Claude Code 已內建 /radio。)所有工作階段共用一個播放器,因此在兩個工作階段啟動的音樂不會播放兩次。在任何工作階段切換電台都會取代目前串流,狀態列會在各處顯示正在播放的內容。播放時,提示列上方會有一列按鈕:◀ ■ ▶ 用於切換或停止,− + 用於調整音量。停止後這一列仍會保留,其中的 play 按鈕可以恢復上一個電台。
/tune 切換(恢復上一個電台);/tune listen 只播放
/tune groove 依名稱、類型("jazz"、"choral")或編號選擇
/tune next | prev | stop | list
/tune vol 30 也支援 vol +10 / vol -10
/tune band 隱藏或顯示按鈕
透過 mpv(brew install mpv)播放,它可以無間斷地變更音量;否則使用 ffmpeg 的 ffplay,每次變更音量都會重新啟動串流。
預設情況下,關閉 Claude Code 後音樂仍會繼續播放,直到 /tune stop。在 /config 中開啟 stopWithLastSession,可讓它在沒有工作階段開啟後停止;即使工作階段當機,看門狗也會在大約 1 分鐘內捕捉到。
spend-meter
狀態列顯示工作階段成本、上下文填充量和 5 小時速率限制使用量($1.23 · ctx 42% · 5h 24%)。當支出超過 $5、$10、$25、$50 和 $100 時各提示一次。
commit-drift
在狀態列顯示未提交的檔案數和距離上次提交的時間,針對你正在編輯的任何儲存庫。在一個尚未提交的樹上完成編輯工作階段 30 分鐘以上後,它會提醒你(最多每 10 分鐘一次)。
backlog-band
在提示列上方顯示目前儲存庫 BACKLOG.md 中開啟的 ## Now 項目。/later <item> 會附加到 ## Next,/backlog-band 會隱藏或顯示這一列。它要求使用以下格式:
## Now
- [ ] Blocking or imminent work
## Next
- [ ] The normal queue
## Someday
- [ ] Ideas
## Done
- [x] 2026-08-01 Completed
day-recap
讓你不再冷啟動。工作時,它會記錄你的提示、編輯的檔案和建立的提交。工作階段安靜 10 分鐘後,它會請模型產生兩行摘要(完成了什麼、下一步是什麼),並依儲存庫儲存。下次你在該儲存庫開啟 Claude Code 時,第一次提示前會顯示摘要:
↩ Last time in dash · yesterday 5:12pm
Done: Added the spend chart and matched its colors.
Next: Write a test for the empty-data case.
現在執行 /recap 可以立即寫入,/recap last 可以取回上一次的摘要。沒有做任何事的工作階段會保留之前的摘要。如果在摘要寫入前退出,下一個工作階段會根據記錄的活動和 Haiku 寫入摘要。
quest-board
在面板中顯示 3 個每日任務,取自目前儲存庫:一個要解決的 TODO/FIXME 註解、一個要關閉的開放 GitHub issue(需要 gh),以及一個未通過的測試指令。能選到時每類各選一個,整天保持同一塊任務板,隔天重新產生。TODO 行消失、issue 關閉或測試指令通過後,任務會自動清除。每個清除的任務都會顯示通知,全部 3 個清除後會顯示更大的提示。狀態列顯示 ⚔ quests 1/3。
/quests 開啟任務板
/quests reroll 將未完成的任務換成新的
/quests check 現在重新檢查 issue(否則每 10 分鐘檢查一次)
commonplace-pane
一個來自 Art Institute of Chicago 的公有領域畫作停駐面板。它的「天氣」跟隨你的儲存庫:樹乾淨時顯示平靜的風景,變更堆積或指令失敗時轉為陰天,暴風雨時顯示沉船。畫作每 20 分鐘輪換一次,/commonplace next 會掛上一幅新的畫。
影像需要支援 kitty 圖形通訊協定的終端機(kitty、Ghostty);其他地方的面板會顯示標題和藝術家。它使用 macOS sips 轉換影像。畫作快取於 ~/.cache/commonplace-pane/,保留最新的 30 幅,並在每幅新畫之後刪除其餘畫作。/config 中有兩個選用設定:
- contact:傳送到博物館
AIC-User-Agent標頭中的電子郵件或 URL,符合 Art Institute 對 API 使用者端的要求。 - seedDir:博物館無法連線時用作備用的
seed-*.jpg畫作資料夾。
開發
每個外掛都位於 plugins/<name>/,包含 .claude-plugin/plugin.json、hooks/hooks.json 和 hooks/register.ts(x) 模組。檢查方式:
claude plugin validate plugins/<name>
claude plugin test plugins/<name>
授權
MIT
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add sivori/claude-mods claude plugin install commit-drift
原文 / README
claude-mods
Small mods for Claude Code: status lines, a band above the prompt, a docked pane, and a radio. Each one is a plugin of function hooks.
Install
claude plugin marketplace add sivori/claude-mods
claude plugin install radio@claude-mods # or any mod below
Update later with claude plugin marketplace update claude-mods.
To try one without installing, clone the repo and run claude --plugin-dir ./plugins/<mod>.
The mods
radio
/tune streams internet radio inside Claude Code: SomaFM, lo-fi, classical and choral. (The command is /tune because Claude Code has a built-in /radio.) All your sessions share one player, so music started in two sessions never plays twice. Switching stations in any session replaces the current stream, and the status line shows what's playing everywhere. While something plays, a row of buttons sits above the prompt: ◀ ■ ▶ to change or stop, − + for volume. Stopping keeps the row, with a play button that resumes the last station.
/tune toggle (resumes the last station); /tune listen just plays
/tune groove pick by name, genre ("jazz", "choral") or number
/tune next | prev | stop | list
/tune vol 30 also vol +10 / vol -10
/tune band hide or show the buttons
Plays through mpv (brew install mpv), which changes volume without a gap; otherwise ffplay from ffmpeg, which restarts the stream on each volume change.
By default the music keeps playing after you close Claude Code, until /tune stop. Turn on stopWithLastSession in /config to have it stop once no session is open; a watchdog catches a crashed session too, within about a minute.
spend-meter
Session cost, context fill and 5-hour rate-limit use in the status line ($1.23 · ctx 42% · 5h 24%). It toasts once as spend passes $5, $10, $25, $50 and $100.
commit-drift
Uncommitted file count and time since the last commit in the status line, for whichever repo you're editing. After an editing turn on a tree that hasn't been committed for 30+ minutes, it nudges you (at most every 10 minutes).
backlog-band
Shows the open ## Now items of the active repo's BACKLOG.md above the prompt. /later <item> appends to ## Next, and /backlog-band hides or shows the band. It expects this format:
## Now
- [ ] Blocking or imminent work
## Next
- [ ] The normal queue
## Someday
- [ ] Ideas
## Done
- [x] 2026-08-01 Completed
day-recap
So you never start cold. While you work it records your prompts, the files edited and the commits made. Once the session has been quiet for 10 minutes, it asks the model for a two-line recap (what got done, the next step) and saves it per repo. When you next open Claude Code in that repo, the recap sits above the prompt until your first message:
↩ Last time in dash · yesterday 5:12pm
Done: Added the spend chart and matched its colors.
Next: Write a test for the empty-data case.
/recap writes it now, and /recap last brings back the one from last time. A session that did nothing leaves the earlier recap in place. If you quit before the recap is written, the next session writes it from the recorded activity with Haiku.
quest-board
Three daily quests in a pane, drawn from the active repo: a TODO/FIXME comment to resolve, an open GitHub issue to close (needs gh), and a test command that failed to get passing. It picks one of each kind when it can, keeps the same board all day, and draws a new one tomorrow. A quest clears by itself when the TODO line is gone, the issue is closed or the test command passes. Each cleared quest gets a toast, and clearing all three gets a bigger one. The status line shows ⚔ quests 1/3.
/quests open the board
/quests reroll swap the unfinished quests for new ones
/quests check re-check the issues now (otherwise every 10 minutes)
commonplace-pane
A docked pane of public-domain paintings from the Art Institute of Chicago. Its "weather" follows your repo: calm landscapes while the tree is clean, overcast as changes pile up or commands fail, shipwrecks in a storm. The painting rotates every 20 minutes, and /commonplace next hangs a new one.
The images need a terminal with the kitty graphics protocol (kitty, Ghostty); elsewhere the pane shows the title and artist. It uses macOS sips to convert images. Paintings are cached in ~/.cache/commonplace-pane/, which keeps the newest 30 and deletes the rest after each new painting. Two optional settings live in /config:
- contact: an email or URL sent in the museum's
AIC-User-Agentheader, as the Art Institute asks of API clients. - seedDir: a folder of
seed-*.jpgpaintings to fall back on when the museum is unreachable.
Developing
Each mod is plugins/<name>/ with .claude-plugin/plugin.json, hooks/hooks.json and a hooks/register.ts(x) module. To check one:
claude plugin validate plugins/<name>
claude plugin test plugins/<name>
License
MIT
