dalbom/rev2agent/tree/main/.claude/skills/reviewer2
reviewer2
Claude Code の skills-directory プラグイン。各回答の後、モデルが選んだアバター付きで Reviewer 2 の一言コメントをプロンプト上の吹き出しに表示する。
この mod について
reviewer2 は、セッションの主作業ディレクトリにある .claude/skills/reviewer2/ から <name>@skills-dir として読み込まれる Claude Code mod だ。Rev2Agent ルートで開いたセッションでは、メインループの回答ごとに小さなモデルを呼び、Reviewer 2 の一言コメントを生成する。モデルが選んだアバターと一緒に、プロンプトの上の吹き出しへ表示する。フックは turn.start で吹き出しを消し、turn.complete でバックグラウンドのモデル呼び出しを始める。サブエージェントのターン、中断、拒否、エラーにはコメントを付けない。モデル呼び出しは $.model.complete を使い、effort は low、出力は300 token、タイムアウトは30s、同時実行は最大2件だ。返答の1行目には角括弧内でアバター名([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.
