Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

workflow-multi-cli-plan工作流 multi CLI 计划

Agent Skill

workflow-multi-cli-plan 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,548

周安装

49

GitHub Stars

1,899

下载量

388
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:workflow-multi-cli-plan(工作流 multi CLI 计划)
来源仓库:https://github.com/catlog22/claude-code-workflow
仓库路径:skills/workflow-multi-cli-plan
安装命令:
npx skills add https://github.com/catlog22/claude-code-workflow --skill workflow-multi-cli-plan
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/catlog22/claude-code-workflow --skill workflow-multi-cli-plan

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 支持基于关键词、任务场景或来源线索进行信息筛选,适用于多 CLI 计划场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限与维护状态。
  • 安装前建议核实是否会触发联网、命令执行或文件读写操作。
  • 可结合原始 README 进一步了解具体用法和功能边界。

SKILL.md

Multi-CLI Collaborative Planning

Auto Mode

When workflowPreferences.autoYes is true: Auto-approve plan, use recommended solution and execution method (Agent, Skip review).

Context Source: ACE semantic search + Multi-CLI analysis Output Directory: .workflow/.multi-cli-plan/{session-id}/ Default Max Rounds: 3 (convergence may complete earlier) CLI Tools: @cli-discuss-agent (analysis), @cli-lite-planning-agent (plan generation) Execution: Auto-hands off to workflow-lite-execute after plan approval

Orchestrator Boundary (CRITICAL)

  • ONLY command for multi-CLI collaborative planning
  • Manages: Session state, user decisions, agent delegation, phase transitions
  • Delegates: CLI execution to @cli-discuss-agent, plan generation to @cli-lite-planning-agent

Execution Flow

Phase 1: Context Gathering
   └─ ACE semantic search, extract keywords, build context package

Phase 2: Multi-CLI Discussion (Iterative, via @cli-discuss-agent)
   ├─ Round N: Agent executes Gemini + Codex + Claude
   ├─ Cross-verify findings, synthesize solutions
   ├─ Write synthesis.json to rounds/{N}/
   └─ Loop until convergence or max rounds

Phase 3: Present Options
   └─ Display solutions with trade-offs from agent output

Phase 4: User Decision
   ├─ Select solution approach
   ├─ Select execution method (Agent/Codex/Auto)
   ├─ Select code review tool (Skip/Gemini/Codex/Agent)
   └─ Route:
      ├─ Approve → Phase 5
      ├─ Need More Analysis → Return to Phase 2
      └─ Cancel → Save session

Phase 5: Plan Generation & Execution Handoff
   ├─ Generate plan.json + .task/*.json (via @cli-lite-planning-agent, two-layer output)
   ├─ Build executionContext with user selections and taskFiles
   └─ Execute via workflow-lite-execute

Agent Roles

AgentResponsibility
OrchestratorSession management, ACE context, user decisions, phase transitions, executionContext assembly
@cli-discuss-agentMulti-CLI execution (Gemini/Codex/Claude), cross-verification, solution synthesis, synthesis.json output
@cli-lite-planning-agentTask decomposition, two-layer output: plan.json (overview with task_ids[]) +.task/*.json (task files)

Core Responsibilities

Phase 1: Context Gathering

Session Initialization:

const sessionId = `MCP-${taskSlug}-${date}`
const sessionFolder = `.workflow/.multi-cli-plan/${sessionId}`
Bash(`mkdir -p ${sessionFolder}/rounds`)

ACE Context Queries:

const aceQueries = [
  `Project architecture related to ${keywords}`,
  `Existing implementations of ${keywords[0]}`,
  `Code patterns for ${keywords} features`,
  `Integration points for ${keywords[0]}`
]
// Execute via mcp__ace-tool__search_context

Context Package (passed to agent):

  • relevant_files[] - Files identified by ACE
  • detected_patterns[] - Code patterns found
  • architecture_insights - Structure understanding

Phase 2: Agent Delegation

Core Principle: Orchestrator only delegates and reads output — NO direct CLI execution. CLI calls MUST use Bash with run_in_background: true, wait for hook callback, do NOT use TaskOutput polling.

Agent Invocation:

Agent({
  subagent_type: "cli-discuss-agent",
  run_in_background: false,
  description: `Discussion round ${currentRound}`,
  prompt: `
## Input Context
- task_description: ${taskDescription}
- round_number: ${currentRound}
- session: { id: "${sessionId}", folder: "${sessionFolder}" }
- ace_context: ${JSON.stringify(contextPackage)}
- previous_rounds: ${JSON.stringify(analysisResults)}
- user_feedback: ${userFeedback || 'None'}
- cli_config: { tools: ["gemini", "codex"], mode: "parallel", fallback_chain: ["gemini", "codex", "claude"] }

## Execution Process
1. Parse input context (handle JSON strings)
2. Check if ACE supplementary search needed
3. Build CLI prompts with context
4. Execute CLIs (parallel or serial per cli_config.mode)
5. Parse CLI outputs, handle failures with fallback
6. Perform cross-verification between CLI results
7. Synthesize solutions, calculate scores
8. Calculate convergence, generate clarification questions
9. Write synthesis.json

## Output
Write: ${sessionFolder}/rounds/${currentRound}/synthesis.json

## Completion Checklist
- [ ] All configured CLI tools executed (or fallback triggered)
- [ ] Cross-verification completed with agreements/disagreements
- [ ] 2-3 solutions generated with file:line references
- [ ] Convergence score calculated (0.0-1.0)
- [ ] synthesis.json written with all Primary Fields
`
})

Read Agent Output:

const synthesis = JSON.parse(Read(`${sessionFolder}/rounds/${round}/synthesis.json`))
// Access top-level fields: solutions, convergence, cross_verification, clarification_questions

Convergence Decision:

if (synthesis.convergence.recommendation === 'converged') {
  // Proceed to Phase 3
} else if (synthesis.convergence.recommendation === 'user_input_needed') {
  // Collect user feedback, return to Phase 2
} else {
  // Continue to next round if new_insights && round < maxRounds
}

Phase 3: Present Options

Display solutions from synthesis.solutions[] showing: name, source CLIs, effort/risk, pros/cons, affected files (file:line). Also show cross-verification agreements/disagreements count.

Phase 4: User Decision

AskUserQuestion({
  questions: [
    {
      question: "Which solution approach?",
      header: "Solution",
      multiSelect: false,
      options: solutions.map((s, i) => ({
        label: `Option ${i+1}: ${s.name}`,
        description: `${s.effort} effort, ${s.risk} risk`
      })).concat([
        { label: "Need More Analysis", description: "Return to Phase 2" }
      ])
    },
    {
      question: "Execution method:",
      header: "Execution",
      multiSelect: false,
      options: [
        { label: "Agent", description: "@code-developer agent" },
        { label: "Codex", description: "codex CLI tool" },
        { label: "Auto", description: "Auto-select based on complexity" }
      ]
    },
    {
      question: "Code review after execution?",
      header: "Review",
      multiSelect: false,
      options: [
        { label: "Skip", description: "No review" },
        { label: "Gemini Review", description: "Gemini CLI tool" },
        { label: "Codex Review", description: "codex review --uncommitted" },
        { label: "Agent Review", description: "Current agent review" }
      ]
    }
  ]
})

Routing:

  • Approve + execution method → Phase 5
  • Need More Analysis → Phase 2 with feedback
  • Cancel → Save session for resumption

TodoWrite Update (Phase 4 Decision):

const executionLabel = userSelection.execution_method  // "Agent" / "Codex" / "Auto"

TodoWrite({ todos: [
  { content: "Phase 1: Context Gathering", status: "completed", activeForm: "Gathering context" },
  { content: "Phase 2: Multi-CLI Discussion", status: "completed", activeForm: "Running discussion" },
  { content: "Phase 3: Present Options", status: "completed", activeForm: "Presenting options" },
  { content: `Phase 4: User Decision [${executionLabel}]`, status: "completed", activeForm: "Decision recorded" },
  { content: `Phase 5: Plan Generation [${executionLabel}]`, status: "in_progress", activeForm: `Generating plan [${executionLabel}]` }
]})

Phase 5: Plan Generation & Execution Handoff

Step 1: Build Context-Package (Orchestrator responsibility):

const contextPackage = {
  solution: {
    name: selectedSolution.name,
    source_cli: selectedSolution.source_cli,
    feasibility: selectedSolution.feasibility,
    effort: selectedSolution.effort,
    risk: selectedSolution.risk,
    summary: selectedSolution.summary
  },
  implementation_plan: selectedSolution.implementation_plan,
  dependencies: selectedSolution.dependencies || { internal: [], external: [] },
  technical_concerns: selectedSolution.technical_concerns || [],
  consensus: {
    agreements: synthesis.cross_verification.agreements,
    resolved_conflicts: synthesis.cross_verification.resolution
  },
  constraints: userConstraints || [],
  task_description: taskDescription,
  session_id: sessionId
}
Write(`${sessionFolder}/context-package.json`, JSON.stringify(contextPackage, null, 2))

Step 2: Invoke Planning Agent:

Agent({
  subagent_type: "cli-lite-planning-agent",
  run_in_background: false,
  description: "Generate implementation plan",
  prompt: `
## Schema Reference
Execute: cat ~/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json
Execute: cat ~/.ccw/workflows/cli-templates/schemas/task-schema.json

## Output Format: Two-Layer Structure
- plan.json: Overview with task_ids[] referencing .task/ files (NO tasks[] array)
- .task/TASK-*.json: Independent task files following task-schema.json

plan.json required: summary, approach, task_ids, task_count, _metadata (with plan_type)
Task files required: id, title, description, depends_on, convergence (with criteria[])
Task fields: files[].change (not modification_points), convergence.criteria (not acceptance), test (not verification)

## Context-Package (from orchestrator)
${JSON.stringify(contextPackage, null, 2)}

## Execution Process
1. Read plan-overview-base-schema.json + task-schema.json for output structure
2. Read project-tech.json and specs/*.md
3. Parse context-package fields:
   - solution: name, feasibility, summary
   - implementation_plan: tasks[], execution_flow, milestones
   - dependencies: internal[], external[]
   - technical_concerns: risks/blockers
   - consensus: agreements, resolved_conflicts
   - constraints: user requirements
4. Use implementation_plan.tasks[] as task foundation
5. Preserve task dependencies (depends_on) and execution_flow
6. Expand tasks with convergence.criteria (testable completion conditions)
7. Create .task/ directory and write individual TASK-*.json files
8. Generate plan.json with task_ids[] referencing .task/ files

## Output
- ${sessionFolder}/plan.json (overview with task_ids[])
- ${sessionFolder}/.task/TASK-*.json (independent task files)

## Completion Checklist
- [ ] plan.json has task_ids[] and task_count (NO embedded tasks[])
- [ ] .task/*.json files preserve task dependencies from implementation_plan
- [ ] Task execution order follows execution_flow
- [ ] Key_points reflected in task descriptions
- [ ] User constraints applied to implementation
- [ ] convergence.criteria are testable
- [ ] plan.json follows plan-overview-base-schema.json
- [ ] Task files follow task-schema.json
`
})

Step 3: Build executionContext:

const plan = JSON.parse(Read(`${sessionFolder}/plan.json`))
const taskFiles = plan.task_ids.map(id => `${sessionFolder}/.task/${id}.json`)

// Build executionContext (same structure as lite-plan)
executionContext = {
  planObject: plan,
  taskFiles: taskFiles,                              // Paths to .task/*.json files (two-layer format)
  explorationsContext: null,                          // Multi-CLI doesn't use exploration files
  explorationAngles: [],
  explorationManifest: null,
  clarificationContext: null,                         // Store user feedback from Phase 2 if exists
  executionMethod: userSelection.execution_method,    // From Phase 4
  codeReviewTool: userSelection.code_review_tool,     // From Phase 4
  originalUserInput: taskDescription,
  executorAssignments: null,
  session: {
    id: sessionId,
    folder: sessionFolder,
    artifacts: {
      explorations: [],                              // No explorations in multi-CLI workflow
      explorations_manifest: null,
      plan: `${sessionFolder}/plan.json`,
      task_dir: plan.task_ids ? `${sessionFolder}/.task/` : null,
      synthesis_rounds: Array.from({length: currentRound}, (_, i) =>
        `${sessionFolder}/rounds/${i+1}/synthesis.json`
      ),
      context_package: `${sessionFolder}/context-package.json`
    }
  }
}

Step 4: Hand off to Execution:

Skill({
  skill: "workflow-lite-execute",
  args: "--in-memory"
})
// executionContext is passed via global variable to workflow-lite-execute (Mode 1: In-Memory Plan)

synthesis.json Schema

{
  "round": 1,
  "solutions": [{
    "name": "Solution Name",
    "source_cli": ["gemini", "codex"],
    "feasibility": 0.85,
    "effort": "low|medium|high",
    "risk": "low|medium|high",
    "summary": "Brief analysis summary",
    "implementation_plan": {
      "approach": "High-level technical approach",
      "tasks": [
        {"id": "T1", "name": "Task", "depends_on": [], "files": [], "key_point": "..."}
      ],
      "execution_flow": "T1 → T2 → T3",
      "milestones": ["Checkpoint 1", "Checkpoint 2"]
    },
    "dependencies": {"internal": [], "external": []},
    "technical_concerns": ["Risk 1", "Blocker 2"]
  }],
  "convergence": {
    "score": 0.85,
    "new_insights": false,
    "recommendation": "converged|continue|user_input_needed"
  },
  "cross_verification": {
    "agreements": [],
    "disagreements": [],
    "resolution": "..."
  },
  "clarification_questions": []
}

TodoWrite Pattern

Initialization (Phase 1 start):

TodoWrite({ todos: [
  { content: "Phase 1: Context Gathering", status: "in_progress", activeForm: "Gathering context" },
  { content: "Phase 2: Multi-CLI Discussion", status: "pending", activeForm: "Running discussion" },
  { content: "Phase 3: Present Options", status: "pending", activeForm: "Presenting options" },
  { content: "Phase 4: User Decision", status: "pending", activeForm: "Awaiting decision" },
  { content: "Phase 5: Plan Generation", status: "pending", activeForm: "Generating plan" }
]})

Output File Structure

.workflow/.multi-cli-plan/{MCP-task-slug-YYYY-MM-DD}/
├── session-state.json          # Session tracking (orchestrator)
├── rounds/
│   ├── 1/synthesis.json        # Round 1 analysis (cli-discuss-agent)
│   ├── 2/synthesis.json        # Round 2 analysis (cli-discuss-agent)
│   └── .../
├── context-package.json        # Extracted context for planning (orchestrator)
├── plan.json                   # Plan overview with task_ids[] (NO embedded tasks[])
└── .task/                      # Independent task files
    ├── TASK-001.json            # Task file following task-schema.json
    ├── TASK-002.json
    └── ...

Error Handling

ErrorResolution
ACE search failsFall back to Glob/Grep for file discovery
Agent failsRetry once, then present partial results
CLI timeout (in agent)Agent uses fallback: gemini → codex → claude
No convergencePresent best options, flag uncertainty
synthesis.json parse errorRequest agent retry
User cancelsSave session for later resumption

Configuration

FlagDefaultDescription
--max-rounds3Maximum discussion rounds
--toolsgemini,codexCLI tools for analysis
--modeparallelExecution mode: parallel or serial
--auto-executefalseAuto-execute after approval

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.45%
按下载量换算130

Claude

31.25%
按下载量换算121

Cursor

16.75%
按下载量换算65

Gemini CLI

9.83%
按下载量换算38

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills