ClaudeMods
☰
JA
● — 人がオンライン ・閲覧 — 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 KilimcininKorOglu

council

モデルがツールを呼び出すか、`/council <question>` を実行したときに難しい問題をモデル評議会へ尋ねます。Claude モデルは、gemini-core にキーがある場合は Gemini モデルも並行して回答し、セッションのモデルが回答から1つの判定を書きます。

KilimcininKorOglu@KilimcininKorOglu

KilimcininKorOglu/claude-code-mods/tree/main/plugins/council

翻訳済み

この mod について

council

一度試すだけでは解決しない問題があります。同じエラーが修正のたびに残る場合や、2つの設計がどちらも正しく見える場合です。別の意見は役に立ち、独立した意見が複数あればさらに役立ちます。この Mod は問題をモデル評議会に尋ねます。各メンバーが同じ質問に独自に答え、セッション自身のモデルが議長として回答を1つの判定にまとめます。モデルが行き詰まったときはツールで呼び出し、自分で /council <question> を実行することもできます。

できること

  1. メンバーは Opus 5.5、Sonnet 5、Fable 5.1、Haiku 4.5 です。gemini-core がインストールされキーを持つ場合は gemini-3.8-flash も加わります。gemini-core がない、またはキーがない場合は Gemini メンバーをスキップし、理由を結果に示します。/council members で一覧を変更できます。
  2. すべてのメンバーが同時に尋ねられます。
    • セッション自身のモデルで動くメンバーは $.model.fork でセッションをフォークし、prompt cache から会話全体を読みます。
    • それ以外の Claude メンバーは $.model.complete を通じて会話をテキストで受け取り、high effort で動きます。400,000 文字を超えると最長のツール出力からカットし、次に古いメッセージを除外します。Haiku 4.5 は最大 560,000 文字を読みます。ウィンドウが 200k token だからです。
    • Gemini メンバーは gemini-core を通じて同じテキストを受け取ります。gemini-core がキー、ティア、思考レベルを保持します。各リクエストが自身のモデルを指定するため、gemini-core 0.3.0 以降が必要です。
  3. 議長もセッションをフォークします。モデル名ではなく文字ラベル(Member A、Member B)の下で回答を読み、メンバーが一致した点、意見が分かれた点、会話がどちらを支持するか、見落とした点、次のステップを書きます。
  4. 呼び出し元は判定とすべての回答を読みます。各回答には文字、モデル、時刻が付きます。失敗したメンバーは理由付きで示されます。誰も回答しなければ、各理由とともに呼び出しを拒否し、議長は実行しません。
  5. サブエージェントからの呼び出しは会話を送りません。フォークと $.session.messages() がメインスレッドを読むためです。その後、各メンバーと議長には質問だけが completion として渡ります。

モデルが呼び出すタイミング

ツールは question 入力を1つ持つ mcp__council__convene です。ToolSearch なしで一覧に入り、システム prompt の注記が呼び出すタイミングをモデルに伝えます。

  • 同じエラーが修正の試行 2 回後も残ったとき。
  • 調査しても根本原因が不明なとき。
  • 実際のトレードオフがある2つの設計から選ぶ必要があるとき。
  • 取り消しにくい変更の前。

注記はセッション開始時と /clear に固定されるため、/council on はすぐモデルにツールを与え、注記は次の /clear またはセッションから有効になります。モデルが呼び出す回数に制限はありません。設定はすべてのウィンドウで共有されます。別のウィンドウで /council on を実行すると、このウィンドウのモデルは次のターンでツールを得て、次の /clear またはセッションで注記を得ます。そこから /council off を実行すると、ここではすぐツールが拒否します。

表示されるもの

sidebar を開くと、実行の後に常設セクションが続きます。質問と実行時間、各メンバーの状態語(running は黄色、answered は時間と token 付きの緑、failed は理由付きの赤)、議長、最後に判定の最初の語句です。各モデル名は family ごとに色分けされます。opus は赤、fable は黄、sonnet は緑、haiku は薄色、Gemini は青です。

council: run
avg.js boş dizi için ne dönmeli: NaN, 0, yoksa hata mı fırl… · done in 44s
opus 5.5 · fork · answered 11s · 89k in, 902 out
sonnet 5.5 · complete · answered 17s · 6.7k in, 1.1k out
fable 5.1 · complete · answered 24s · 6.7k in, 1.4k out
haiku 4.5 · complete · answered 9s · 5.2k in, 634 out
gemini-3.8-flash · gemini · answered 8s · 4.7k in, 1.3k out · free tier
chair · opus 5.5 · fork · done 20s

sidebar を閉じると最後に1行が表示されます。

council: 1 of 2 members answered in 4s; the chair wrote the verdict

コマンド

/council                               on or off, the members, the chair, the last run (also /council status)
/council on | off                      whether the model has the tool; off by default
/council members                       the members
/council members <model> ...           opus, sonnet, fable, haiku, a claude- id, a gemini- or gemma- id
/council members reset                 the default members
/council <question>                    runs the council now, also while it is off

/council <question> はすぐ convened: 5 members と回答します。メンバーと議長が回答すると、Mod は /council:send で判定をモデルへ渡します。モデルはそれを自分へのメッセージとして読み、そこから得たものを伝えます。その間に実行中のターンがあれば、ターンの終了まで保持されます(2.1.283 で測定)。

コスト

各実行はメンバーごとに1リクエスト、議長に1リクエストを作ります。Claude Code 2.1.283 で測定しています。

  • デフォルトの5メンバーの実行は 25〜44 秒かかり、最も遅いメンバーがペースを決めます。フォークは 4〜11 秒で、短いセッションではキャッシュから会話を読みます(83k token)。
  • 400,000 文字の会話(デフォルトの上限)は、Opus 5.5、Sonnet 5、Fable 5.1 で 163,828 入力 token、Haiku 4.5 で 128,018、gemini-3.8-flash で 120,057 です。

全 400,000 文字でリスト価格を使うと、1回あたり約 $2.20 の見積もりです。Fable 5.1 は約 $1.70(入力 token 百万あたり $10)、Sonnet 5.5 は約 $0.34(Sonnet 5 と同じリスト価格で、測定したのは Sonnet 5 の token 数)、Haiku 4.5 は約 $0.13、2つのフォークはキャッシュ読み取りが数セントです。会話が短ければ比例して安くなります。Claude サブスクリプションではリクエストが使用量上限に数えられます。コストを下げるには /council members でメンバーを外します。例:/council members opus sonnet haiku gemini-3.8-flash。

チェックでは gemini-3.1-pro-preview がすべての無料ティアキーで HTTP 429 を返しました。無料ティアにそのモデルの quota がないためです。料金付きのキーがある場合だけメンバーに追加してください。

インストール

claude plugin marketplace add KilimcininKorOglu/claude-code-mods
claude plugin install council@kilimcininkoroglu-mods

関数フックはアーリーアクセスです。Claude Code 2.1.288 以降はデフォルトで読み込むので、切り替えるものはありません。

インストール後

  1. Claude Code を再起動します。
  2. モデルが自分で評議会を呼ぶなら /council on を実行します。インストール後はオフで、/council <question> はどちらでも動きます。
  3. Gemini メンバーには gemini-core 0.3.0 以降をインストールしてキーを与えます(README 参照)。評議会はそれに依存せず、なくても Claude メンバーだけで実行できます。

オプション

| Option | Default | What it sets | |---|---|---| | maxInputChars | 400000 | セッションをフォークしない場合に各メンバーが読む会話の文字数。20,000〜2,000,000 |

到達範囲

Claude Code 2.1.283 で claude plugin validate により検証済みです。

❯ ./register.ts hooks: session.start, turn.start, classic.SessionStart, command.run{command=council}, prompt.section{name=env_info_simple}, tool.describe{tool=/"^mcp__council__convene$"/}, tool.call{tool=/"^mcp__council__convene$"/}, turn.step
❯ ./register.ts calls: $.clock.after (via runManual), $.clock.now (via askClaude, askGemini, askGeminiModel, convene, drawRun, ended, verdictOf), $.command.register, $.command.run (via send), $.gemini.enroll (via enrollGemini), $.gemini.read (via askGeminiModel), $.gemini.request (via askGeminiModel), $.gemini.settings (via geminiReach), $.http.fetch (via askGeminiModel), $.model.complete (via askChair, askClaude), $.model.fork (via askChair, askClaude), $.prompt.submit (via send), $.session.messages (via contextOf), $.sidebar.set (via drawRun), $.store.delete (via runCommand), $.store.get (via isEnabled, membersNow), $.store.set (via runCommand, storeEnabled), $.tool.register (via declareTool), $.ui.log (via enrollGemini, runManual, send, toPerson)

Reach L3:メンバーごとに1リクエスト、議長に1リクエストです。

1. 読み取り:メインスレッドの会話、質問、各メインループリクエストのモデル
2. 実行:プロセスなし
3. 送信:Claude Code 自身の API 接続を通じて各 Claude メンバーへ会話と質問を送り、gemini-core を通じて各 Gemini メンバーと Google へ送ります
4. 永続化:$.store にオン/オフ設定とメンバーリストを保存し、実行自体はメモリ内に置きます
5. 悪意ある入力:回答はモデルが読むテキストで、実行されません。メンバー ID は Gemini URL に届く前に [a-z0-9.-] に一致する必要があり、無料ティアの Gemini キーがあれば Google は送られた内容を読めます。

制限

  • 各メンバーは送られた内容から回答します。フォークしないメンバーは会話をテキストとして maxInputChars でカットして読むため、カットされた部分を見逃す可能性があります。
  • 議長はセッションのモデルで動き、自分の family の回答も判断します。文字はどのモデルの回答かを隠しますが、回答内容は隠しません。
  • メンバーまたは議長の回答は思考を含めて 8,192 token に制限され、5分経っても回答しないメンバーは失敗と数えます。
  • Gemini HTTP 503 の後は gemini-core が指定する待機なしにリクエストを直ちに再送します。$.clock.sleep が hook の 10秒予算に入るためです(2.1.283 で測定)。短い再試行3回が同じ負荷に当たることがあります。
  • 2.1.283 で、プラグインツール呼び出しがタイムアウトなしに 333 秒実行されました。2.1.277 では上限が 60 秒だったため、古い Claude Code は遅い実行を途中で切る可能性があります。

開発

make install     # eslint, typescript-eslint, typescript
make lint        # complexity limit 10, the build fails above it
make typecheck   # needs .claude/types/ from /plugin-types with --plugin-dir ../sidebar --plugin-dir ../gemini-core
make validate
make test        # claude plugin test

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add KilimcininKorOglu/claude-code-mods
claude plugin install council@kilimcininkoroglu-mods
原文 / README

council

Some problems do not yield to one more attempt: the same error survives every fix, or two designs each look right. A second opinion helps, and several independent ones help more. This mod asks a council of models about the problem: each member answers the same question on its own, and the session's own model, as the chair, turns their answers into one verdict. The model calls it through a tool when it is stuck, and you can run it yourself with /council <question>.

What it does

  1. The members are Opus 5.5, Sonnet 5, Fable 5.1 and Haiku 4.5, plus gemini-3.8-flash when gemini-core is installed and has a key. Without gemini-core, or without a key, the Gemini members are skipped and the result says why. /council members changes the list.
  2. Every member is asked at the same time:
    • The member that runs on the session's own model forks the session with $.model.fork, so it reads the whole conversation from the prompt cache.
    • Every other Claude member gets the conversation as text through $.model.complete, at high effort. Above 400,000 characters the longest tool outputs are cut first, then the oldest messages are left out. Haiku 4.5 reads at most 560,000 characters, because its window is 200k tokens.
    • A Gemini member gets the same text through gemini-core, which holds the key, the tier and the thinking level. It needs gemini-core 0.3.0 or later, because each request names its own model.
  3. The chair forks the session too. It reads the answers under letters (Member A, Member B), not model names, and writes where the members agree, where they disagree and which side the conversation supports, what they missed, and the next step.
  4. The caller reads the verdict and every answer, each headed with its letter, model and time. A member that failed is named with its reason. When no member answers, the call is refused with each reason, and no chair runs.
  5. A call from a subagent sends no conversation, because a fork and $.session.messages() read the main thread. Every member and the chair then get the question alone, as a completion.

When the model calls it

The tool is mcp__council__convene with one question input. It is listed without ToolSearch, and a note in the system prompt tells the model when to call it:

  • the same error survived two attempts to fix it;
  • the root cause is still unclear after it investigated;
  • it has to choose between two designs that each have real trade-offs;
  • before a change that is hard to undo.

The note is fixed at the session's start and at /clear, so /council on gives the model the tool at once and the note from the next session. There is no limit on how often the model calls it. The setting is shared by every window: a /council on in another window gives this window's model the tool at its next turn and the note at its next /clear or session, and a /council off there makes the tool refuse here at once.

What you see

With the sidebar open, a standing section follows the run: the question and how long the run has taken, then every member with its state word (running yellow, answered green with its time and tokens, failed red with the reason), then the chair, and finally the first words of the verdict. Each model's name is coloured by its family: opus red, fable yellow, sonnet green, haiku faint, Gemini blue.

council: run
avg.js boş dizi için ne dönmeli: NaN, 0, yoksa hata mı fırl… · done in 44s
opus 5.5 · fork · answered 11s · 89k in, 902 out
sonnet 5.5 · complete · answered 17s · 6.7k in, 1.1k out
fable 5.1 · complete · answered 24s · 6.7k in, 1.4k out
haiku 4.5 · complete · answered 9s · 5.2k in, 634 out
gemini-3.8-flash · gemini · answered 8s · 4.7k in, 1.3k out · free tier
chair · opus 5.5 · fork · done 20s

With the sidebar closed, you get one line at the end:

council: 1 of 2 members answered in 4s; the chair wrote the verdict

Command

/council                               on or off, the members, the chair, the last run (also /council status)
/council on | off                      whether the model has the tool; off by default
/council members                       the members
/council members <model> ...           opus, sonnet, fable, haiku, a claude- id, a gemini- or gemma- id
/council members reset                 the default members
/council <question>                    runs the council now, also while it is off

/council <question> answers convened: 5 members at once. When the members and the chair have answered, the mod hands the verdict to the model through /council:send, so the model reads it as your message and tells you what it takes from it. A turn that is running meanwhile holds it until the turn ends (measured on 2.1.283).

Cost

Each run makes one request per member and one for the chair. Measured on Claude Code 2.1.283:

  • A run of the five default members took 25 to 44 seconds; the slowest member sets the pace. Forks took 4 to 11 seconds and read the conversation from the cache (83k tokens in a short session).
  • 400,000 characters of conversation, the default limit, are 163,828 input tokens on Opus 5.5, Sonnet 5 and Fable 5.1, 128,018 on Haiku 4.5 and 120,057 on gemini-3.8-flash.

At list prices, one run at the full 400,000 characters costs about $2.20, estimated: Fable 5.1 about $1.70 ($10 per million input tokens), Sonnet 5.5 about $0.34 (the same list price as Sonnet 5, whose token count the check measured), Haiku 4.5 about $0.13, and the two forks a few cents of cache reads. A shorter conversation costs proportionally less. On a Claude subscription the requests count toward your usage limits instead. To lower the cost, leave a member out with /council members, for example /council members opus sonnet haiku gemini-3.8-flash.

gemini-3.1-pro-preview answered HTTP 429 on every free-tier key in the check, because the free tier has no quota for it. Add it to the members only with a paid key.

Install

claude plugin marketplace add KilimcininKorOglu/claude-code-mods
claude plugin install council@kilimcininkoroglu-mods

Function hooks are early access. Claude Code 2.1.288 and later load them by default, so there is nothing to switch on.

After installing

  1. Restart Claude Code.
  2. Run /council on if the model should call the council by itself. It is off after an install, and /council <question> works either way.
  3. For Gemini members, install gemini-core 0.3.0 or later and give it a key (see its README). The council does not depend on it and runs with Claude members alone without it.

Options

| Option | Default | What it sets | |---|---|---| | maxInputChars | 400000 | How much of the conversation, in characters, each member reads when it does not fork the session; from 20,000 to 2,000,000 |

What it can reach

Validated with claude plugin validate on Claude Code 2.1.283:

❯ ./register.ts hooks: session.start, turn.start, classic.SessionStart, command.run{command=council}, prompt.section{name=env_info_simple}, tool.describe{tool=/"^mcp__council__convene$"/}, tool.call{tool=/"^mcp__council__convene$"/}, turn.step
❯ ./register.ts calls: $.clock.after (via runManual), $.clock.now (via askClaude, askGemini, askGeminiModel, convene, drawRun, ended, verdictOf), $.command.register, $.command.run (via send), $.gemini.enroll (via enrollGemini), $.gemini.read (via askGeminiModel), $.gemini.request (via askGeminiModel), $.gemini.settings (via geminiReach), $.http.fetch (via askGeminiModel), $.model.complete (via askChair, askClaude), $.model.fork (via askChair, askClaude), $.prompt.submit (via send), $.session.messages (via contextOf), $.sidebar.set (via drawRun), $.store.delete (via runCommand), $.store.get (via isEnabled, membersNow), $.store.set (via runCommand, storeEnabled), $.tool.register (via declareTool), $.ui.log (via enrollGemini, runManual, send, toPerson)

Reach L3: one request per member and one for the chair.

1. Reads:    the conversation of the main thread, the question, and the model of each main-loop request
2. Runs:     no process
3. Sends:    the conversation and the question to each Claude member through Claude Code's own API connection, and to Google for each Gemini member through gemini-core
4. Persists: in $.store, the on/off setting and the member list; a run lives in memory
5. Hostile input: the answers are text the model reads and never run; a member id must match [a-z0-9.-] before it reaches a Gemini URL; a free-tier Gemini key lets Google read what it is sent

Limits

  • Every member answers from what it is sent. A member that does not fork reads the conversation as text, cut at maxInputChars, so it can miss what was cut.
  • The chair runs on the session's model and judges answers from its own family too; the letters hide which answer came from which model, not what the answers say.
  • A member or chair answer is capped at 8,192 tokens, thinking included, and a member that has not answered after 5 minutes counts as failed.
  • After a Gemini HTTP 503 the request goes out again at once, without the wait gemini-core names, because $.clock.sleep counts against the hook's 10-second budget (measured on 2.1.283). Three quick retries can all hit the same load.
  • Measured on 2.1.283: a plugin tool call ran 333 seconds without a timeout. On 2.1.277 the limit was 60 seconds, so an older Claude Code can cut a slow run short.

Development

make install     # eslint, typescript-eslint, typescript
make lint        # complexity limit 10, the build fails above it
make typecheck   # needs .claude/types/ from /plugin-types with --plugin-dir ../sidebar --plugin-dir ../gemini-core
make validate
make test        # claude plugin test

バッジを取得

あなたのプロジェクトですか?このバッジを README やサイトに貼ると、このページにリンクします。

Featured on ClaudeMods
サイズ
テーマ
Markdown
HTML

同名の他の作品

関連作品