dalbom/rev2agent/tree/main/.claude/skills/reviewer2
reviewer2
一個 Claude Code skills-directory 外掛,會在每次回答後,讓 Reviewer 2 的一句旁白出現在提示輸入框上方的對話泡泡中,並使用模型選擇的頭像。
關於這個 mod
reviewer2 是一個 Claude Code mod,從工作階段主要工作目錄的 .claude/skills/reviewer2/ 以 <name>@skills-dir 載入。在 Rev2Agent 根目錄開啟的工作階段中,每次主要迴圈回答後,它都會呼叫小型模型產生 Reviewer 2 的一句旁白,並在提示輸入框上方顯示對話泡泡,旁邊放上模型選擇的頭像。鉤子包括:turn.start 清除泡泡,turn.complete 啟動背景模型呼叫;子代理工作階段、中斷、拒絕和錯誤都不會顯示旁白。模型呼叫使用 $.model.complete,effort 為 low,輸出 300 個 token,逾時 30s,最多同時執行兩個。回覆第一行會在方括號中寫出頭像([skeptical]);顯示 SKIP 時不顯示任何內容;未知 id 會回退到清單預設值。泡泡按工作階段儲存在 $.store 中(保留最近 20 個工作階段),從不加入對話。.claude-plugin/plugin.json 中的 userConfig 暴露 enabled 和 model(sonnet 或 haiku)的 /config 列;命令包括 /reviewer2、/reviewer2 status、/reviewer2 on|off 和 /reviewer2 again。檔案包括:hooks/register.ts(事件連接、命令、儲存)、hooks/bubble.ts(負載、回覆解析、頭像目錄、SVG、儲存索引)、prompts/system.txt、avatars/(128px 圓形 PNG 和 manifest.json)以及 tests/。需要 Claude Code 2.1.287 或更新版本。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add dalbom/rev2agent claude plugin install reviewer2
原文 / README
reviewer2
A Claude Code mod. In a session opened at a Rev2Agent checkout's root, after each main-loop answer it asks a small model for Reviewer 2's one-line aside and shows it in a speech bubble above the prompt, beside an avatar the model picks for the line. User-facing notes are in the repository README under "Reviewer 2 bubble".
How it is loaded
The folder is a skills-directory plugin: Claude Code loads .claude/skills/<name>/ of the session's primary working directory as <name>@skills-dir once the folder is trusted. So the mod runs only for sessions opened at the repository root, and nobody installs it. As a second guard, hooks/register.ts serves a session only when its project root has prompts/agent_workflow.md and prompts/conventions.md.
Mods need Claude Code 2.1.287 or later. Older builds skip the hooks module.
Behaviour
turn.startkeeps the prompt and takes the bubble down.turn.completestarts the model call in the background and returns at once. Subagent turns, interruptions, refusals and errors get no aside.- The model call is
$.model.completeon the session's own client: themodeloption (sonnet by default), effortlow, 300 output tokens, 30 s timeout. At most two run at once. - The reply's first line names an avatar in brackets (
[skeptical]); the rest is the aside.SKIPshows nothing. An unknown id falls back to the manifest's default. - While the model drafts, the band shows the
thinkingavatar with…(terminal: a dim line). Nothing shows while the assistant is working. - The bubble is saved per session in
$.store, so a resume or a reload shows it again until the next prompt. The 20 most recent sessions are kept. - The aside is drawn only. It never enters the conversation.
Settings and commands
userConfig in .claude-plugin/plugin.json gives two /config rows:
| Option | Default | |
| --- | --- | --- |
| enabled | true | Draft an aside after each answer |
| model | sonnet | sonnet or haiku |
/reviewer2 (or /reviewer2 status) shows the state and the last result. /reviewer2 on|off changes the enabled row through $.config.set, which reloads the module with the new value. /reviewer2 again drafts an aside for the last answer once more, even when off.
Files
| File | What it holds |
| --- | --- |
| hooks/register.ts | Event wiring: turns, the bubble, /reviewer2, storage |
| hooks/bubble.ts | Pure logic: payload, reply parsing, avatar catalog, SVG, storage index |
| prompts/system.txt | Reviewer 2's system prompt (the mod appends the reply format and avatar list) |
| avatars/ | 128 px round PNGs and manifest.json, exported by assets/avatars/slice_avatars.py |
| tests/ | claude plugin test suites |
Development
claude plugin validate .claude/skills/reviewer2
claude plugin test .claude/skills/reviewer2
An interactive session watches a skills-directory plugin and reloads the hooks module on save. To redraw or add avatars, generate 3x3 sheets into assets/avatars/sheets/ with the prompts in assets/avatars/PROMPTS.md (the sheets are not in git), update SHEETS in assets/avatars/slice_avatars.py, and run it; it rewrites avatars/ here.
