workflow-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWorkflow Creator
工作流创建工具
Create a new skill package that chains existing skills with Ship Faster-standard artifacts.
workflow-<slug>/创建一个新的 技能包,通过 Ship Faster 标准工件将现有技能串联起来。
workflow-<slug>/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 must map to exactly one skill (or a tiny, verifiable manual action).
workflow_spec.md - 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 , suggest 2-3 options + install commands, and wait for the user.
https://skills.sh/ - Artifact-first, resumable: state lives in ,
proposal.md,tasks.mdundercontext.json.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 - 缺失必需技能则停止:不要通过重写逻辑来近似替代缺失的技能。当本地缺少必需技能时,必须在 上查找候选技能,推荐2-3个选项及安装命令,然后等待用户操作。
https://skills.sh/ - 工件优先,可恢复:状态存储在 下的
run_dir/、proposal.md、tasks.md中。context.json - 先规划再确认执行:生成的工作流必须先编写规划,然后请求用户确认执行;确认记录必须保存在 下。
tasks.md -> ## Approvals
Defaults (Ship Faster standard)
默认配置(Ship Faster 标准)
- Artifact store: by default, OpenSpec when
runs/exists (unless overridden inopenspec/project.md).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(除非在openspec/project.md中覆盖配置)。context.json - 必需运行文件:、
proposal.md、tasks.md。context.json - 执行模型:先规划,然后请求用户确认执行;确认后,将审批记录到 中。
tasks.md
Inputs (paths only)
输入(仅支持路径)
- Optional: (skills repository root)
repo_root - Optional: (if the user already wrote a spec)
workflow_spec_path
- 可选:(技能仓库根目录)
repo_root - 可选:(若用户已编写好规范)
workflow_spec_path
Outputs
输出
- New or updated workflow skill folder:
workflow-<slug>/SKILL.md- (SSOT)
workflow-<slug>/references/workflow-spec.md
- 新建或更新的工作流技能文件夹:
workflow-<slug>/SKILL.md- (单一可信源 SSOT)
workflow-<slug>/references/workflow-spec.md
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 using this priority:
skills_root- If user provides , use it.
repo_root - Else search upward from the current working directory for:
- (monorepo layout) ->
<dir>/skills/manifest.jsonskills_root = <dir>/skills/ - (skills-repo layout) ->
<dir>/manifest.jsonskills_root = <dir>/
按以下优先级确定 :
skills_root- 若用户提供 ,则使用该路径。
repo_root - 否则从当前工作目录向上搜索:
- (单体仓库布局)->
<dir>/skills/manifest.jsonskills_root = <dir>/skills/ - (技能仓库布局)->
<dir>/manifest.jsonskills_root = <dir>/
1) Create or load workflow_spec.md
(SSOT)
workflow_spec.md1) 创建或加载 workflow_spec.md
(SSOT)
workflow_spec.mdIf is not provided:
workflow_spec_path-
Callfirst to converge on:
workflow-brainstorm- 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
-
Skill Discovery (REQUIRED) - before finalizing required_skills:a) Local skills scan: List all potentially relevant skills under:
skills_rootbashls -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 fromand identify relevant skills:https://skills.sh/- 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. -
Write ausing the template in
workflow_spec.md.references/workflow-spec-template.md
若未提供 :
workflow_spec_path-
先调用确定以下内容:
workflow-brainstorm- 核心目标(1句话)
- 验收标准(3-7条)
- 非目标(1-5条)
- 约束条件(风险偏好、时间线)
- 5-10个用户可能触发的真实短语
-
技能发现(必需步骤) - 在最终确定所需技能前:a) 本地技能扫描:列出下所有潜在相关技能:
skills_rootbashls -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) 用户确认最终技能选择:仅在用户确认后再继续编写规范。 -
使用中的模板编写
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.mdFix any validation errors before generating.
运行:
bash
python3 scripts/validate_workflow_spec.py /path/to/workflow_spec.md在生成前修复所有验证错误。
3) Resolve skill dependencies
3) 解析技能依赖
- Read /
required_skillsfrom the spec.optional_skills - Check which skills exist locally under .
skills_root - If any required skill is missing:
- Stop.
- Use the prompt in to do a skills.sh lookup.
references/prompt-pack.md - Suggest 2-3 candidates (links + why) and provide install command suggestions, but do not auto-install.
- 从规范中读取 /
required_skills。optional_skills - 检查 下哪些技能已存在。
skills_root - 若缺少任何必需技能:
- 停止流程。
- 使用 中的提示进行skills.sh查找。
references/prompt-pack.md - 推荐2-3个候选技能(链接及推荐理由)并提供安装命令建议,但不要自动安装。
4) Generate/update workflow-<slug>/
workflow-<slug>/4) 生成/更新 workflow-<slug>/
workflow-<slug>/- Create under
workflow-<slug>/if missing.skills_root - Write SSOT:
- (copy from the validated spec).
workflow-<slug>/references/workflow-spec.md
- Generate/update :
workflow-<slug>/SKILL.md- Frontmatter must match directory name (
name).workflow-<slug> - Frontmatter must embed the spec
description(routing fuel).triggers - Include Ship Faster artifact backend selection rules (vs OpenSpec).
runs/ - Include the plan-then-confirm execution policy:
- Plan stage writes checklist to .
tasks.md - Ask user to confirm start.
- Plan stage writes checklist to
- On confirmation, append an approval record under (timestamp + scope) and start execution.
tasks.md -> ## Approvals - Map each chain step to one skill.
- Keep the workflow concise: link to other skills for deep details.
- Frontmatter
- 若 下不存在
skills_root则创建该文件夹。workflow-<slug>/ - 编写单一可信源(SSOT):
- (复制已验证的规范内容)。
workflow-<slug>/references/workflow-spec.md
- 生成/更新 :
workflow-<slug>/SKILL.md- 前置元数据 必须与目录名(
name)一致。workflow-<slug> - 前置元数据 必须嵌入规范中的
description(路由依据)。triggers - 包含 Ship Faster 工件后端选择规则(vs OpenSpec)。
runs/ - 包含“先规划再确认”的执行策略:
- 规划阶段将检查清单写入 。
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 , but it may require extra Python deps. Use the validator in this skill as the default.
skill-creator/scripts/quick_validate.py运行:
bash
python3 scripts/validate_skill_md.py /path/to/workflow-<slug>若验证失败,修复前置元数据/名称/行尾格式直到验证通过。
注意:仓库中还包含 ,但它可能需要额外的Python依赖。默认使用本技能中的验证工具。
skill-creator/scripts/quick_validate.py