workflow-builder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Workflow Builder

工作流构建器(Workflow Builder)

Create and execute custom, repeatable multi-step AI workflows. Each step can use a different model, and independent steps run in parallel waves.
创建并执行自定义、可重复的多步骤AI工作流。每个步骤可使用不同的模型,独立步骤会以并行批次运行。

Capabilities

功能

This skill has two modes:
ModeWhen to useReference
PlanUser wants to create or design a new workflow
references/plan.md
RunUser wants to execute, resume, or re-run a workflow
references/run.md
此Skill包含两种模式:
模式使用场景参考文档
规划(Plan)用户想要创建或设计新工作流
references/plan.md
运行(Run)用户想要执行、恢复或重新运行工作流
references/run.md

Quick Start

快速开始

  • Create: "Create a workflow called dependency-cleanup"
  • Run: "Run the dependency-cleanup workflow"
  • Resume: "Resume the dependency-cleanup workflow"
  • 创建:“创建名为dependency-cleanup的工作流”
  • 运行:“运行dependency-cleanup工作流”
  • 恢复:“恢复dependency-cleanup工作流”

Routing

路由逻辑

Determine the user's intent from their message or
$ARGUMENTS
:
  1. If the user says "create", "plan", "design", or "new workflow" → Read and follow
    references/plan.md
  2. If the user says "run", "execute", "start", or "resume" → Read and follow
    references/run.md
  3. If
    $ARGUMENTS
    starts with
    plan
    → Read and follow
    references/plan.md
    with the remaining argument as workflow name
  4. If
    $ARGUMENTS
    starts with
    run
    → Read and follow
    references/run.md
    with the remaining argument as workflow name
  5. If unclear, ask the user: "Would you like to create a new workflow or run an existing one?"
根据用户消息或
$ARGUMENTS
判断用户意图:
  1. 如果用户提到“create”、“plan”、“design”或“new workflow” → 阅读并遵循
    references/plan.md
    的指引
  2. 如果用户提到“run”、“execute”、“start”或“resume” → 阅读并遵循
    references/run.md
    的指引
  3. 如果
    $ARGUMENTS
    plan
    开头 → 阅读并遵循
    references/plan.md
    ,剩余参数作为工作流名称
  4. 如果
    $ARGUMENTS
    run
    开头 → 阅读并遵循
    references/run.md
    ,剩余参数作为工作流名称
  5. 如果意图不明确,询问用户: “您想要创建新工作流还是运行现有工作流?”

Workflow Structure

工作流结构

A workflow is a directory at
.somnio/workflows/<name>/
containing:
.somnio/workflows/<name>/
├── context.md              — Manifest with step list and metadata
├── 01-<step-name>.md       — Step 1 prompt
├── 02-<step-name>.md       — Step 2 prompt
├── ...
├── config.claudecode.json  — Model assignments (optional)
├── progress.json           — Execution state (auto-generated)
└── outputs/                — Step output files (auto-generated)
工作流是位于
.somnio/workflows/<name>/
目录下的一组文件,结构如下:
.somnio/workflows/<name>/
├── context.md              — 包含步骤列表和元数据的清单文件
├── 01-<step-name>.md       — 步骤1的提示词文件
├── 02-<step-name>.md       — 步骤2的提示词文件
├── ...
├── config.claudecode.json  — 模型分配配置(可选)
├── progress.json           — 执行状态文件(自动生成)
└── outputs/                — 步骤输出文件目录(自动生成)

Key Concepts

核心概念

  • Steps run in fresh AI contexts (separate subagents)
  • Tags (
    research
    ,
    planning
    ,
    execution
    ) map to model assignments
  • Dependencies (
    needs
    ) determine parallel wave grouping
  • Placeholders (
    {output_path}
    ,
    {step_N_output}
    ) enable data flow between steps
  • Independent steps with no
    needs
    run concurrently in the same wave
  • 步骤(Steps):在全新的AI上下文(独立子Agent)中运行
  • 标签(Tags)
    research
    planning
    execution
    ):与模型分配关联
  • 依赖关系(Dependencies)
    needs
    ):决定并行批次的分组
  • 占位符(Placeholders)
    {output_path}
    {step_N_output}
    ):实现步骤间的数据流转
  • needs
    依赖的独立步骤会在同一批次中并发运行