Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude hands work to one, or you mention it with @.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Anthropic の Advisor tool パターンを Claude Code に移植し、OpenAI Codex を助言役 (advisor) として利用するプラグインです。
Advisor パターンは「実行役 (executor) のモデルが、戦略的な岐路で別の高知能モデルに相談し、plan / course-correction の助言を受け取って続行する」構成です。本家は Anthropic API のサーバーサイド機能で advisor が Claude モデル限定のため、このプラグインは同パターンを Claude Code の hook + skill + wrapper script として再構成し、相談を Codex (別系統モデルの独立視点) に渡します。
v6.0.1
| 構成要素 | 役割 |
|---|---|
SessionStart hook (inject-advisor-rules) | メインセッション向けの利用規律 5 ルール (下記) を additionalContext として常時注入する |
SubagentStart hook (inject-advisor-rules-subagent) | 通常 subagent に advisor の許可境界を注入する。通常 subagent は wrapper を直接起動せず、self-contained な相談 request を親へ返す |
runner lifecycle hook (manage-codex-runners.mjs) | PreToolUse gate、PermissionDenied による拒否済み起動要求の解消、SubagentStart / SubagentStop の active・bounded retry (codex-advisor-runner の attestation footer 契約検証を含む)、Stop の reroute / 待機通知を管理する。auto mode では runner の最終 report が SubagentHandback tool 経由で届き SubagentStop の last_assistant_message には締めの文しか入らないため、PostToolUse (SubagentHandback) で report の footer / attestation を解析して state に記録し、SubagentStop がそれを採用する。runner state は UID + session ID で分離し、prompt / Codex 出力 (hand-back report の本文を含む) を保存しない |
Codex runner agents (codex-rescue-runner / codex-review-runner / codex-advisor-runner) | rescue / review / advisor の Codex 起動・job tracking・terminal output を subagent context に閉じ込める。起動 mode は Claude Code が決め、report は completion notification 経由で親へ届く |
/cross-model-advisor:consult skill | self-contained な XML 相談 prompt を組み立て、Claude Code では cross-model-advisor:codex-advisor-runner (model: "sonnet") を起動する。Codex host では PTY stdin wrapper を使う |
scripts/run-codex-job.sh | official companion v1.0.6 の task / review / status / result / cancel を runner 向けの path-only command に限定して公開する。status wait は単発 status の短い poll で構成する |
scripts/run-codex-advisor.sh | PTY / file-stdin adapter 契約と Codex host source を提供する wrapper。Claude Code の通常 Skill は直接呼ばず advisor runner を使う。Codex host では PTY stdin から direct read-only / ephemeral codex exec を foreground 起動し、既定 10 分の watchdog で process group を回収する |
openai-codex plugin の companion は workspace ごとに常駐 broker を起動して再利用します。broker は起動時の codex app-server を抱え続けるため、codex CLI を更新しても、更新前に起動した broker は古いバイナリのまま task / review を実行します。
scripts/run-codex-job.sh の rescue / advisor / review と、scripts/run-codex-advisor.sh の companion 経路は、companion を起動する直前に scripts/lib/stale-broker-guard.mjs を実行します (snapshot / status / result / cancel と、direct codex exec の経路では実行しません)。guard は broker 配下で動く codex app-server の実行ファイルが broker の起動より後に更新されているか、実行ファイルが無くなっていれば、その broker を止め、止めた broker の記録が残っていれば消して、止めた旨を stderr に 1 行出します。その後に起動する companion は、現行のバイナリで新しい broker を起動します。同じ broker で実行中の別の job は中断されます。
検出や停止に失敗した場合 (companion の内部 module を読み込めない、ps が失敗する、記録の pid が companion の broker でない、broker が停止しない等) は stderr に警告を 1 行出し、companion をそのまま起動します。guard は stdout に何も書かないため、companion の --json 出力や助言テキストには影響しません。
scripts/lib/stale-broker-guard.mjs は pre-push-codex-review の hooks/scripts/lib/stale-broker-guard.mjs の byte-identical なコピーです (同一性は tests/test_shared_lib_copies.py が検査します)。
| rule ID | 内容 |
|---|---|
rule:advisor-timing | いつ相談するか: 実質的な作業前 (オリエンテーションは含まない) / 完了宣言前 (成果物を durable にしてから) / 行き詰まり / 方針転換の検討時。短い反応的タスクでは相談しない |
rule:advisor-weight | 助言はフラットに扱う (自分の証拠・推論と Codex の助言を同じ土俵で突き合わせ、採否と理由を明示する。黙って無視しない)。証拠と助言が衝突し自分で判断できないときは、Codex に reconcile call (衝突を明示した再相談) を 1 回行う |
rule:advisor-boundary | 設計/仕様の決定はユーザ専権 (助言は AskUserQuestion の代替でない)。差分 finding は pre-push-review が担当し、review cadence の checkpoint (enforcement は pre-push-codex-review が担う) は根本方針の course-correction だけを相談する。Codex が使えないときは相談なしで続行し、理由をユーザ報告に含める |
rule:rescue-thread | cross-model-advisor:codex-rescue-runner に rescue を依頼する際は --resume / --fresh を常に Claude が自律決定して request に含め、thread 選択の AskUserQuestion を発行しない。--resume は「直前の rescue と同一論点の続き + 対象 rescue がセッション内で最新の再開可能 task (terminal 状態かつ threadId あり) と確実に分かる場合」のみで、それ以外・迷ったら --fresh。ユーザのフラグ明示指定が最優先 |
rule:codex-runner | rescue / review / advisor は完全修飾 runner を起動し (Codex 側は model: "sonnet")、起動 mode は指定しない (Claude Code が決める)。consult では codex-advisor-runner を起動する。runner の terminal report は completion notification 経由で後続ターンに届き、それを処理するまでタスクを完了扱いにしない。起動が classifier に拒否されたら同じ起動を繰り返さず AskUserQuestion で許可を得る |
公式ドキュメントの推奨プロンプト (timing block / advice block) の移植ですが、次の 2 点は意図的に変えています: (1)「最初のファイル変更前に必ず advisor を呼ぶ」型の hard rule は採用していません (公式実測で、強い executor への hard rule 追加は過剰呼び出しを招き純効果がゼロ〜マイナスと報告されているため)。(2) advice block の「助言を重く扱う」も採用せず、フラットな扱いに変更しています (下記の差分参照)。
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub natsuume/natsuume-cc-marketplace --plugin cross-model-advisorPlugins from other owners that cover similar ground