ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 ShriD5

rubber-duck

對 Claude 每次編輯都提供快速的第二意見。

已翻譯

關於這個 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.

更多類似作品