sivori/claude-mods/tree/main/plugins/commit-drift
commit-drift
适用于 [Claude Code](https://claude.com/claude-code) 的小型 mod:状态栏、提示框上方的栏位、停靠面板和收音机。每个都是 function hooks 插件。
关于这个 mod
claude-mods
适用于 Claude Code 的小型 mod:状态栏、提示框上方的栏位、停靠面板和收音机。每个都是 function hooks 插件。
安装
claude plugin marketplace add sivori/claude-mods
claude plugin install radio@claude-mods # 或下面的任意 mod
稍后使用 claude plugin marketplace update claude-mods 更新。
如果不想安装,先克隆仓库,然后运行 claude --plugin-dir ./plugins/<mod> 试用。
这些 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画作文件夹。
开发
每个 mod 都位于 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
