workflow-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Workflow Creator

工作流创建工具

Create a new
workflow-<slug>/
skill package that chains existing skills with Ship Faster-standard artifacts.
创建一个新的
workflow-<slug>/
技能包,通过 Ship Faster 标准工件将现有技能串联起来。

Hard rules (do not skip)

硬性规则(请勿跳过)

  • Compose skills, don't copy them: a workflow's job is orchestration. Do not paste long best-practice content from other skills into the workflow. Instead: map each step to a single existing skill and point to it.
  • One step = one skill: every step in
    workflow_spec.md
    must map to exactly one skill (or a tiny, verifiable manual action).
  • Missing required skill = stop: do not approximate a missing skill by rewriting its logic. When a required skill is missing locally, you must look up candidates on
    https://skills.sh/
    , suggest 2-3 options + install commands, and wait for the user.
  • Artifact-first, resumable: state lives in
    proposal.md
    ,
    tasks.md
    ,
    context.json
    under
    run_dir/
    .
  • Plan-then-confirm execution: generated workflows must write a plan first, then ask the user to confirm execution; the confirmation must be recorded under
    tasks.md -> ## Approvals
    .
  • 组合技能,而非复制:工作流的职责是编排,不要将其他技能中的长篇最佳实践内容粘贴到工作流中。相反,应将每个步骤映射到单个现有技能并指向它。
  • 一步对应一个技能
    workflow_spec.md
    中的每个步骤必须恰好映射到一个技能(或一个微小的、可验证的手动操作)。
  • 缺失必需技能则停止:不要通过重写逻辑来近似替代缺失的技能。当本地缺少必需技能时,必须在
    https://skills.sh/
    上查找候选技能,推荐2-3个选项及安装命令,然后等待用户操作。
  • 工件优先,可恢复:状态存储在
    run_dir/
    下的
    proposal.md
    tasks.md
    context.json
    中。
  • 先规划再确认执行:生成的工作流必须先编写规划,然后请求用户确认执行;确认记录必须保存在
    tasks.md -> ## Approvals
    下。

Defaults (Ship Faster standard)

默认配置(Ship Faster 标准)

  • Artifact store:
    runs/
    by default, OpenSpec when
    openspec/project.md
    exists (unless overridden in
    context.json
    ).
  • Required run files:
    proposal.md
    ,
    tasks.md
    ,
    context.json
    .
  • Execution model: plan first, then ask the user to confirm execution; on confirmation, record approval in
    tasks.md
    .
  • 工件存储:默认使用
    runs/
    ,若存在
    openspec/project.md
    则使用 OpenSpec(除非在
    context.json
    中覆盖配置)。
  • 必需运行文件
    proposal.md
    tasks.md
    context.json
  • 执行模型:先规划,然后请求用户确认执行;确认后,将审批记录到
    tasks.md
    中。

Inputs (paths only)

输入(仅支持路径)

  • Optional:
    repo_root
    (skills repository root)
  • Optional:
    workflow_spec_path
    (if the user already wrote a spec)
  • 可选:
    repo_root
    (技能仓库根目录)
  • 可选:
    workflow_spec_path
    (若用户已编写好规范)

Outputs

输出

  • New or updated workflow skill folder:
    • workflow-<slug>/SKILL.md
    • workflow-<slug>/references/workflow-spec.md
      (SSOT)
  • 新建或更新的工作流技能文件夹:
    • workflow-<slug>/SKILL.md
    • workflow-<slug>/references/workflow-spec.md
      (单一可信源 SSOT)

References

参考资料

  • Prompt pack (verbatim prompts): references/prompt-pack.md
  • Workflow spec template (SSOT): references/workflow-spec-template.md
  • Example generated workflow skill: references/example-workflow-skill.md
  • Example workflow spec (valid): references/example-workflow-spec.md
  • 提示包(原文提示):references/prompt-pack.md
  • 工作流规范模板(SSOT):references/workflow-spec-template.md
  • 生成的工作流技能示例:references/example-workflow-skill.md
  • 有效工作流规范示例:references/example-workflow-spec.md

Process

流程

0) Resolve skills root (deterministic)

0) 确定技能根目录(确定性)

Resolve
skills_root
using this priority:
  1. If user provides
    repo_root
    , use it.
  2. Else search upward from the current working directory for:
    • <dir>/skills/manifest.json
      (monorepo layout) ->
      skills_root = <dir>/skills/
    • <dir>/manifest.json
      (skills-repo layout) ->
      skills_root = <dir>/
按以下优先级确定
skills_root
  1. 若用户提供
    repo_root
    ,则使用该路径。
  2. 否则从当前工作目录向上搜索:
    • <dir>/skills/manifest.json
      (单体仓库布局)->
      skills_root = <dir>/skills/
    • <dir>/manifest.json
      (技能仓库布局)->
      skills_root = <dir>/

1) Create or load
workflow_spec.md
(SSOT)

1) 创建或加载
workflow_spec.md
(SSOT)

If
workflow_spec_path
is not provided:
  1. Call
    workflow-brainstorm
    first to converge on:
    • core goal (1 sentence)
    • acceptance criteria (3-7 bullets)
    • non-goals (1-5 bullets)
    • constraints (risk preference, timeline)
    • 5-10 real trigger phrases the user would say
  2. Skill Discovery (REQUIRED) - before finalizing required_skills:
    a) Local skills scan: List all potentially relevant skills under
    skills_root
    :
    bash
    ls -1 ~/.claude/skills/ | grep -E "(tool-|review-|workflow-)" 
    Identify which local skills could serve steps in the workflow.
    b) skills.sh lookup (MANDATORY): Fetch the leaderboard from
    https://skills.sh/
    and identify relevant skills:
    • Search for keywords related to the workflow goal
    • Note top skills by install count in relevant categories
    • Identify 3-5 potentially useful external skills
    c) Present findings to user:
    ## Skill Discovery Results
    
    ### Local Skills (available)
    | Skill | Relevance | Notes |
    |-------|-----------|-------|
    | tool-xxx | HIGH | ... |
    | review-yyy | MEDIUM | ... |
    
    ### External Skills (skills.sh)
    | Skill | Installs | Source | Relevance |
    |-------|----------|--------|-----------|
    | skill-name | 10K | owner/repo | ... |
    
    **Want to inspect any external skills before deciding?** (list numbers or "none")
    d) If user wants to inspect: fetch skill details from skills.sh page, show SKILL.md content, then ask again.
    e) User confirms final skill selection: only then proceed to write spec.
  3. Write a
    workflow_spec.md
    using the template in
    references/workflow-spec-template.md
    .
若未提供
workflow_spec_path
  1. 先调用
    workflow-brainstorm
    确定以下内容:
    • 核心目标(1句话)
    • 验收标准(3-7条)
    • 非目标(1-5条)
    • 约束条件(风险偏好、时间线)
    • 5-10个用户可能触发的真实短语
  2. 技能发现(必需步骤) - 在最终确定所需技能前:
    a) 本地技能扫描:列出
    skills_root
    下所有潜在相关技能:
    bash
    ls -1 ~/.claude/skills/ | grep -E "(tool-|review-|workflow-)" 
    识别哪些本地技能可用于工作流的各个步骤。
    b) skills.sh 查找(强制要求):从
    https://skills.sh/
    获取排行榜,识别相关技能:
    • 搜索与工作流目标相关的关键词
    • 记录相关分类中安装量靠前的技能
    • 识别3-5个潜在有用的外部技能
    c) 向用户展示发现结果
    ## 技能发现结果
    
    ### 本地技能(可用)
    | 技能 | 相关性 | 备注 |
    |-------|-----------|-------|
    | tool-xxx | 高 | ... |
    | review-yyy | 中 | ... |
    
    ### 外部技能(来自skills.sh)
    | 技能 | 安装量 | 来源 | 相关性 |
    |-------|----------|--------|-----------|
    | skill-name | 10K | owner/repo | ... |
    
    **是否要在决定前查看任何外部技能的详情?**(输入编号或“无”)
    d) 若用户想要查看详情:从skills.sh页面获取技能详情,展示SKILL.md内容,然后再次询问用户。
    e) 用户确认最终技能选择:仅在用户确认后再继续编写规范。
  3. 使用
    references/workflow-spec-template.md
    中的模板编写
    workflow_spec.md

2) Validate spec (deterministic)

2) 验证规范(确定性)

Run:
bash
python3 scripts/validate_workflow_spec.py /path/to/workflow_spec.md
Fix any validation errors before generating.
运行:
bash
python3 scripts/validate_workflow_spec.py /path/to/workflow_spec.md
在生成前修复所有验证错误。

3) Resolve skill dependencies

3) 解析技能依赖

  1. Read
    required_skills
    /
    optional_skills
    from the spec.
  2. Check which skills exist locally under
    skills_root
    .
  3. If any required skill is missing:
    • Stop.
    • Use the prompt in
      references/prompt-pack.md
      to do a skills.sh lookup.
    • Suggest 2-3 candidates (links + why) and provide install command suggestions, but do not auto-install.
  1. 从规范中读取
    required_skills
    /
    optional_skills
  2. 检查
    skills_root
    下哪些技能已存在。
  3. 若缺少任何必需技能:
    • 停止流程。
    • 使用
      references/prompt-pack.md
      中的提示进行skills.sh查找。
    • 推荐2-3个候选技能(链接及推荐理由)并提供安装命令建议,但不要自动安装。

4) Generate/update
workflow-<slug>/

4) 生成/更新
workflow-<slug>/

  1. Create
    workflow-<slug>/
    under
    skills_root
    if missing.
  2. Write SSOT:
    • workflow-<slug>/references/workflow-spec.md
      (copy from the validated spec).
  3. Generate/update
    workflow-<slug>/SKILL.md
    :
    • Frontmatter
      name
      must match directory name (
      workflow-<slug>
      ).
    • Frontmatter
      description
      must embed the spec
      triggers
      (routing fuel).
    • Include Ship Faster artifact backend selection rules (
      runs/
      vs OpenSpec).
    • Include the plan-then-confirm execution policy:
      • Plan stage writes checklist to
        tasks.md
        .
      • Ask user to confirm start.
    • On confirmation, append an approval record under
      tasks.md -> ## Approvals
      (timestamp + scope) and start execution.
    • Map each chain step to one skill.
    • Keep the workflow concise: link to other skills for deep details.
  1. skills_root
    下不存在
    workflow-<slug>/
    则创建该文件夹。
  2. 编写单一可信源(SSOT):
    • workflow-<slug>/references/workflow-spec.md
      (复制已验证的规范内容)。
  3. 生成/更新
    workflow-<slug>/SKILL.md
    • 前置元数据
      name
      必须与目录名(
      workflow-<slug>
      )一致。
    • 前置元数据
      description
      必须嵌入规范中的
      triggers
      (路由依据)。
    • 包含 Ship Faster 工件后端选择规则(
      runs/
      vs OpenSpec)。
    • 包含“先规划再确认”的执行策略:
      • 规划阶段将检查清单写入
        tasks.md
      • 请求用户确认启动。
    • 确认后,在
      tasks.md -> ## Approvals
      下追加审批记录(时间戳及范围)并开始执行。
    • 将每个流程步骤映射到一个技能。
    • 保持工作流简洁:通过链接指向其他技能获取详细信息。

5) Basic validation (required)

5) 基础验证(必需步骤)

Run:
bash
python3 scripts/validate_skill_md.py /path/to/workflow-<slug>
If it fails, fix frontmatter/name/line endings until it passes.
Note: The repo also includes
skill-creator/scripts/quick_validate.py
, but it may require extra Python deps. Use the validator in this skill as the default.
运行:
bash
python3 scripts/validate_skill_md.py /path/to/workflow-<slug>
若验证失败,修复前置元数据/名称/行尾格式直到验证通过。
注意:仓库中还包含
skill-creator/scripts/quick_validate.py
,但它可能需要额外的Python依赖。默认使用本技能中的验证工具。