Skip to content

Commit 6046c4c

Browse files
committed
feat: add DeerFlow 2.0 support + workflow-runner skill
- Install script detects deer_flow/ and copies skills to skills/custom/ - Add DeerFlow to README tool list and install instructions - Add docs/README.deerflow.md install guide - Add deerflow keyword to package.json - Include workflow-runner skill (20 skills total)
1 parent 62f7ac3 commit 6046c4c

7 files changed

Lines changed: 248 additions & 7 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "superpowers-zh",
3-
"description": "AI 编程超能力中文版:19 个 skills 库",
3+
"description": "AI 编程超能力中文版:20 个 skills 库",
44
"owner": {
55
"name": "jnMetaCode",
66
"url": "https://github.com/jnMetaCode"
77
},
88
"plugins": [
99
{
1010
"name": "superpowers-zh",
11-
"description": "AI 编程超能力中文版:19 个 skills(14 翻译 + 5 中国特色原创)",
11+
"description": "AI 编程超能力中文版:20 个 skills(14 翻译 + 5 中国特色原创)",
1212
"version": "1.0.0",
1313
"source": "./",
1414
"author": {

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "superpowers-zh",
3-
"description": "AI 编程超能力中文版:19 个 skills(14 翻译 + 5 中国特色原创)",
3+
"description": "AI 编程超能力中文版:20 个 skills(14 翻译 + 5 中国特色原创)",
44
"version": "1.0.0",
55
"author": {
66
"name": "jnMetaCode",

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Chinese community edition of [superpowers](https://github.com/obra/superpowers),
1616

1717
| 📦 翻译 Skills | 🇨🇳 中国特色 Skills | 🤖 支持工具 |
1818
|:---:|:---:|:---:|
19-
| **14** | **5** | **Claude Code / Cursor / Codex / Kiro / Trae / Antigravity / VS Code / Gemini** |
19+
| **14** | **5** | **Claude Code / Cursor / Codex / Kiro / DeerFlow / Trae / Antigravity / VS Code / Gemini** |
2020

2121
---
2222

@@ -77,6 +77,7 @@ cp -r superpowers-zh/skills /your/project/.claude/skills # Claude Code
7777
cp -r superpowers-zh/skills /your/project/.cursor/skills # Cursor
7878
cp -r superpowers-zh/skills /your/project/.codex/skills # Codex CLI
7979
cp -r superpowers-zh/skills /your/project/.kiro/steering # Kiro
80+
cp -r superpowers-zh/skills /your/project/skills/custom # DeerFlow 2.0
8081
cp -r superpowers-zh/skills /your/project/.trae/rules # Trae
8182
cp -r superpowers-zh/skills /your/project/.antigravity # Antigravity
8283
```
@@ -89,12 +90,13 @@ cp -r superpowers-zh/skills /your/project/.antigravity # Antigravity
8990
|------|---------|------|
9091
| Claude Code | `CLAUDE.md` | 项目根目录 |
9192
| Kiro | `.kiro/steering/*.md` | 支持 always/globs/手动三种模式 |
93+
| DeerFlow 2.0 | `skills/custom/*/SKILL.md` | 字节跳动开源 SuperAgent,自动发现自定义 skills |
9294
| Trae | `.trae/rules/project_rules.md` | 项目级规则 |
9395
| Antigravity | `GEMINI.md``AGENTS.md` | 项目根目录 |
9496
| VS Code | `.github/copilot-instructions.md` | Copilot 自定义指令 |
9597
| Cursor | `.cursor/rules/*.md` | 项目级规则目录 |
9698

97-
> **详细安装指南**[Kiro](docs/README.kiro.md) · [Trae](docs/README.trae.md) · [Antigravity](docs/README.antigravity.md) · [VS Code](docs/README.vscode.md) · [Codex](docs/README.codex.md) · [OpenCode](docs/README.opencode.md)
99+
> **详细安装指南**[Kiro](docs/README.kiro.md) · [DeerFlow](docs/README.deerflow.md) · [Trae](docs/README.trae.md) · [Antigravity](docs/README.antigravity.md) · [VS Code](docs/README.vscode.md) · [Codex](docs/README.codex.md) · [OpenCode](docs/README.opencode.md)
98100
99101
---
100102

bin/superpowers-zh.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const TARGETS = [
1515
{ name: 'Cursor', dir: '.cursor/skills', detect: '.cursor' },
1616
{ name: 'Codex CLI', dir: '.codex/skills', detect: '.codex' },
1717
{ name: 'Kiro', dir: '.kiro/steering', detect: '.kiro' },
18+
{ name: 'DeerFlow', dir: 'skills/custom', detect: 'deer_flow' },
1819
{ name: 'Trae', dir: '.trae/rules', detect: '.trae' },
1920
{ name: 'Antigravity', dir: '.antigravity/skills', detect: '.antigravity' },
2021
{ name: 'VS Code', dir: '.github/superpowers', detect: '.github/copilot-instructions.md' },
@@ -36,7 +37,7 @@ function showHelp() {
3637
3738
说明:
3839
自动检测当前项目使用的 AI 编程工具:
39-
Claude Code / Cursor / Codex / Kiro / Trae / Antigravity / VS Code
40+
Claude Code / Cursor / Codex / Kiro / DeerFlow / Trae / Antigravity / VS Code
4041
${countDirs(SKILLS_SRC)} 个 skills 安装到对应目录。
4142
Claude Code 还会额外安装 agents 到 .claude/agents/。
4243
如果未检测到任何工具,默认安装到 .claude/skills/ 和 .claude/agents/。

docs/README.deerflow.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Superpowers 中文版 — DeerFlow 2.0 安装指南
2+
3+
[DeerFlow 2.0](https://github.com/bytedance/deer-flow)(字节跳动开源 SuperAgent)中使用 superpowers-zh 的完整指南。
4+
5+
## 快速安装
6+
7+
```bash
8+
cd /your/deerflow-project
9+
npx superpowers-zh
10+
```
11+
12+
安装脚本会自动检测 `deer_flow/` 目录并将 skills 复制到 `skills/custom/`
13+
14+
## 手动安装
15+
16+
```bash
17+
git clone https://github.com/jnMetaCode/superpowers-zh.git
18+
mkdir -p /your/deerflow-project/skills/custom
19+
cp -r superpowers-zh/skills/* /your/deerflow-project/skills/custom/
20+
```
21+
22+
## 工作原理
23+
24+
DeerFlow 2.0 使用 **Custom Skills** 机制扩展 Agent 能力:
25+
26+
- **目录**`skills/custom/`
27+
- **格式**:每个 skill 是一个目录,包含 `SKILL.md` 文件(Markdown + YAML frontmatter)
28+
- **加载方式**:DeerFlow 自动扫描 `skills/custom/` 下的所有目录,通过 `description` 字段匹配 skill
29+
30+
### Skills 格式兼容
31+
32+
superpowers-zh 的 SKILL.md 文件格式与 DeerFlow 自定义 skills 完全兼容。安装后,DeerFlow 会自动发现并加载所有 skills。
33+
34+
### 环境变量
35+
36+
如果你的 DeerFlow 项目不在当前目录,可以手动指定安装路径:
37+
38+
```bash
39+
export DEERFLOW_SKILLS_DIR=/path/to/deerflow/skills/custom
40+
cp -r superpowers-zh/skills/* $DEERFLOW_SKILLS_DIR/
41+
```
42+
43+
## 使用
44+
45+
安装后,在 DeerFlow 对话中引用 skill 名称即可:
46+
47+
- 「使用头脑风暴来分析这个需求」
48+
- 「用测试驱动开发来实现这个功能」
49+
- 「按系统化调试流程排查这个 bug」
50+
51+
DeerFlow 会根据 skill 的 `description` 自动匹配并加载。
52+
53+
## 更新
54+
55+
```bash
56+
cd /your/deerflow-project
57+
npx superpowers-zh
58+
```
59+
60+
重新运行安装命令即可更新到最新版本。
61+
62+
## 获取帮助
63+
64+
- 提交 Issue:https://github.com/jnMetaCode/superpowers-zh/issues
65+
- DeerFlow 文档:https://github.com/bytedance/deer-flow

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "superpowers-zh",
33
"version": "1.1.1",
4-
"description": "AI 编程超能力中文版 — 14 个翻译 + 5 个中国特色原创 skills",
4+
"description": "AI 编程超能力中文版 — 14 个翻译 + 6 个中国特色原创 skills",
55
"type": "module",
66
"main": ".opencode/plugins/superpowers.js",
77
"bin": {
@@ -29,6 +29,7 @@
2929
"codex",
3030
"gemini",
3131
"kiro",
32+
"deerflow",
3233
"trae",
3334
"antigravity",
3435
"vscode",

skills/workflow-runner/SKILL.md

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
---
2+
name: workflow-runner
3+
description: "在 Claude Code / OpenClaw / Cursor 中直接运行 agency-orchestrator YAML 工作流——无需 API key,使用当前会话的 LLM 作为执行引擎。当用户提供 .yaml 工作流文件或要求多角色协作完成任务时触发。"
4+
---
5+
6+
# 工作流执行器:在 AI 工具内运行多角色编排
7+
8+
直接在当前会话中执行 agency-orchestrator 的 YAML 工作流,无需配置 API key。当前 LLM 就是执行引擎——依次扮演每个角色完成任务。
9+
10+
## 适用场景
11+
12+
- 用户提供了一个 `.yaml` 工作流文件(如 `运行 workflows/story-creation.yaml`
13+
- 用户要求多个角色协作完成任务(如"用产品经理和架构师一起评审这个 PRD")
14+
- 用户安装了 `agency-agents-zh` 并希望直接在 AI 工具内编排多角色
15+
16+
## 执行流程(5 步)
17+
18+
按以下顺序执行,不要跳步:
19+
20+
### 第 1 步:解析工作流
21+
22+
用 Read 工具读取用户指定的 YAML 文件,提取以下字段:
23+
24+
```yaml
25+
name: "工作流名称"
26+
agents_dir: "agency-agents-zh" # 角色定义目录
27+
inputs: # 输入变量
28+
- name: xxx
29+
required: true/false
30+
default: "默认值"
31+
steps: # 执行步骤
32+
- id: step_id
33+
role: "category/agent-name" # 角色路径
34+
task: "任务描述 {{变量}}" # 支持模板变量
35+
output: variable_name # 输出变量名
36+
depends_on: [other_step_id] # 依赖关系
37+
```
38+
39+
**忽略 `llm`、`concurrency`、`timeout`、`retry` 配置**——Skill 模式使用当前会话的 LLM,这些字段仅用于 CLI 模式。
40+
41+
**定位角色目录**:用 Bash `test -d` 按以下顺序检查,用第一个存在的:
42+
1. 当前工作目录下的 `{agents_dir}/`(如 `./agency-agents-zh/`)
43+
2. `../{agents_dir}/`(上级目录)
44+
3. 相对于 YAML 文件所在目录的 `{agents_dir}/`
45+
4. `node_modules/agency-agents-zh/`
46+
47+
如果全部找不到,**停止执行**并提示用户:
48+
```
49+
找不到角色目录。请先安装:
50+
git clone --depth 1 https://github.com/jnMetaCode/agency-agents-zh.git
51+
或:npm install agency-agents-zh
52+
```
53+
54+
### 第 2 步:收集输入
55+
56+
- 对每个 `required: true` 的输入,检查用户消息中是否已提供值
57+
- 未提供的必填输入:**立即向用户询问**,不要猜测或用空值
58+
- 有 `default` 的可选输入:使用默认值
59+
- 无默认值的可选输入:设为空字符串
60+
61+
### 第 3 步:构建执行顺序
62+
63+
根据 `depends_on` 进行拓扑排序,将步骤分成多个层级:
64+
65+
- **无 depends_on 的步骤** → 第 1 层
66+
- **depends_on 全部在第 N 层或之前的步骤** → 第 N+1 层
67+
- **同一层内的步骤**互不依赖,可并行
68+
69+
在回复中展示执行计划:
70+
```
71+
执行计划(共 N 步):
72+
第 1 层: [step_id] — 角色名
73+
第 2 层: [step_a, step_b] — 并行
74+
第 3 层: [step_id] — 角色名
75+
```
76+
77+
### 第 4 步:逐层执行
78+
79+
对每一层:
80+
81+
#### 4a. 预读角色文件
82+
83+
用 Read 工具读取该层所有步骤的角色 `.md` 文件:`{角色目录}/{role}.md`
84+
85+
从文件中提取:
86+
- **角色名**:frontmatter 中的 `name` 字段
87+
- **角色 system prompt**:第二个 `---` 之后的全部 markdown 内容
88+
89+
#### 4b. 渲染 task 模板
90+
91+
将 task 中的 `{{变量名}}` 替换为:
92+
- 来自 inputs 的用户输入值
93+
- 来自前序步骤 output 的结果文本
94+
95+
#### 4c. 执行
96+
97+
**单步骤层**:直接在主会话中扮演该角色执行。格式:
98+
99+
```
100+
### Step N/Total: step_id(角色名)
101+
102+
[以该角色身份完成 task,使用角色的专业知识和沟通风格]
103+
```
104+
105+
**多步骤层(并行)**:使用 Agent 工具为每个步骤启动子代理。每个子代理的 prompt 必须包含:
106+
- 角色文件的**完整文本内容**(不是路径——子代理可能无法读文件)
107+
- 渲染后的 task 文本
108+
- 指令:"以上是你的角色定义,请以该角色身份完成以下任务,直接输出结果"
109+
110+
#### 4d. 保存输出到上下文
111+
112+
如果 step 有 `output` 字段,将该步骤的输出文本存入变量上下文,供后续步骤的 `{{变量}}` 使用。
113+
114+
### 第 5 步:保存结果并展示
115+
116+
用 Write 工具将结果保存到文件:
117+
118+
```
119+
.ao-output/{工作流名称}-{YYYY-MM-DD}/
120+
├── steps/
121+
│ ├── 1-{step_id}.md # 每步的输出
122+
│ ├── 2-{step_id}.md
123+
│ └── ...
124+
├── summary.md # 最后一步的完整输出(最终成果)
125+
└── metadata.json # 基本元数据
126+
```
127+
128+
metadata.json 格式:
129+
```json
130+
{
131+
"name": "工作流名称",
132+
"date": "2026-03-22",
133+
"success": true,
134+
"steps": [
135+
{"id": "step_id", "role": "category/agent", "status": "completed"},
136+
...
137+
]
138+
}
139+
```
140+
141+
执行完毕后,向用户展示:
142+
1. 最终成果(summary.md 的内容)
143+
2. 文件保存位置
144+
3. 执行了几个步骤
145+
146+
## 重要规则
147+
148+
<HARD-GATE>
149+
- 每个步骤都必须真正扮演对应角色,使用该角色的专业知识和沟通风格,不能泛泛回答
150+
- 角色切换必须明确——每步开始时标注角色名
151+
- 不要跳过步骤或合并步骤,严格按 DAG 层级顺序执行
152+
- 如果角色文件找不到,告知用户并建议安装 agency-agents-zh
153+
- 不要在没有读取角色 .md 文件的情况下执行步骤——必须先 Read 再执行
154+
</HARD-GATE>
155+
156+
## 没有 YAML 文件时的快捷模式
157+
158+
如果用户没有指定 YAML 文件,但描述了需要多角色协作的任务:
159+
160+
1. 根据用户描述,**自动生成** YAML 工作流定义
161+
2. 展示给用户确认
162+
3. 确认后按上述流程执行
163+
164+
示例:
165+
- 用户说"帮我用叙事学家和心理学家写个故事" → 生成 story-creation 类似的工作流
166+
- 用户说"让产品经理和架构师评审这个 PRD" → 生成 product-review 类似的工作流
167+
168+
## 故障处理
169+
170+
- **角色文件不存在**:提示用户运行 `ao init``npm install agency-agents-zh`
171+
- **模板变量未定义**:检查上下文,如果是必填输入则向用户询问
172+
- **步骤执行失败**:标记该步骤为失败,跳过所有依赖它的下游步骤,继续执行其他独立步骤

0 commit comments

Comments
 (0)