mcpField
C
consult

consult

github.com/cluesmith测试与质量29343 次安装1 天前更新
代码仓库

关于 consult

consult 是用于向 Gemini、Codex 和 Claude 请求分析与评审的命令行工具,支持通用提示词、协议化评审流程和使用统计。

主要功能

  1. 01调用 Gemini、Codex 和 Claude
  2. 02提交行内或文件提示词
  3. 03评审规范、计划、代码和拉取请求
  4. 04将结果保存到文件
  5. 05查看使用统计

适用场景

  1. 01获取实现计划的外部评审
  2. 02使用多个模型评审拉取请求
  3. 03向模型咨询一般项目问题

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/cluesmith/codev --skill consult

安装后在 Claude Code 中输入/consult确认已加载。

详细介绍

consult - AI 咨询命令行工具

向外部 AI 模型咨询评审和分析。支持 Gemini、Codex 和 Claude。

概要

consult -m <model> [options]
consult stats [options]

除 consult stats 外,始终必须指定 -m / --model 标志。

模型

标志值别名说明
geminipro速度快(约 120-150 秒),通过 --yolo 访问文件
codexgpt分析深入(约 200-250 秒),可探索 shell
claudeopus使用工具的 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架构师对拉取请求的集成评审

使用模式

常规查询:

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

三方并行评审(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