consult について
consult は、Gemini、Codex、Claude に分析やレビューを依頼するコマンドラインツールです。自由形式のプロンプト、プロトコルに沿ったレビュー、利用統計に対応しています。
主な機能
- 01Gemini、Codex、Claude への問い合わせ
- 02直接入力またはファイルのプロンプト
- 03仕様、計画、コード、プルリクエストのレビュー
- 04結果のファイル保存
- 05利用統計の確認
活用シーン
- 01実装計画への外部レビュー取得
- 02複数モデルによるプルリクエストのレビュー
- 03プロジェクトに関する一般的な質問
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ cluesmith/ codev --skill consultインストール後、Claude Code で/consultを入力して読み込まれたか確認します。
詳細
consult - AI コンサルティング CLI
外部の AI モデルにレビューや分析を依頼します。Gemini、Codex、Claude に対応しています。
概要
consult -m <model> [options]
consult stats [options]
consult stats を除き、-m / --model フラグは常に必須です。
モデル
| フラグの値 | エイリアス | 備考 |
|---|---|---|
gemini | pro | 高速(約120~150秒)、--yolo によるファイルアクセス |
codex | gpt | 詳細(約200~250秒)、シェルでの調査 |
claude | opus | ツール使用可能な Agent SDK(約60~120秒) |
すべてのフラグ
-m, --model <model> Model to use (required except stats)
--prompt <text> Inline prompt (general mode)
--prompt-file <path> Prompt file path (general mode)
--protocol <name> Protocol: spir, aspir, air, bugfix, tick, maintain
-t, --type <type> Review type (see below)
--issue <number> Issue number (required in architect context)
--output <path> Save result to file
--plan-phase <phase> Scope review to a plan phase (porch use)
--context <path> Context file with feedback (porch use)
--project-id <id> Project ID for metrics (porch use)
--days <n> Stats: limit to last N days (default: 30)
--project <id> Stats: filter by project ID
--last <n> Stats: show last N invocations
--json Stats: output as JSON
レビューの種類(--type)
| 種類 | 使用する場面 |
|---|---|
spec | 仕様の完全性をレビューする |
plan | 実装計画をレビューする |
impl | コードの実装をレビューする |
pr | マージ前にプルリクエストをレビューする |
phase | フェーズ単位のレビュー(ビルダーコンテキストのみ) |
integration | PR に対するアーキテクトの統合レビュー |
使用パターン
一般的な問い合わせ:
consult -m gemini --prompt "What's the best way to structure auth?"
consult -m codex --prompt-file review-checklist.md
プロトコルのレビュー:
consult -m gemini --type spec --issue 42
consult -m codex --type plan --issue 42
consult -m claude --type integration --issue 42
3者並列レビュー(cmap):
バックグラウンド実行では必ず --output を使用してください。指定しない場合、結果はガベージコレクションされる可能性のある一時ファイルに出力されます。
consult -m gemini --type integration --issue 42 --output /tmp/cmap-gemini-42.md &
consult -m codex --type integration --issue 42 --output /tmp/cmap-codex-42.md &
consult -m claude --type integration --issue 42 --output /tmp/cmap-claude-42.md &
wait
統計情報:
consult stats # 30-day summary
consult stats --days 7 --json # Last 7 days as JSON
consult stats --project 42 # Filter by project
ルール
- stats 以外のすべてのコマンドで
-mが必須です --promptと--typeは相互に排他的です(モードが異なります)--promptと--prompt-fileは相互に排他的です--protocolには--typeが必要です- アーキテクトコンテキスト(
.builders/の外)では、プロトコルレビューに--issueが必要です - ビルダーコンテキスト(
.builders/内)では、プロジェクトを porch の状態から自動検出します
コメント
Markdown 対応