ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 sivori

commonplace-pane

一个停靠式窗格,展示芝加哥艺术学院的公版画作;天气会跟随代码仓库:干净时平静,有改动时风雨交加

sivori@sivori

sivori/claude-mods/tree/main/plugins/commonplace-pane

原帖图片1
已翻译

关于这个 mod

claude-mods

为 Claude Code 提供一些小型 mod:状态行、提示列上方的横条、停靠式窗格和收音机。每个 mod 都是 function hook 外挂。

Claude Code 终端中的 radio、backlog-band、spend-meter 和 commit-drift(插图)

安装

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              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

优先通过 mpv 播放(brew install mpv),它可以无缝调节音量;否则使用 ffmpeg 的 ffplay,每次调节音量都会重新启动串流。

默认情况下,关闭 Claude Code 后音乐仍会继续播放,直到执行 /tune stop。在 /config 中开启 stopWithLastSession 后,所有工作阶段都关闭时才会停止;即使工作阶段崩溃,watchdog 也会在约 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

在窗格中显示当前仓库的三个每日任务:一个要解决的 TODO/FIXME 注释、一个要关闭的 GitHub issue(需要 gh)和一个曾经失败、现在需要通过的测试命令。能找到时每类各选一个;当天保持同一块任务板,次日换新。TODO 行消失、issue 关闭或测试命令通过后,任务会自动清除。每项任务清除时都会提示,三项全部清除时会显示更大的提示。状态行显示 ⚔ quests 1/3。

/quests             打开任务板
/quests reroll      将未完成的任务换成新的任务
/quests check       立即重新检查 issue(否则每 10 分钟检查一次)

commonplace-pane

停靠式窗格展示 芝加哥艺术学院 的公版画作。它的“天气”会跟随你的仓库:树干净时显示平静的风景,改动累积或命令失败时转为阴天,风暴时显示沉船。画作每 20 分钟轮换一次,/commonplace next 会挂上一幅新的画。

图像需要支持 kitty graphics protocol 的终端(kitty、Ghostty);其他终端会在窗格中显示标题和艺术家。它使用 macOS 的 sips 转换图像。画作缓存在 ~/.cache/commonplace-pane/,只保留最新的 30 幅,每次出现新画作后删除其余内容。/config 中有两个可选设置:

  • contact:放在博物馆要求 API 客户端发送的 AIC-User-Agent 标头中的电子邮件或 URL。
  • seedDir:一组 seed-*.jpg 画作所在的资料夹;博物馆无法访问时作为后备。

开发

每个 mod 都位于 plugins/<name>/,包含 .claude-plugin/plugin.json、hooks/hooks.json 和 hooks/register.ts(x) 模块。检查某个 mod:

claude plugin validate plugins/<name>
claude plugin test plugins/<name>

授权

MIT

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add sivori/claude-mods
claude plugin install commonplace-pane
原文 / 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.

radio, backlog-band, spend-meter and commit-drift in a Claude Code terminal (illustration)

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-Agent header, as the Art Institute asks of API clients.
  • seedDir: a folder of seed-*.jpg paintings 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

更多类似作品