ShriD5/claude-mods/tree/main/rubber-duck
关于这个 mod
每次 Edit、MultiEdit 或 Write 成功后,变更都会交给一个小型快速模型(默认是 Haiku),只问一个问题:这里真的有问题吗?它会检查被移除的错误处理、被删除或禁用的测试、被吞掉的异常、硬编码的机密或 URL、差一错误、发生变化的公共签名,或留下的 TODO。发现问题时会弹出通知,否则保持安静。/duck 会打开一个面板,列出最近 20 个担忧(时间、文件、担忧),并提供 Clear 按钮。它从不阻塞或拖慢编辑:审查会在工具调用返回后运行,失败时什么也不会发生。同一时间每个文件最多运行一次审查。锁文件、构建输出、压缩或生成的文件,以及超过 200 KB 的文件都会跳过。使用 claude --plugin-dir /path/to/claude-mods/rubber-duck 安装,或者将仓库加入市场后用 /plugin 安装。选项:model(默认 haiku)和 tellClaude(默认 false,会在下一条提示中把新担忧传给 Claude)。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add ShriD5/claude-mods claude plugin install rubber-duck
原文 / README
rubber-duck
A fast second opinion on every edit Claude makes.
After each successful Edit, MultiEdit or Write, the change goes to a small, fast model (Haiku by default) with one question: is there a real problem here? It looks for removed error handling, a deleted or disabled test, a swallowed exception, a hardcoded secret or URL, an off-by-one, a changed public signature, or a TODO left in. If it finds one you get a toast:
🦆 Removed error handling around fetch (api.ts)
Otherwise it stays quiet. /duck opens a pane with the last 20 concerns (time, file, concern) and a Clear button.
It never blocks or slows the edit: the review runs after the tool call has returned, and if it fails, nothing happens (details go to the debug log). At most one review per file runs at a time; if Claude edits a file again meanwhile, only the latest edit gets reviewed next. Lockfiles, build output (dist/, node_modules/, ...), minified or generated files, and files over 200 KB are skipped.
Install
claude --plugin-dir /path/to/claude-mods/rubber-duck
Or add the repo as a marketplace and install it with /plugin.
Options
| Option | Default | What it does |
| --- | --- | --- |
| model | haiku | the review model: an alias or a full model id |
| tellClaude | false | also pass new concerns to Claude with your next prompt, so it can fix them or call them false alarms |
How it works
A tool.call hook awaits next(e), takes the diff from the tool's own patch, and starts the review on a $.clock.after timer, which calls $.model.complete. Concerns live in $.state, which the /duck pane reads, and with tellClaude on a prompt.submit hook adds them to your next prompt as context.
