superpowers-zh 1.3.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/.cursor-plugin/plugin.json +2 -2
  5. package/.pi/extensions/superpowers.ts +121 -0
  6. package/CLAUDE.md +1 -1
  7. package/README.md +77 -34
  8. package/RELEASE-NOTES.zh.md +150 -0
  9. package/assets/qr-wechat.jpg +0 -0
  10. package/assets/sponsors/5cookie-code.png +0 -0
  11. package/bin/superpowers-zh.js +69 -18
  12. package/docs/README.antigravity.md +7 -7
  13. package/docs/README.kimi.md +86 -0
  14. package/docs/README.openclaw.md +7 -4
  15. package/docs/README.pi.md +54 -0
  16. package/docs/README.qoder.md +95 -0
  17. package/docs/README.trae.md +6 -4
  18. package/gemini-extension.json +1 -1
  19. package/hooks/hooks-cursor.json +1 -1
  20. package/hooks/session-start +4 -12
  21. package/package.json +18 -5
  22. package/skills/brainstorming/SKILL.md +5 -0
  23. package/skills/brainstorming/scripts/frame-template.html +25 -26
  24. package/skills/brainstorming/scripts/helper.js +101 -22
  25. package/skills/brainstorming/scripts/server.cjs +428 -43
  26. package/skills/brainstorming/scripts/start-server.sh +76 -20
  27. package/skills/brainstorming/scripts/stop-server.sh +74 -9
  28. package/skills/chinese-code-review/SKILL.md +5 -0
  29. package/skills/chinese-commit-conventions/SKILL.md +5 -0
  30. package/skills/chinese-documentation/SKILL.md +5 -0
  31. package/skills/chinese-git-workflow/SKILL.md +5 -0
  32. package/skills/dispatching-parallel-agents/SKILL.md +5 -0
  33. package/skills/executing-plans/SKILL.md +7 -2
  34. package/skills/finishing-a-development-branch/SKILL.md +112 -32
  35. package/skills/mcp-builder/SKILL.md +5 -0
  36. package/skills/receiving-code-review/SKILL.md +5 -0
  37. package/skills/requesting-code-review/SKILL.md +13 -10
  38. package/skills/requesting-code-review/code-reviewer.md +124 -104
  39. package/skills/subagent-driven-development/SKILL.md +5 -0
  40. package/skills/systematic-debugging/SKILL.md +5 -0
  41. package/skills/test-driven-development/SKILL.md +5 -0
  42. package/skills/using-git-worktrees/SKILL.md +104 -97
  43. package/skills/using-superpowers/SKILL.md +6 -1
  44. package/skills/using-superpowers/references/pi-tools.md +28 -0
  45. package/skills/using-superpowers/references/qoder-tools.md +43 -0
  46. package/skills/verification-before-completion/SKILL.md +5 -0
  47. package/skills/workflow-runner/SKILL.md +5 -0
  48. package/skills/writing-plans/SKILL.md +5 -0
  49. package/skills/writing-skills/SKILL.md +5 -0
@@ -53,7 +53,7 @@ const TARGETS = [
53
53
  { name: 'Kiro', dir: '.kiro/steering', detect: '.kiro' },
54
54
  { name: 'DeerFlow', dir: 'skills/custom', detect: 'deer_flow' },
55
55
  { name: 'Trae', dir: '.trae/skills', detect: '.trae' },
56
- { name: 'Antigravity', dir: '.antigravity/skills', detect: '.antigravity' },
56
+ { name: 'Antigravity', dir: '.agents/skills', detect: '.agents' },
57
57
  { name: 'VS Code', dir: '.github/superpowers', detect: '.github/copilot-instructions.md' },
58
58
  { name: 'OpenClaw', dir: 'skills', detect: '.openclaw' },
59
59
  { name: 'Windsurf', dir: '.windsurf/skills', detect: '.windsurf' },
@@ -63,6 +63,7 @@ const TARGETS = [
63
63
  { name: 'Qwen Code', dir: '.qwen/skills', detect: '.qwen' },
64
64
  { name: 'Hermes Agent', dir: '.hermes/skills', detect: ['.hermes', 'HERMES.md', '.hermes.md'] },
65
65
  { name: 'Claw Code', dir: '.claw/skills', detect: ['.claw', 'CLAW.md'] },
66
+ { name: 'Qoder', dir: '.qoder/skills', detect: '.qoder' },
66
67
  ];
67
68
 
68
69
  function countDirs(dir) {
@@ -141,6 +142,51 @@ ${skillTable}
141
142
  console.log(` ✅ Trae: bootstrap rule -> ${rulePath}`);
142
143
  }
143
144
 
145
+ function generateQoderBootstrap(projectDir) {
146
+ const rulesDir = resolve(projectDir, '.qoder', 'rules');
147
+ mkdirSync(rulesDir, { recursive: true });
148
+
149
+ const skillEntries = scanSkillEntries(SKILLS_SRC);
150
+ const skillTable = skillEntries.map(s => `| ${s.name} | ${s.desc} |`).join('\n');
151
+
152
+ // Qoder rules schema(来源:社区实际样本,docs.qoder.com/zh/user-guide/rules 没公开)
153
+ // trigger: always_on → "始终生效",适用于所有智能会话和内联对话
154
+ // trigger: model_decision + description: ... → 模型按描述自主决定
155
+ // trigger: manual → 仅 @rule 手动触发
156
+ const rule = `---
157
+ trigger: always_on
158
+ alwaysApply: true
159
+ ---
160
+
161
+ # Superpowers-ZH 中文增强版
162
+
163
+ 你已加载 superpowers-zh 技能框架(${skillEntries.length} 个 skills)。
164
+
165
+ ## 核心规则
166
+
167
+ 1. **收到任务时,先检查是否有匹配的 skill** — 哪怕只有 1% 的可能性也要检查
168
+ 2. **设计先于编码** — 收到功能需求时,先用 brainstorming skill 做需求分析
169
+ 3. **测试先于实现** — 写代码前先写测试(TDD)
170
+ 4. **验证先于完成** — 声称完成前必须运行验证命令
171
+
172
+ ## 可用 Skills
173
+
174
+ Skills 位于 \`.qoder/skills/\` 目录,每个 skill 有独立的 \`SKILL.md\` 文件。
175
+
176
+ | Skill | 触发条件 |
177
+ |-------|---------|
178
+ ${skillTable}
179
+
180
+ ## 如何使用
181
+
182
+ 当任务匹配某个 skill 的触发条件时,读取对应的 \`.qoder/skills/<skill-name>/SKILL.md\` 并严格遵循其流程。也可输入 \`/<skill-name>\` 显式调用。
183
+ `;
184
+
185
+ const rulePath = resolve(rulesDir, 'superpowers-zh.md');
186
+ writeFileSync(rulePath, rule, 'utf8');
187
+ console.log(` ✅ Qoder: bootstrap rule -> ${rulePath}`);
188
+ }
189
+
144
190
  function generateAntigravityBootstrap(projectDir) {
145
191
  const skillEntries = scanSkillEntries(SKILLS_SRC);
146
192
  const skillList = skillEntries.map(s => `- **${s.name}**: ${s.desc}`).join('\n');
@@ -158,17 +204,17 @@ function generateAntigravityBootstrap(projectDir) {
158
204
 
159
205
  ## 可用 Skills
160
206
 
161
- Skills 位于 \`.antigravity/skills/\` 目录,每个 skill 有独立的 \`SKILL.md\` 文件。
207
+ Skills 位于 \`.agents/skills/\` 目录,每个 skill 有独立的 \`SKILL.md\` 文件。
162
208
 
163
209
  ${skillList}
164
210
 
165
211
  ## 如何使用
166
212
 
167
- 当任务匹配某个 skill 时,读取对应的 \`.antigravity/skills/<skill-name>/SKILL.md\` 并严格遵循其流程。
213
+ 当任务匹配某个 skill 时,读取对应的 \`.agents/skills/<skill-name>/SKILL.md\` 并严格遵循其流程。
168
214
  `;
169
215
 
170
- // 写入 .antigravity/rules.md(不覆盖用户已有的 GEMINI.md / AGENTS.md)
171
- const rulePath = resolve(projectDir, '.antigravity', 'rules.md');
216
+ // 写入 .agents/rules.md(不覆盖用户已有的 GEMINI.md / AGENTS.md)
217
+ const rulePath = resolve(projectDir, '.agents', 'rules.md');
172
218
  writeFileSync(rulePath, content, 'utf8');
173
219
  console.log(` ✅ Antigravity: bootstrap rule -> ${rulePath}`);
174
220
  }
@@ -385,6 +431,7 @@ const TOOL_ALIASES = {
385
431
  'claw': 'Claw Code',
386
432
  'claw-code': 'Claw Code',
387
433
  'clawcode': 'Claw Code',
434
+ 'qoder': 'Qoder',
388
435
  };
389
436
 
390
437
  function showHelp() {
@@ -437,6 +484,10 @@ function installForTarget(target) {
437
484
  generateTraeBootstrapRule(PROJECT_DIR);
438
485
  }
439
486
 
487
+ if (target.name === 'Qoder') {
488
+ generateQoderBootstrap(PROJECT_DIR);
489
+ }
490
+
440
491
  if (target.name === 'Antigravity') {
441
492
  generateAntigravityBootstrap(PROJECT_DIR);
442
493
  }
@@ -469,7 +520,8 @@ function isHomeDir(p) {
469
520
  // 卸载支持:完整删除的 bootstrap 文件、需要清理段落的 bootstrap 文件
470
521
  const BOOTSTRAP_DELETE = [
471
522
  '.trae/rules/superpowers-zh.md',
472
- '.antigravity/rules.md',
523
+ '.qoder/rules/superpowers-zh.md',
524
+ '.agents/rules.md',
473
525
  ];
474
526
  const BOOTSTRAP_CLEAN_SECTION = [
475
527
  'CLAUDE.md',
@@ -696,18 +748,17 @@ function install(forceToolName, force) {
696
748
  }
697
749
 
698
750
  if (installed === 0) {
699
- console.log(' ⚠️ 未检测到任何已知的 AI 编程工具。\n');
700
- console.log(' 如果你使用的是 Cursor、Trae 等工具,请用 --tool 指定:');
701
- console.log(' npx superpowers-zh --tool cursor');
702
- console.log(' npx superpowers-zh --tool trae\n');
703
- console.log(' 现在将默认安装到 .claude/skills/(兼容 Claude Code / OpenClaw)\n');
704
-
705
- const dest = resolve(PROJECT_DIR, '.claude', 'skills');
706
- mkdirSync(dest, { recursive: true });
707
- copyDirSync(SKILLS_SRC, dest);
708
- console.log(` ✅ 默认安装: ${countDirs(dest)} 个 skills -> ${dest}`);
709
-
710
- generateClaudeCodeBootstrap(PROJECT_DIR);
751
+ // 检测落空时不再静默装 Claude Code —— 否则 Antigravity / Trae 等
752
+ // 不会在项目里留下检测目录的工具,会被误装成 Claude(见 issue #33)。
753
+ // 改为明确报错并教用户用 --tool 显式指定。
754
+ console.log(' ⚠️ 未在当前目录检测到任何已知 AI 编程工具的项目标记。\n');
755
+ console.log(' 为避免装错工具,未做任何安装。请用 --tool 显式指定你的工具,例如:\n');
756
+ console.log(' npx superpowers-zh --tool claude # Claude Code / Copilot CLI');
757
+ console.log(' npx superpowers-zh --tool antigravity # Google Antigravity');
758
+ console.log(' npx superpowers-zh --tool trae # Trae');
759
+ console.log(' npx superpowers-zh --tool cursor # Cursor\n');
760
+ console.log(` 全部可用别名:${Object.keys(TOOL_ALIASES).join(', ')}\n`);
761
+ process.exit(1);
711
762
  }
712
763
 
713
764
  console.log('\n 安装完成!重启你的 AI 编程工具即可生效。\n');
@@ -9,14 +9,14 @@ cd /your/project
9
9
  npx superpowers-zh
10
10
  ```
11
11
 
12
- 安装脚本会自动检测 `.antigravity/` 目录并将 skills 复制到该目录。
12
+ 安装脚本会自动检测 `.agents/` 目录并将 skills 复制到该目录。
13
13
 
14
14
  ## 手动安装
15
15
 
16
16
  ```bash
17
17
  git clone https://github.com/jnMetaCode/superpowers-zh.git
18
- mkdir -p /your/project/.antigravity/skills
19
- cp -r superpowers-zh/skills/* /your/project/.antigravity/skills/
18
+ mkdir -p /your/project/.agents/skills
19
+ cp -r superpowers-zh/skills/* /your/project/.agents/skills/
20
20
  ```
21
21
 
22
22
  ## 工作原理
@@ -27,7 +27,7 @@ Antigravity 支持多种规则文件格式:
27
27
  |------|--------|------|
28
28
  | `GEMINI.md` | 最高 | Antigravity 专属规则 |
29
29
  | `AGENTS.md` | 中 | 通用规则(Antigravity、Cursor、Claude Code 共享) |
30
- | `.antigravity/rules.md` | 中 | 项目级规则目录 |
30
+ | `.agents/rules.md` | 中 | 项目级规则目录 |
31
31
  | `CLAUDE.md` | 低 | 也会被自动读取 |
32
32
 
33
33
  ### 推荐配置方式
@@ -37,10 +37,10 @@ Antigravity 支持多种规则文件格式:
37
37
  ```markdown
38
38
  # GEMINI.md
39
39
 
40
- 使用 .antigravity/ 目录下的 superpowers skills 来指导工作流程。
40
+ 使用 .agents/ 目录下的 superpowers skills 来指导工作流程。
41
41
  优先使用 brainstorming(头脑风暴)开始新任务。
42
42
 
43
- Skills 列表参见 .antigravity/ 目录。
43
+ Skills 列表参见 .agents/ 目录。
44
44
  ```
45
45
 
46
46
  **方式二**:在 `AGENTS.md` 中引用(多工具共享):
@@ -49,7 +49,7 @@ Skills 列表参见 .antigravity/ 目录。
49
49
  # AGENTS.md
50
50
 
51
51
  本项目使用 superpowers-zh skills 框架。
52
- Skills 位于 .antigravity/(Antigravity)或 .claude/skills/(Claude Code)目录下。
52
+ Skills 位于 .agents/(Antigravity)或 .claude/skills/(Claude Code)目录下。
53
53
  ```
54
54
 
55
55
  ### 工具映射
@@ -0,0 +1,86 @@
1
+ # Superpowers 中文版 · Kimi Code 指南
2
+
3
+ 在 [Kimi Code](https://github.com/MoonshotAI/kimi-code) 上使用 superpowers-zh 的完整说明。
4
+
5
+ ## 安装
6
+
7
+ superpowers-zh 通过 Kimi Code 的插件清单 `.kimi-plugin/plugin.json` 集成,**直接指向仓库现有的 `skills/` 目录**——不复制 skill、不建 symlink、不装 hook、无任何运行时依赖。
8
+
9
+ 打开插件管理器:
10
+
11
+ ```text
12
+ /plugins
13
+ ```
14
+
15
+ 如果 Kimi 插件市场已收录,进入 `Marketplace` > `Superpowers 中文版` 安装即可。
16
+
17
+ 也可以直接从本仓库安装:
18
+
19
+ ```text
20
+ /plugins install https://github.com/jnMetaCode/superpowers-zh
21
+ ```
22
+
23
+ 如需验证尚未发布的改动,显式指定分支:
24
+
25
+ ```text
26
+ /plugins install https://github.com/jnMetaCode/superpowers-zh/tree/main
27
+ ```
28
+
29
+ Kimi Code 在**新会话**才会应用插件变更。安装、更新、启用、禁用或重载插件后,用 `/new` 开一个新会话。
30
+
31
+ ## 工作原理
32
+
33
+ Kimi 插件清单位于 `.kimi-plugin/plugin.json`,做三件事:
34
+
35
+ 1. 把 Kimi Code 指向仓库现有的 `skills/` 目录;
36
+ 2. 通过 `sessionStart.skill` 在会话开始时加载 `using-superpowers`(这是让 skill 在恰当时机自动触发的关键);
37
+ 3. 通过 `skillInstructions` 提供 Kimi 专属的工具映射。
38
+
39
+ ## 工具映射
40
+
41
+ skill 内容描述的是「动作」而非写死某个运行时的工具名。在 Kimi Code 上它们对应到:
42
+
43
+ - 「向用户提问」/「问澄清问题」/「给出多选项」→ `AskUserQuestion`
44
+ - 「创建待办」/「在待办清单中标记完成」→ `TodoList`
45
+ - 「分派子智能体」/「Task tool (general-purpose)」→ `Agent`(用 Kimi 的 subagent 类型,如 `coder`/`explore`/`plan`,**不要**传 `general-purpose`)
46
+ - 「调用某个 skill」→ Kimi Code 原生 `Skill` 工具
47
+ - 「读文件」/「写文件」/「改文件」→ `Read` / `Write` / `Edit`
48
+ - 「跑 shell 命令」→ `Bash`
49
+ - 「搜索文件内容」→ `Grep`
50
+ - 「按路径/模式找文件」→ `Glob`
51
+ - 「抓取 URL」→ `FetchURL`
52
+ - 「联网搜索」→ `WebSearch`
53
+
54
+ 完整映射写在清单的 `skillInstructions` 字段里,由 Kimi 在运行时读取。
55
+
56
+ ## 更新
57
+
58
+ 用 Kimi Code 的插件管理器:
59
+
60
+ ```text
61
+ /plugins
62
+ ```
63
+
64
+ 选中 Superpowers 中文版更新,更新后用 `/new` 开新会话。
65
+
66
+ ## 排错
67
+
68
+ ### 插件没加载
69
+
70
+ 1. 跑 `/plugins info superpowers-zh` 看诊断信息;
71
+ 2. 确认插件已启用;
72
+ 3. 安装或更新后用 `/new` 开新会话。
73
+
74
+ ### 直接 GitHub 安装装到了旧版本
75
+
76
+ 对于裸仓库 URL,Kimi Code 会装最新的 GitHub release(若存在)。要在下一个 release 前测试未发布的改动,显式指定分支:
77
+
78
+ ```text
79
+ /plugins install https://github.com/jnMetaCode/superpowers-zh/tree/main
80
+ ```
81
+
82
+ ### skill 不触发
83
+
84
+ 1. 用 `/plugins info superpowers-zh` 确认插件已启用;
85
+ 2. 用 `/new` 开新会话;
86
+ 3. 试验收提示词:`我们来做个 react todo list`。集成正常的话,会在写任何代码之前先加载 `brainstorming`。
@@ -62,11 +62,14 @@ OpenClaw 与 Claude Code 使用相同的工具名称,skills 无需额外适配
62
62
 
63
63
  ## 使用
64
64
 
65
- 安装完成后重启 OpenClaw,所有 skills 会自动生效。你可以:
65
+ 安装完成后重启 OpenClaw,所有 skills 会自动生效。AI 会按任务上下文自动调用对应 skill:
66
66
 
67
- - 输入 `/brainstorming` 开始头脑风暴
68
- - 输入 `/commit` 使用中文提交规范
69
- - 在任何编码任务中,skills 会被自动调用
67
+ - 新任务 / 新功能 → `brainstorming`(头脑风暴)
68
+ - 写 commit message → `chinese-commit-conventions`(中文 commit 规范)
69
+ - 调试问题 → `systematic-debugging`
70
+ - 完成任务后 → `requesting-code-review`(请求代码审查)
71
+
72
+ 无需手动 slash command 触发 —— AI 通过 skill frontmatter 的 `description` 字段自主选择匹配的 skill。如果想强制触发某个 skill,直接在指令里点名:"用 brainstorming 帮我想一下 X 怎么做"。
70
73
 
71
74
  ## 全局 Skills
72
75
 
@@ -0,0 +1,54 @@
1
+ # Superpowers 中文版 · Pi 指南
2
+
3
+ 在 [Pi](https://github.com/earendil-works/pi)(oh-my-pi)上使用 superpowers-zh 的完整说明。
4
+
5
+ ## 安装
6
+
7
+ superpowers-zh 通过 Pi 的扩展机制集成,**直接指向仓库现有的 `skills/` 目录**——不复制 skill、不建 symlink、无额外运行时依赖。
8
+
9
+ 集成由 `package.json` 里的 `pi` 字段声明:
10
+
11
+ ```json
12
+ "pi": {
13
+ "skills": ["./skills"],
14
+ "extensions": ["./.pi/extensions/superpowers.ts"]
15
+ }
16
+ ```
17
+
18
+ 并带 `pi-package` keyword,便于 Pi 发现这是一个 Pi 包。
19
+
20
+ 按 Pi 的包安装方式安装 `superpowers-zh`(参考 Pi 文档的包管理命令),Pi 会读取上述 `pi` 配置,挂载 `skills/` 并加载 `.pi/extensions/superpowers.ts` 扩展。
21
+
22
+ ## 工作原理
23
+
24
+ `.pi/extensions/superpowers.ts` 注册了 Pi 的生命周期钩子:
25
+
26
+ 1. **`resources_discover`** — 把仓库的 `skills/` 目录贡献给 Pi 的技能系统;
27
+ 2. **`session_start` / `session_compact`** — 标记需要重新注入 bootstrap;
28
+ 3. **`context`** — 在会话上下文中注入 `using-superpowers` 的内容(去除 frontmatter)+ Pi 工具映射,作为「You have superpowers」bootstrap,让 skill 在恰当时机被遵循;
29
+ 4. **`agent_end`** — 一轮结束后停止重复注入。
30
+
31
+ 注入带有唯一标记,已存在时不会重复注入;并且会插入到 compaction summary 之后,避免被压缩流程吞掉。
32
+
33
+ ## 工具映射
34
+
35
+ Pi 有原生技能系统,但**不暴露** `Skill` 工具。skill 内容描述「动作」,在 Pi 上对应到小写工具:
36
+
37
+ - 「调用某个 skill」→ Pi 原生技能:用 `read` 加载对应 `SKILL.md`,或由人类显式 `/skill:name`
38
+ - 「读/写/改文件」→ `read` / `write` / `edit`
39
+ - 「跑 shell 命令」→ `bash`
40
+ - 「搜索文件内容」→ `grep`,「按名找文件」→ `find`,「列目录」→ `ls`
41
+ - 「分派子智能体」→ 若装了 `pi-subagents` 的 `subagent` 工具则用之;没有则在本会话内完成或说明能力缺失,**不要**臆造 `Task` 调用
42
+ - 「待办清单」→ 若装了 todo/task 工具则用之;否则用 plan 文件或仓库内 `TODO.md` 跟踪;旧的 `TodoWrite` 引用按此处理
43
+
44
+ 完整映射见 [`skills/using-superpowers/references/pi-tools.md`](../skills/using-superpowers/references/pi-tools.md),扩展也会把同样的映射注入会话。
45
+
46
+ ## 验证
47
+
48
+ ```bash
49
+ bash tests/pi/run-tests.sh
50
+ ```
51
+
52
+ 该测试动态加载扩展并校验:声明了 `pi` 包配置、注册了正确的生命周期钩子(且无 pre-compaction 注入)、`resources_discover` 贡献了 `skills/` 目录、`session_start` 注入了「You have superpowers」+「Pi tool mapping」、pi-tools 参考文档存在。
53
+
54
+ > 注:扩展是 TypeScript(仅 `import type`,运行时无类型依赖)。Node 22.6–23.5 需 `--experimental-strip-types`(run-tests.sh 已带),23.6+ 默认支持。
@@ -0,0 +1,95 @@
1
+ # Superpowers 中文版 — Qoder 安装指南
2
+
3
+ 在 [Qoder](https://qoder.com)(阿里推出的 AI IDE)中使用 superpowers-zh 的完整指南。
4
+
5
+ ## 自动安装
6
+
7
+ ```bash
8
+ cd /your/project
9
+ npx superpowers-zh
10
+ ```
11
+
12
+ 安装脚本会自动检测 `.qoder/` 目录并:
13
+
14
+ 1. 把 20 个 skills 复制到 `.qoder/skills/<name>/SKILL.md`
15
+ 2. 生成一个**始终生效**的 bootstrap rule `.qoder/rules/superpowers-zh.md`(`trigger: always_on`),让 Qoder 每个会话都加载核心规则与 skill 索引
16
+
17
+ 如果项目目录里还没有 `.qoder/`,可以显式指定:
18
+
19
+ ```bash
20
+ npx superpowers-zh --tool qoder
21
+ ```
22
+
23
+ ## 手动安装
24
+
25
+ ```bash
26
+ git clone https://github.com/jnMetaCode/superpowers-zh.git
27
+ cp -r superpowers-zh/skills /your/project/.qoder/skills
28
+ ```
29
+
30
+ 或全局安装(对所有项目生效):
31
+
32
+ ```bash
33
+ cp -r superpowers-zh/skills ~/.qoder/skills
34
+ ```
35
+
36
+ ## Skill 加载优先级
37
+
38
+ | 位置 | 优先级 | 说明 |
39
+ |------|--------|------|
40
+ | `.qoder/skills/` | 最高 | 项目级,仅当前项目 |
41
+ | `~/.qoder/skills/` | 中 | 用户级,所有项目共享 |
42
+
43
+ > 同名 skill 项目级覆盖用户级。
44
+
45
+ ## 使用
46
+
47
+ 1. 安装完成后**重启 Qoder**
48
+ 2. 在对话框输入 `/` 即可看到已加载的 skills 列表
49
+ 3. bootstrap rule(`.qoder/rules/superpowers-zh.md`)会被 Qoder 识别为"始终生效",每个会话自动加载核心规则
50
+ 4. Qoder 还会根据 skill 的 `description` 自动判断何时调用;也可输入 `/<skill-name>` 手动触发
51
+
52
+ > Qoder Rules schema(`trigger: always_on` / `model_decision` / `manual`)来自社区实际样本,官方文档(docs.qoder.com/zh/user-guide/rules)目前只公开 UI 配置流程未公开 frontmatter schema。如果 Qoder 后续改了 schema,rule 文件可能需要打开 Qoder Settings → Rules 重新选择类型。
53
+
54
+ ## 工具映射说明
55
+
56
+ skills 中引用的 Claude Code 工具名称(`Read` / `Write` / `Edit` / `Bash` / `Grep` / `Glob` / `WebFetch` / `WebSearch` 等)在 Qoder 中**同名对应**,无需额外映射。
57
+
58
+ 少数差异:
59
+
60
+ | Claude Code | Qoder 等价 |
61
+ |-------------|-----------|
62
+ | `EnterPlanMode` / `ExitPlanMode` | `EnterSpecMode` / `ExitSpecMode` |
63
+ | `Task`(子 agent) | `Task`(支持 `explore-agent` / `plan-agent` / `qoder-guide` 等 agent 类型)|
64
+ | `TodoWrite` | `TodoWrite` |
65
+
66
+ > Skill 是工作方法论,不是工具实现 —— 即使工具名略有差异,模型也会自动选用最近似的 Qoder 工具完成。无需为 Qoder 重写 skill。
67
+
68
+ ## 故障排查
69
+
70
+ ### 装好了但 `/` 看不到 skills
71
+
72
+ 1. 确认 `.qoder/skills/<skill-name>/SKILL.md` 文件存在
73
+ 2. 确认 `SKILL.md` 文件的 frontmatter 完整(`name` + `description`,`description` 不超过 1024 字符)
74
+ 3. **必须重启 Qoder** —— 新装的 skill 不会热加载
75
+
76
+ ### skill 不被自动调用
77
+
78
+ Qoder 按 description 文本匹配用户意图来决定何时调用 skill。如果某个 skill 自动调用不可靠,可在对话中显式输入 `/<skill-name>` 手动触发。
79
+
80
+ 中国原创的 4 个 `chinese-*` skill 本身就是**手动触发**设计(避免污染上游 skill 的自动调度),需要显式 `/chinese-code-review` / `/chinese-commit-conventions` 等。
81
+
82
+ ## 卸载
83
+
84
+ ```bash
85
+ cd /your/project
86
+ npx superpowers-zh --uninstall
87
+ ```
88
+
89
+ 会移除 `.qoder/skills/` 目录下所有 superpowers-zh 装的 skill 文件夹(保留你自己写的)。
90
+
91
+ ## 获取帮助
92
+
93
+ - 提交 Issue:https://github.com/jnMetaCode/superpowers-zh/issues
94
+ - 项目主页:https://github.com/jnMetaCode/superpowers-zh
95
+ - Qoder 官方文档:https://docs.qoder.com/zh/extensions/skills
@@ -9,16 +9,18 @@ cd /your/project
9
9
  npx superpowers-zh
10
10
  ```
11
11
 
12
- 安装脚本会自动检测 `.trae/` 目录并将 skills 复制到 `.trae/rules/`。
12
+ 安装脚本会自动检测 `.trae/` 目录,将各 skill 完整复制到 `.trae/skills/`(含 `SKILL.md` 及其 `scripts/` 等附属文件),并在 `.trae/rules/superpowers-zh.md` 生成一份 bootstrap 规则用于自动触发。
13
13
 
14
14
  ## 手动安装
15
15
 
16
16
  ```bash
17
17
  git clone https://github.com/jnMetaCode/superpowers-zh.git
18
- mkdir -p /your/project/.trae/rules
19
- cp -r superpowers-zh/skills/* /your/project/.trae/rules/
18
+ mkdir -p /your/project/.trae/skills
19
+ cp -r superpowers-zh/skills/* /your/project/.trae/skills/
20
20
  ```
21
21
 
22
+ > 手动复制只会放好 skill 文件,不会生成 `.trae/rules/` 下的 bootstrap 自动触发规则。建议优先用上面的 `npx superpowers-zh`,否则需要在对话里手动点名 skill 才会激活。
23
+
22
24
  ## 工作原理
23
25
 
24
26
  Trae 使用 `.rules` 机制管理 AI 行为:
@@ -32,7 +34,7 @@ Trae 使用 `.rules` 机制管理 AI 行为:
32
34
 
33
35
  ### Skills 适配
34
36
 
35
- superpowers-zh 的 SKILL.md 文件可以直接作为 Trae 的 rules 使用。Trae 会在初始化时加载 `.trae/rules/` 下的所有规则文件。
37
+ 安装器把各 skill 放在 `.trae/skills/<skill-name>/`,并在 `.trae/rules/superpowers-zh.md` 写入一份 bootstrap 规则。Trae 初始化时加载 `.trae/rules/` 下的规则,bootstrap 规则会引导 AI 在任务匹配时读取对应的 `.trae/skills/<skill-name>/SKILL.md` 并遵循其流程。
36
38
 
37
39
  ### 推荐配置
38
40
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superpowers-zh",
3
3
  "description": "AI 编程超能力中文版 — TDD、调试、代码审查等经过实战验证的工作方法论",
4
- "version": "1.1.6",
4
+ "version": "1.6.0",
5
5
  "contextFileName": "GEMINI.md"
6
6
  }
@@ -3,7 +3,7 @@
3
3
  "hooks": {
4
4
  "sessionStart": [
5
5
  {
6
- "command": "./hooks/session-start"
6
+ "command": "./hooks/run-hook.cmd session-start"
7
7
  }
8
8
  ]
9
9
  }
@@ -7,13 +7,6 @@ set -euo pipefail
7
7
  SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
8
8
  PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
9
9
 
10
- # Check if legacy skills directory exists and build warning
11
- warning_message=""
12
- legacy_skills_dir="${HOME}/.config/superpowers/skills"
13
- if [ -d "$legacy_skills_dir" ]; then
14
- warning_message="\n\n<important-reminder>IN YOUR FIRST REPLY AFTER SEEING THIS MESSAGE YOU MUST TELL THE USER:⚠️ **WARNING:** Superpowers now uses Claude Code's skills system. Custom skills in ~/.config/superpowers/skills will not be read. Move custom skills to ~/.claude/skills instead. To make this message go away, remove ~/.config/superpowers/skills</important-reminder>"
15
- fi
16
-
17
10
  # Read using-superpowers content
18
11
  using_superpowers_content=$(cat "${PLUGIN_ROOT}/skills/using-superpowers/SKILL.md" 2>&1 || echo "Error reading using-superpowers skill")
19
12
 
@@ -31,8 +24,7 @@ escape_for_json() {
31
24
  }
32
25
 
33
26
  using_superpowers_escaped=$(escape_for_json "$using_superpowers_content")
34
- warning_escaped=$(escape_for_json "$warning_message")
35
- session_context="<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Below is the full content of your 'superpowers:using-superpowers' skill - your introduction to using skills. For all other skills, use the 'Skill' tool:**\n\n${using_superpowers_escaped}\n\n${warning_escaped}\n</EXTREMELY_IMPORTANT>"
27
+ session_context="<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Below is the full content of your 'superpowers:using-superpowers' skill - your introduction to using skills. For all other skills, use the 'Skill' tool:**\n\n${using_superpowers_escaped}\n</EXTREMELY_IMPORTANT>"
36
28
 
37
29
  # Output context injection as JSON.
38
30
  # Cursor hooks expect additional_context (snake_case).
@@ -45,13 +37,13 @@ session_context="<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Below is the
45
37
  # See: https://github.com/obra/superpowers/issues/571
46
38
  if [ -n "${CURSOR_PLUGIN_ROOT:-}" ]; then
47
39
  # Cursor sets CURSOR_PLUGIN_ROOT (may also set CLAUDE_PLUGIN_ROOT)
48
- printf '{\n "additional_context": "%s"\n}\n' "$session_context"
40
+ printf '{\n "additional_context": "%s"\n}\n' "$session_context" | cat
49
41
  elif [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -z "${COPILOT_CLI:-}" ]; then
50
42
  # Claude Code sets CLAUDE_PLUGIN_ROOT without COPILOT_CLI
51
- printf '{\n "hookSpecificOutput": {\n "hookEventName": "SessionStart",\n "additionalContext": "%s"\n }\n}\n' "$session_context"
43
+ printf '{\n "hookSpecificOutput": {\n "hookEventName": "SessionStart",\n "additionalContext": "%s"\n }\n}\n' "$session_context" | cat
52
44
  else
53
45
  # Copilot CLI (sets COPILOT_CLI=1) or unknown platform — SDK standard format
54
- printf '{\n "additionalContext": "%s"\n}\n' "$session_context"
46
+ printf '{\n "additionalContext": "%s"\n}\n' "$session_context" | cat
55
47
  fi
56
48
 
57
49
  exit 0
package/package.json CHANGED
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "name": "superpowers-zh",
3
- "version": "1.3.0",
3
+ "version": "1.6.0",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },
7
- "description": "AI 编程超能力中文增强版 — superpowers(99k+ ⭐)完整汉化 + 6 个中国原创 skills,支持 Claude Code / Copilot CLI / Hermes Agent / Cursor / Claw Code / Windsurf / Kiro / Gemini CLI 等 17 款工具",
7
+ "description": "AI 编程超能力中文增强版 — superpowers(159k+ ⭐)完整汉化 + 4 个中国原创 skills,支持 Claude Code / Copilot CLI / Hermes Agent / Cursor / Claw Code / Windsurf / Kiro / Gemini CLI / Qoder 等 18 款工具",
8
8
  "type": "module",
9
9
  "main": ".opencode/plugins/superpowers.js",
10
10
  "bin": {
11
11
  "superpowers-zh": "bin/superpowers-zh.js"
12
12
  },
13
13
  "scripts": {
14
- "version": "node scripts/sync-plugin-version.js && git add .claude-plugin/plugin.json .claude-plugin/marketplace.json .cursor-plugin/plugin.json .codex-plugin/plugin.json"
14
+ "site": "node site/build.mjs",
15
+ "site:deploy": "node site/build.mjs && wrangler pages deploy site/dist --project-name=superpowers-zh-site",
16
+ "version": "node scripts/sync-plugin-version.js && git add .claude-plugin/plugin.json .claude-plugin/marketplace.json .cursor-plugin/plugin.json .codex-plugin/plugin.json gemini-extension.json"
15
17
  },
16
18
  "files": [
17
19
  "bin/",
@@ -24,6 +26,7 @@
24
26
  ".codex-plugin/",
25
27
  ".opencode/INSTALL.md",
26
28
  ".opencode/plugins/",
29
+ ".pi/extensions/",
27
30
  "CLAUDE.md",
28
31
  "GEMINI.md",
29
32
  "RELEASE-NOTES.md",
@@ -53,17 +56,27 @@
53
56
  "hermes",
54
57
  "hermes-agent",
55
58
  "claw-code",
59
+ "qoder",
56
60
  "ai-coding",
57
61
  "skills",
58
62
  "chinese",
59
63
  "中文",
60
64
  "tdd",
61
65
  "debugging",
62
- "code-review"
66
+ "code-review",
67
+ "pi-package"
63
68
  ],
69
+ "pi": {
70
+ "skills": [
71
+ "./skills"
72
+ ],
73
+ "extensions": [
74
+ "./.pi/extensions/superpowers.ts"
75
+ ]
76
+ },
64
77
  "repository": {
65
78
  "type": "git",
66
- "url": "https://github.com/jnMetaCode/superpowers-zh.git"
79
+ "url": "git+https://github.com/jnMetaCode/superpowers-zh.git"
67
80
  },
68
81
  "homepage": "https://github.com/jnMetaCode/superpowers-zh",
69
82
  "author": "jnMetaCode",
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: brainstorming
3
3
  description: "在任何创造性工作之前必须使用此技能——创建功能、构建组件、添加功能或修改行为。在实现之前先探索用户意图、需求和设计。"
4
+ version: "1.0.0"
5
+ license: MIT
6
+ metadata:
7
+ hermes:
8
+ tags: [design, planning]
4
9
  ---
5
10
 
6
11
  # 头脑风暴:将想法转化为设计