Tooluck logoTooluck
SKILL.md

workflow-runner

Agent skill fromjnMetaCode/superpowers-zh

在 Claude Code / OpenClaw / Cursor 中直接运行 agency-orchestrator YAML 工作流——无需 API key,使用当前会话的 LLM 作为执行引擎。当用户提供 .yaml 工作流文件或要求多角色协作完成任务时触发。

How to install workflow-runner

install workflow-runner
# install the superpowers-zh pack with the skills CLI
npx skills add jnMetaCode/superpowers-zh

# or add only this skill to Claude Code: copy the folder

skills/workflow-runner/

# into

~/.claude/skills/workflow-runner/ (all projects)

.claude/skills/workflow-runner/ (one project)

skills/workflow-runner/SKILL.md

MITFull file
1# 工作流执行器:在 AI 工具内运行多角色编排
2
3直接在当前会话中执行 agency-orchestrator 的 YAML 工作流,无需配置 API key。当前 LLM 就是执行引擎——依次扮演每个角色完成任务。
4
5## 适用场景
6
7- 用户提供了一个 `.yaml` 工作流文件(如 `运行 workflows/story-creation.yaml`)
8- 用户要求多个角色协作完成任务(如"用产品经理和架构师一起评审这个 PRD")
9- 用户安装了 `agency-agents-zh` 并希望直接在 AI 工具内编排多角色
10
11## 执行流程(5 步)
12
13按以下顺序执行,不要跳步:
14
15### 第 1 步:解析工作流
16
17用 Read 工具读取用户指定的 YAML 文件,提取以下字段:
18
19```yaml
20name: "工作流名称"
21agents_dir: "agency-agents-zh" # 角色定义目录
22inputs: # 输入变量
23 - name: xxx
24 required: true/false
25 default: "默认值"
26steps: # 执行步骤
27 - id: step_id
28 role: "category/agent-name" # 角色路径
29 task: "任务描述 {{变量}}" # 支持模板变量
30 output: variable_name # 输出变量名
31 depends_on: [other_step_id] # 依赖关系
32```
33
34**忽略 `llm`、`concurrency`、`timeout`、`retry` 配置**——Skill 模式使用当前会话的 LLM,这些字段仅用于 CLI 模式。
35
36**定位角色目录**:用 Bash `test -d` 按以下顺序检查,用第一个存在的:
371. 当前工作目录下的 `{agents_dir}/`(如 `./agency-agents-zh/`)
382. `../{agents_dir}/`(上级目录)
393. 相对于 YAML 文件所在目录的 `{agents_dir}/`
404. `node_modules/agency-agents-zh/`
41
42如果全部找不到,**停止执行**并提示用户:
43```
44找不到角色目录。请先安装:
45 git clone --depth 1 https://github.com/jnMetaCode/agency-agents-zh.git
46 或:npm install agency-agents-zh
47```
48
49### 第 2 步:收集输入
50
51- 对每个 `required: true` 的输入,检查用户消息中是否已提供值
52- 未提供的必填输入:**立即向用户询问**,不要猜测或用空值
53- 有 `default` 的可选输入:使用默认值
54- 无默认值的可选输入:设为空字符串
55
56### 第 3 步:构建执行顺序
57
58根据 `depends_on` 进行拓扑排序,将步骤分成多个层级:
59
60- **无 depends_on 的步骤** → 第 1 层
61- **depends_on 全部在第 N 层或之前的步骤** → 第 N+1 层
62- **同一层内的步骤**互不依赖,可并行
63
64在回复中展示执行计划:
65```
66执行计划(共 N 步):
67…

Excerpt shown under the repository's MIT license.

More skills in superpowers-zh

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates