superpowers-zh 1.1.6 → 1.1.8

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 (116) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.cursor-plugin/plugin.json +2 -2
  4. package/.opencode/plugins/superpowers.js +13 -25
  5. package/README.md +17 -8
  6. package/bin/superpowers-zh.js +101 -11
  7. package/docs/README.hermes.md +96 -0
  8. package/gemini-extension.json +1 -1
  9. package/hooks/session-start +11 -11
  10. package/package.json +8 -4
  11. package/skills/chinese-git-workflow/SKILL.md +54 -17
  12. package/skills/using-superpowers/SKILL.md +5 -1
  13. package/skills/using-superpowers/references/copilot-tools.md +52 -0
  14. package/skills/using-superpowers/references/hermes-tools.md +44 -0
  15. package/.codex/skills/brainstorming/SKILL.md +0 -164
  16. package/.codex/skills/brainstorming/scripts/frame-template.html +0 -214
  17. package/.codex/skills/brainstorming/scripts/helper.js +0 -88
  18. package/.codex/skills/brainstorming/scripts/server.cjs +0 -338
  19. package/.codex/skills/brainstorming/scripts/start-server.sh +0 -153
  20. package/.codex/skills/brainstorming/scripts/stop-server.sh +0 -55
  21. package/.codex/skills/brainstorming/spec-document-reviewer-prompt.md +0 -48
  22. package/.codex/skills/brainstorming/visual-companion.md +0 -286
  23. package/.codex/skills/chinese-code-review/SKILL.md +0 -277
  24. package/.codex/skills/chinese-commit-conventions/SKILL.md +0 -364
  25. package/.codex/skills/chinese-documentation/SKILL.md +0 -448
  26. package/.codex/skills/chinese-git-workflow/SKILL.md +0 -510
  27. package/.codex/skills/dispatching-parallel-agents/SKILL.md +0 -182
  28. package/.codex/skills/executing-plans/SKILL.md +0 -175
  29. package/.codex/skills/finishing-a-development-branch/SKILL.md +0 -200
  30. package/.codex/skills/mcp-builder/SKILL.md +0 -255
  31. package/.codex/skills/receiving-code-review/SKILL.md +0 -213
  32. package/.codex/skills/requesting-code-review/SKILL.md +0 -105
  33. package/.codex/skills/requesting-code-review/code-reviewer.md +0 -146
  34. package/.codex/skills/subagent-driven-development/SKILL.md +0 -277
  35. package/.codex/skills/subagent-driven-development/code-quality-reviewer-prompt.md +0 -26
  36. package/.codex/skills/subagent-driven-development/implementer-prompt.md +0 -113
  37. package/.codex/skills/subagent-driven-development/spec-reviewer-prompt.md +0 -61
  38. package/.codex/skills/systematic-debugging/CREATION-LOG.md +0 -119
  39. package/.codex/skills/systematic-debugging/SKILL.md +0 -296
  40. package/.codex/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
  41. package/.codex/skills/systematic-debugging/condition-based-waiting.md +0 -115
  42. package/.codex/skills/systematic-debugging/defense-in-depth.md +0 -122
  43. package/.codex/skills/systematic-debugging/find-polluter.sh +0 -63
  44. package/.codex/skills/systematic-debugging/root-cause-tracing.md +0 -169
  45. package/.codex/skills/systematic-debugging/test-academic.md +0 -14
  46. package/.codex/skills/systematic-debugging/test-pressure-1.md +0 -58
  47. package/.codex/skills/systematic-debugging/test-pressure-2.md +0 -68
  48. package/.codex/skills/systematic-debugging/test-pressure-3.md +0 -69
  49. package/.codex/skills/test-driven-development/SKILL.md +0 -371
  50. package/.codex/skills/test-driven-development/testing-anti-patterns.md +0 -299
  51. package/.codex/skills/using-git-worktrees/SKILL.md +0 -218
  52. package/.codex/skills/using-superpowers/SKILL.md +0 -134
  53. package/.codex/skills/using-superpowers/references/codex-tools.md +0 -25
  54. package/.codex/skills/using-superpowers/references/gemini-tools.md +0 -33
  55. package/.codex/skills/verification-before-completion/SKILL.md +0 -139
  56. package/.codex/skills/workflow-runner/SKILL.md +0 -172
  57. package/.codex/skills/writing-plans/SKILL.md +0 -152
  58. package/.codex/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
  59. package/.codex/skills/writing-skills/SKILL.md +0 -654
  60. package/.codex/skills/writing-skills/anthropic-best-practices.md +0 -1149
  61. package/.codex/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
  62. package/.codex/skills/writing-skills/graphviz-conventions.dot +0 -172
  63. package/.codex/skills/writing-skills/persuasion-principles.md +0 -187
  64. package/.codex/skills/writing-skills/render-graphs.js +0 -168
  65. package/.codex/skills/writing-skills/testing-skills-with-subagents.md +0 -384
  66. package/.opencode/skills/brainstorming/SKILL.md +0 -164
  67. package/.opencode/skills/brainstorming/scripts/frame-template.html +0 -214
  68. package/.opencode/skills/brainstorming/scripts/helper.js +0 -88
  69. package/.opencode/skills/brainstorming/scripts/server.cjs +0 -338
  70. package/.opencode/skills/brainstorming/scripts/start-server.sh +0 -153
  71. package/.opencode/skills/brainstorming/scripts/stop-server.sh +0 -55
  72. package/.opencode/skills/brainstorming/spec-document-reviewer-prompt.md +0 -48
  73. package/.opencode/skills/brainstorming/visual-companion.md +0 -286
  74. package/.opencode/skills/chinese-code-review/SKILL.md +0 -277
  75. package/.opencode/skills/chinese-commit-conventions/SKILL.md +0 -364
  76. package/.opencode/skills/chinese-documentation/SKILL.md +0 -448
  77. package/.opencode/skills/chinese-git-workflow/SKILL.md +0 -510
  78. package/.opencode/skills/dispatching-parallel-agents/SKILL.md +0 -182
  79. package/.opencode/skills/executing-plans/SKILL.md +0 -175
  80. package/.opencode/skills/finishing-a-development-branch/SKILL.md +0 -200
  81. package/.opencode/skills/mcp-builder/SKILL.md +0 -255
  82. package/.opencode/skills/receiving-code-review/SKILL.md +0 -213
  83. package/.opencode/skills/requesting-code-review/SKILL.md +0 -105
  84. package/.opencode/skills/requesting-code-review/code-reviewer.md +0 -146
  85. package/.opencode/skills/subagent-driven-development/SKILL.md +0 -277
  86. package/.opencode/skills/subagent-driven-development/code-quality-reviewer-prompt.md +0 -26
  87. package/.opencode/skills/subagent-driven-development/implementer-prompt.md +0 -113
  88. package/.opencode/skills/subagent-driven-development/spec-reviewer-prompt.md +0 -61
  89. package/.opencode/skills/systematic-debugging/CREATION-LOG.md +0 -119
  90. package/.opencode/skills/systematic-debugging/SKILL.md +0 -296
  91. package/.opencode/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
  92. package/.opencode/skills/systematic-debugging/condition-based-waiting.md +0 -115
  93. package/.opencode/skills/systematic-debugging/defense-in-depth.md +0 -122
  94. package/.opencode/skills/systematic-debugging/find-polluter.sh +0 -63
  95. package/.opencode/skills/systematic-debugging/root-cause-tracing.md +0 -169
  96. package/.opencode/skills/systematic-debugging/test-academic.md +0 -14
  97. package/.opencode/skills/systematic-debugging/test-pressure-1.md +0 -58
  98. package/.opencode/skills/systematic-debugging/test-pressure-2.md +0 -68
  99. package/.opencode/skills/systematic-debugging/test-pressure-3.md +0 -69
  100. package/.opencode/skills/test-driven-development/SKILL.md +0 -371
  101. package/.opencode/skills/test-driven-development/testing-anti-patterns.md +0 -299
  102. package/.opencode/skills/using-git-worktrees/SKILL.md +0 -218
  103. package/.opencode/skills/using-superpowers/SKILL.md +0 -134
  104. package/.opencode/skills/using-superpowers/references/codex-tools.md +0 -25
  105. package/.opencode/skills/using-superpowers/references/gemini-tools.md +0 -33
  106. package/.opencode/skills/verification-before-completion/SKILL.md +0 -139
  107. package/.opencode/skills/workflow-runner/SKILL.md +0 -172
  108. package/.opencode/skills/writing-plans/SKILL.md +0 -152
  109. package/.opencode/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
  110. package/.opencode/skills/writing-skills/SKILL.md +0 -654
  111. package/.opencode/skills/writing-skills/anthropic-best-practices.md +0 -1149
  112. package/.opencode/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
  113. package/.opencode/skills/writing-skills/graphviz-conventions.dot +0 -172
  114. package/.opencode/skills/writing-skills/persuasion-principles.md +0 -187
  115. package/.opencode/skills/writing-skills/render-graphs.js +0 -168
  116. package/.opencode/skills/writing-skills/testing-skills-with-subagents.md +0 -384
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superpowers-zh",
3
- "description": "AI 编程超能力中文增强版:20 个 skills,支持 OpenClaw / Claude Code / Cursor 等 14 款工具",
3
+ "description": "AI 编程超能力中文增强版:20 个 skills,支持 Claude Code / Hermes Agent / Cursor / Claw Code 17 款工具",
4
4
  "owner": {
5
5
  "name": "jnMetaCode",
6
6
  "url": "https://github.com/jnMetaCode"
@@ -8,8 +8,8 @@
8
8
  "plugins": [
9
9
  {
10
10
  "name": "superpowers-zh",
11
- "description": "AI 编程超能力中文增强版:20 个 skills(14 翻译 + 6 中国原创),支持 OpenClaw / Claude Code / Cursor 等 14 款工具",
12
- "version": "1.1.1",
11
+ "description": "AI 编程超能力中文增强版:20 个 skills(14 翻译 + 6 中国原创),支持 Claude Code / Hermes Agent / Cursor / Claw Code 17 款工具",
12
+ "version": "1.1.8",
13
13
  "source": "./",
14
14
  "author": {
15
15
  "name": "jnMetaCode",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "superpowers-zh",
3
- "description": "AI 编程超能力中文增强版:20 个 skills(14 翻译 + 6 中国原创),支持 OpenClaw / Claude Code / Cursor 等 14 款工具",
4
- "version": "1.1.1",
3
+ "description": "AI 编程超能力中文增强版:20 个 skills(14 翻译 + 6 中国原创),支持 Claude Code / Hermes Agent / Cursor / Claw Code 17 款工具",
4
+ "version": "1.1.8",
5
5
  "author": {
6
6
  "name": "jnMetaCode",
7
7
  "url": "https://github.com/jnMetaCode"
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "superpowers-zh",
3
3
  "displayName": "Superpowers 中文版",
4
- "description": "AI 编程超能力中文增强版:20 个 skills(14 翻译 + 6 中国原创),支持 OpenClaw / Cursor / Claude Code 等 14 款工具",
5
- "version": "1.1.1",
4
+ "description": "AI 编程超能力中文增强版:20 个 skills(14 翻译 + 6 中国原创),支持 Cursor / Claude Code / Hermes Agent / Claw Code 等 17 款工具",
5
+ "version": "1.1.8",
6
6
  "author": {
7
7
  "name": "jnMetaCode",
8
8
  "url": "https://github.com/jnMetaCode"
@@ -1,13 +1,12 @@
1
1
  /**
2
2
  * Superpowers plugin for OpenCode.ai
3
3
  *
4
- * Injects superpowers bootstrap context via system prompt transform.
4
+ * Injects superpowers bootstrap context via user message transform.
5
5
  * Auto-registers skills directory via config hook (no symlinks needed).
6
6
  */
7
7
 
8
8
  import path from 'path';
9
9
  import fs from 'fs';
10
- import os from 'os';
11
10
  import { fileURLToPath } from 'url';
12
11
 
13
12
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -33,24 +32,8 @@ const extractAndStripFrontmatter = (content) => {
33
32
  return { frontmatter, content: body };
34
33
  };
35
34
 
36
- // Normalize a path: trim whitespace, expand ~, resolve to absolute
37
- const normalizePath = (p, homeDir) => {
38
- if (!p || typeof p !== 'string') return null;
39
- let normalized = p.trim();
40
- if (!normalized) return null;
41
- if (normalized.startsWith('~/')) {
42
- normalized = path.join(homeDir, normalized.slice(2));
43
- } else if (normalized === '~') {
44
- normalized = homeDir;
45
- }
46
- return path.resolve(normalized);
47
- };
48
-
49
35
  export const SuperpowersPlugin = async ({ client, directory }) => {
50
- const homeDir = os.homedir();
51
36
  const superpowersSkillsDir = path.resolve(__dirname, '../../skills');
52
- const envConfigDir = normalizePath(process.env.OPENCODE_CONFIG_DIR, homeDir);
53
- const configDir = envConfigDir || path.join(homeDir, '.config/opencode');
54
37
 
55
38
  // Helper to generate bootstrap content
56
39
  const getBootstrapContent = () => {
@@ -68,8 +51,6 @@ When skills reference tools you don't have, substitute OpenCode equivalents:
68
51
  - \`Skill\` tool → OpenCode's native \`skill\` tool
69
52
  - \`Read\`, \`Write\`, \`Edit\`, \`Bash\` → Your native tools
70
53
 
71
- **Skills location:**
72
- Superpowers skills are in \`${configDir}/skills/superpowers/\`
73
54
  Use OpenCode's native \`skill\` tool to list and load skills.`;
74
55
 
75
56
  return `<EXTREMELY_IMPORTANT>
@@ -96,12 +77,19 @@ ${toolMapping}
96
77
  }
97
78
  },
98
79
 
99
- // Use system prompt transform to inject bootstrap (fixes #226 agent reset bug)
100
- 'experimental.chat.system.transform': async (_input, output) => {
80
+ // Inject bootstrap into the first user message of each session.
81
+ // Using a user message instead of a system message avoids:
82
+ // 1. Token bloat from system messages repeated every turn (#750)
83
+ // 2. Multiple system messages breaking Qwen and other models (#894)
84
+ 'experimental.chat.messages.transform': async (_input, output) => {
101
85
  const bootstrap = getBootstrapContent();
102
- if (bootstrap) {
103
- (output.system ||= []).push(bootstrap);
104
- }
86
+ if (!bootstrap || !output.messages.length) return;
87
+ const firstUser = output.messages.find(m => m.info.role === 'user');
88
+ if (!firstUser || !firstUser.parts.length) return;
89
+ // Only inject once
90
+ if (firstUser.parts.some(p => p.type === 'text' && p.text.includes('EXTREMELY_IMPORTANT'))) return;
91
+ const ref = firstUser.parts[0];
92
+ firstUser.parts.unshift({ ...ref, type: 'text', text: bootstrap });
105
93
  }
106
94
  };
107
95
  };
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  🌐 **简体中文** | [English (upstream)](https://github.com/obra/superpowers)
4
4
 
5
- > 🦸 **superpowers(116k+ ⭐)完整汉化 + 6 个中国原创 skills** — 让 OpenClaw / Claude Code / Cursor / Windsurf / Kiro / Gemini CLI 等 **14 款 AI 编程工具**真正会干活。从头脑风暴到代码审查,从 TDD 到调试,每个 skill 都是经过实战验证的工作方法论。
5
+ > 🦸 **superpowers(116k+ ⭐)完整汉化 + 6 个中国原创 skills** — 让 Claude Code / Copilot CLI / Hermes Agent / Cursor / Windsurf / Kiro / Gemini CLI 等 **17 款 AI 编程工具**真正会干活。从头脑风暴到代码审查,从 TDD 到调试,每个 skill 都是经过实战验证的工作方法论。
6
6
 
7
- Chinese community edition of [superpowers](https://github.com/obra/superpowers) — 20 skills across 14 AI coding tools, including full translations and China-specific development skills.
7
+ Chinese community edition of [superpowers](https://github.com/obra/superpowers) — 20 skills across 16 AI coding tools, including full translations and China-specific development skills.
8
8
 
9
9
  <!-- 效果对比 -->
10
10
  <table>
@@ -43,7 +43,7 @@ AI:在开始实现之前,我需要了解几个关键问题:
43
43
 
44
44
  | 📦 翻译 Skills | 🇨🇳 中国特色 Skills | 🤖 支持工具 |
45
45
  |:---:|:---:|:---:|
46
- | **14** | **6** | **OpenClaw / Claude Code / Cursor / Windsurf / Kiro / Gemini CLI / Codex / Aider / Trae / VS Code (Copilot) / DeerFlow / OpenCode / Qwen Code / Antigravity** |
46
+ | **14** | **6** | **Claude Code / Copilot CLI / Hermes Agent / Cursor / Windsurf / Kiro / Gemini CLI / Codex / Aider / Trae / VS Code (Copilot) / DeerFlow / OpenCode / OpenClaw / Qwen Code / Antigravity / Claw Code** |
47
47
 
48
48
  ---
49
49
 
@@ -53,12 +53,13 @@ AI:在开始实现之前,我需要了解几个关键问题:
53
53
 
54
54
  **superpowers-zh** 在完整翻译的基础上,新增了面向中国开发者的特色 skills。
55
55
 
56
- ### 🤖 支持 14 款主流 AI 编程工具
56
+ ### 🤖 支持 17 款主流 AI 编程工具
57
57
 
58
58
  | 工具 | 类型 | 一键安装 | 手动安装 |
59
59
  |------|------|:---:|:---:|
60
- | [OpenClaw](https://github.com/anthropics/openclaw) | CLI | `npx superpowers-zh` | `skills/` |
61
60
  | [Claude Code](https://claude.ai/code) | CLI | `npx superpowers-zh` | `.claude/skills/` |
61
+ | [Copilot CLI](https://githubnext.com/projects/copilot-cli) | CLI | `npx superpowers-zh --tool copilot` | `.claude/skills/` |
62
+ | [Hermes Agent](https://github.com/NousResearch/hermes-agent) | CLI | `npx superpowers-zh --tool hermes` | `.hermes/skills/` |
62
63
  | [Cursor](https://cursor.sh) | IDE | `npx superpowers-zh` | `.cursor/skills/` |
63
64
  | [Windsurf](https://codeium.com/windsurf) | IDE | `npx superpowers-zh` | `.windsurf/skills/` |
64
65
  | [Kiro](https://kiro.dev) | IDE | `npx superpowers-zh` | `.kiro/steering/` |
@@ -69,8 +70,10 @@ AI:在开始实现之前,我需要了解几个关键问题:
69
70
  | [VS Code](https://code.visualstudio.com) (Copilot) | IDE 插件 | `npx superpowers-zh` | `.github/superpowers/` |
70
71
  | [DeerFlow 2.0](https://github.com/bytedance/deer-flow) | Agent 框架 | `npx superpowers-zh` | `skills/custom/` |
71
72
  | [OpenCode](https://opencode.ai) | CLI | `npx superpowers-zh` | `.opencode/skills/` |
73
+ | [OpenClaw](https://github.com/anthropics/openclaw) | CLI | `npx superpowers-zh` | `skills/` |
72
74
  | [Qwen Code](https://tongyi.aliyun.com/lingma) (通义灵码) | IDE 插件 | `npx superpowers-zh` | `.qwen/skills/` |
73
75
  | [Antigravity](https://github.com/anthropics/antigravity) | CLI | `npx superpowers-zh` | `.antigravity/skills/` |
76
+ | [Claw Code](https://github.com/ultraworkers/claw-code) | CLI (Rust) | `npx superpowers-zh` | `.claw/skills/` |
74
77
 
75
78
  > 运行 `npx superpowers-zh` 会自动检测你项目中使用的工具,将 20 个 skills 安装到正确位置。
76
79
 
@@ -122,7 +125,8 @@ npx superpowers-zh
122
125
  git clone https://github.com/jnMetaCode/superpowers-zh.git
123
126
 
124
127
  # 复制 skills 到你的项目(选择你使用的工具)
125
- cp -r superpowers-zh/skills /your/project/.claude/skills # Claude Code
128
+ cp -r superpowers-zh/skills /your/project/.claude/skills # Claude Code / Copilot CLI
129
+ cp -r superpowers-zh/skills /your/project/.hermes/skills # Hermes Agent
126
130
  cp -r superpowers-zh/skills /your/project/.cursor/skills # Cursor
127
131
  cp -r superpowers-zh/skills /your/project/.codex/skills # Codex CLI
128
132
  cp -r superpowers-zh/skills /your/project/.kiro/steering # Kiro
@@ -136,6 +140,7 @@ cp -r superpowers-zh/skills /your/project/.gemini/skills # Gemini CLI
136
140
  cp -r superpowers-zh/skills /your/project/.aider/skills # Aider
137
141
  cp -r superpowers-zh/skills /your/project/.opencode/skills # OpenCode
138
142
  cp -r superpowers-zh/skills /your/project/.qwen/skills # Qwen Code
143
+ cp -r superpowers-zh/skills /your/project/.claw/skills # Claw Code(Rust 版)
139
144
  ```
140
145
 
141
146
  ### 方式三:在配置文件中引用
@@ -145,6 +150,8 @@ cp -r superpowers-zh/skills /your/project/.qwen/skills # Qwen Code
145
150
  | 工具 | 配置文件 | 说明 |
146
151
  |------|---------|------|
147
152
  | Claude Code | `CLAUDE.md` | 项目根目录 |
153
+ | Copilot CLI | `CLAUDE.md` | 与 Claude Code 共用插件格式 |
154
+ | Hermes Agent | `HERMES.md` 或 `.hermes.md` | 项目根目录,安装时自动生成 |
148
155
  | Kiro | `.kiro/steering/*.md` | 支持 always/globs/手动三种模式 |
149
156
  | DeerFlow 2.0 | `skills/custom/*/SKILL.md` | 字节跳动开源 SuperAgent,自动发现自定义 skills |
150
157
  | Trae | `.trae/rules/project_rules.md` | 项目级规则 |
@@ -156,9 +163,11 @@ cp -r superpowers-zh/skills /your/project/.qwen/skills # Qwen Code
156
163
  | Gemini CLI | `.gemini/skills/*/SKILL.md` | 项目级 skills 目录 |
157
164
  | Aider | `.aider/skills/*/SKILL.md` | 项目级 skills 目录 |
158
165
  | OpenCode | `.opencode/skills/*/SKILL.md` | 项目级 skills 目录 |
166
+ | Hermes Agent | `.hermes/skills/*/SKILL.md` | 项目级 skills 目录 |
159
167
  | Qwen Code | `.qwen/skills/*/SKILL.md` | 项目级 skills 目录 |
168
+ | Claw Code | `.claw/skills/*/SKILL.md` | Rust 版 CLI agent,兼容 Claude Code 的 SKILL.md 格式 |
160
169
 
161
- > **详细安装指南**:[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) · [OpenClaw](docs/README.openclaw.md) · [Windsurf](docs/README.windsurf.md) · [Gemini CLI](docs/README.gemini-cli.md) · [Aider](docs/README.aider.md) · [Qwen Code](docs/README.qwen.md)
170
+ > **详细安装指南**:[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) · [OpenClaw](docs/README.openclaw.md) · [Windsurf](docs/README.windsurf.md) · [Gemini CLI](docs/README.gemini-cli.md) · [Aider](docs/README.aider.md) · [Qwen Code](docs/README.qwen.md) · [Hermes Agent](docs/README.hermes.md)
162
171
 
163
172
  ---
164
173
 
@@ -224,7 +233,7 @@ MIT License — 自由使用,商业或个人均可。
224
233
 
225
234
  <div align="center">
226
235
 
227
- **🦸 AI 编程超能力:让 OpenClaw / Claude Code / Cursor 等 14 款工具真正会干活**
236
+ **🦸 AI 编程超能力:让 Claude Code / Hermes Agent / Cursor / Claw Code 17 款工具真正会干活**
228
237
 
229
238
  [Star 本项目](https://github.com/jnMetaCode/superpowers-zh) · [提交 Issue](https://github.com/jnMetaCode/superpowers-zh/issues) · [贡献代码](https://github.com/jnMetaCode/superpowers-zh/pulls)
230
239
 
@@ -1,23 +1,34 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { existsSync, mkdirSync, cpSync, readdirSync, readFileSync, writeFileSync, copyFileSync, statSync } from 'fs';
3
+ import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, copyFileSync, lstatSync, realpathSync } from 'fs';
4
4
  import { resolve, dirname, join } from 'path';
5
5
  import { fileURLToPath } from 'url';
6
6
 
7
- // Node 14/16 兼容:cpSync 在 Node 16.7+ 才可用
7
+ // 手动递归复制:跨 Node 版本和操作系统行为一致
8
+ // 不使用 cpSync —— 在 Windows + npx 缓存(含 junction)+ Node 16.7-18 下不稳定
8
9
  function copyDirSync(src, dest) {
9
- if (typeof cpSync === 'function') {
10
- cpSync(src, dest, { recursive: true });
11
- return;
12
- }
13
- // 手动递归复制(兼容 Node 14+)
10
+ // 解析 junction/symlink,避免 Windows npx 缓存路径下 readdir 返回空
11
+ let realSrc = src;
12
+ try { realSrc = realpathSync(src); } catch {}
13
+
14
14
  mkdirSync(dest, { recursive: true });
15
- for (const entry of readdirSync(src, { withFileTypes: true })) {
16
- const srcPath = join(src, entry.name);
15
+ const entries = readdirSync(realSrc, { withFileTypes: true });
16
+ for (const entry of entries) {
17
+ const srcPath = join(realSrc, entry.name);
17
18
  const destPath = join(dest, entry.name);
18
- if (entry.isDirectory()) {
19
+ let stat;
20
+ try { stat = lstatSync(srcPath); } catch { continue; }
21
+ if (stat.isSymbolicLink()) {
22
+ // 取消引用后按实际类型处理
23
+ try {
24
+ const real = realpathSync(srcPath);
25
+ const realStat = lstatSync(real);
26
+ if (realStat.isDirectory()) copyDirSync(real, destPath);
27
+ else copyFileSync(real, destPath);
28
+ } catch {}
29
+ } else if (stat.isDirectory()) {
19
30
  copyDirSync(srcPath, destPath);
20
- } else {
31
+ } else if (stat.isFile()) {
21
32
  copyFileSync(srcPath, destPath);
22
33
  }
23
34
  }
@@ -44,6 +55,8 @@ const TARGETS = [
44
55
  { name: 'Aider', dir: '.aider/skills', detect: '.aider' },
45
56
  { name: 'OpenCode', dir: '.opencode/skills', detect: '.opencode' },
46
57
  { name: 'Qwen Code', dir: '.qwen/skills', detect: '.qwen' },
58
+ { name: 'Hermes Agent', dir: '.hermes/skills', detect: ['.hermes', 'HERMES.md', '.hermes.md'] },
59
+ { name: 'Claw Code', dir: '.claw/skills', detect: ['.claw', 'CLAW.md'] },
47
60
  ];
48
61
 
49
62
  function countDirs(dir) {
@@ -230,11 +243,69 @@ ${skillList}
230
243
  }
231
244
  }
232
245
 
246
+ function generateHermesBootstrap(projectDir) {
247
+ const skillEntries = scanSkillEntries(SKILLS_SRC);
248
+ const skillList = skillEntries.map(s => `- **${s.name}**: ${s.desc}`).join('\n');
249
+
250
+ const content = `# Superpowers-ZH 中文增强版
251
+
252
+ 本项目已安装 superpowers-zh 技能框架(${skillEntries.length} 个 skills)。
253
+
254
+ ## 核心规则
255
+
256
+ 1. **收到任务时,先检查是否有匹配的 skill** — 哪怕只有 1% 的可能性也要检查
257
+ 2. **设计先于编码** — 收到功能需求时,先用 brainstorming skill 做需求分析
258
+ 3. **测试先于实现** — 写代码前先写测试(TDD)
259
+ 4. **验证先于完成** — 声称完成前必须运行验证命令
260
+
261
+ ## 工具映射
262
+
263
+ 技能中引用的 Claude Code 工具名称对应 Hermes Agent 的等价工具:
264
+ - \`Read\` → \`read_file\`
265
+ - \`Write\` → \`write_file\`
266
+ - \`Edit\` → \`patch\`
267
+ - \`Bash\` → \`terminal\`
268
+ - \`Grep\` / \`Glob\` → \`search_files\`
269
+ - \`Skill\` → \`skill_view\`
270
+ - \`Task\`(子智能体) → \`delegate_task\`
271
+ - \`WebSearch\` → \`web_search\`
272
+ - \`WebFetch\` → \`web_extract\`
273
+ - \`TodoWrite\` → \`todo\`
274
+
275
+ ## 可用 Skills
276
+
277
+ Skills 位于 \`.hermes/skills/\` 目录,每个 skill 有独立的 \`SKILL.md\` 文件。
278
+
279
+ ${skillList}
280
+
281
+ ## 如何使用
282
+
283
+ 当任务匹配某个 skill 时,使用 \`skill_view\` 加载对应 skill 并严格遵循其流程。
284
+ `;
285
+
286
+ // 写入 HERMES.md(如果已存在则追加)
287
+ const hermesPath = resolve(projectDir, 'HERMES.md');
288
+ if (existsSync(hermesPath)) {
289
+ const existing = readFileSync(hermesPath, 'utf8');
290
+ if (!existing.includes('superpowers-zh')) {
291
+ writeFileSync(hermesPath, existing + '\n\n' + content, 'utf8');
292
+ console.log(` ✅ Hermes Agent: 追加 skills 引用 -> ${hermesPath}`);
293
+ } else {
294
+ console.log(` ✅ Hermes Agent: HERMES.md 已包含 superpowers-zh 引用`);
295
+ }
296
+ } else {
297
+ writeFileSync(hermesPath, content, 'utf8');
298
+ console.log(` ✅ Hermes Agent: bootstrap -> ${hermesPath}`);
299
+ }
300
+ }
301
+
233
302
  // 工具名称别名映射(用户输入 -> TARGETS.name)
234
303
  const TOOL_ALIASES = {
235
304
  'claude': 'Claude Code',
236
305
  'claude-code': 'Claude Code',
237
306
  'claudecode': 'Claude Code',
307
+ 'copilot': 'Claude Code',
308
+ 'copilot-cli': 'Claude Code',
238
309
  'cursor': 'Cursor',
239
310
  'codex': 'Codex CLI',
240
311
  'kiro': 'Kiro',
@@ -251,6 +322,11 @@ const TOOL_ALIASES = {
251
322
  'opencode': 'OpenCode',
252
323
  'qwen': 'Qwen Code',
253
324
  'qwen-code': 'Qwen Code',
325
+ 'hermes': 'Hermes Agent',
326
+ 'hermes-agent': 'Hermes Agent',
327
+ 'claw': 'Claw Code',
328
+ 'claw-code': 'Claw Code',
329
+ 'clawcode': 'Claw Code',
254
330
  };
255
331
 
256
332
  function showHelp() {
@@ -279,9 +355,19 @@ function showHelp() {
279
355
 
280
356
  function installForTarget(target) {
281
357
  const dest = resolve(PROJECT_DIR, target.dir);
358
+ const srcCount = countDirs(SKILLS_SRC);
282
359
  mkdirSync(dest, { recursive: true });
283
360
  copyDirSync(SKILLS_SRC, dest);
284
361
  const count = countDirs(dest);
362
+ if (srcCount > 0 && count === 0) {
363
+ throw new Error(
364
+ `复制 skills 失败:源目录 ${SKILLS_SRC} 有 ${srcCount} 个 skill,但目标 ${dest} 为空。` +
365
+ `\n 这通常是 npx 缓存目录权限或路径问题。请尝试:\n` +
366
+ ` 1. 清理缓存后重试: npm cache clean --force && npx superpowers-zh\n` +
367
+ ` 2. 或全局安装: npm i -g superpowers-zh && superpowers-zh\n` +
368
+ ` 3. 或手动克隆复制: 见 https://github.com/jnMetaCode/superpowers-zh#方式二手动安装`
369
+ );
370
+ }
285
371
  console.log(` ✅ ${target.name}: ${count} 个 skills -> ${dest}`);
286
372
 
287
373
  if (target.name === 'Trae') {
@@ -300,6 +386,10 @@ function installForTarget(target) {
300
386
  generateGeminiBootstrap(PROJECT_DIR);
301
387
  }
302
388
 
389
+ if (target.name === 'Hermes Agent') {
390
+ generateHermesBootstrap(PROJECT_DIR);
391
+ }
392
+
303
393
  if (target.name === 'Claude Code' && existsSync(AGENTS_SRC)) {
304
394
  const agentsDest = resolve(PROJECT_DIR, '.claude', 'agents');
305
395
  mkdirSync(agentsDest, { recursive: true });
@@ -0,0 +1,96 @@
1
+ # Superpowers 中文版 — Hermes Agent 安装指南
2
+
3
+ 在 [Hermes Agent](https://github.com/NousResearch/hermes-agent) 中使用 superpowers-zh 的完整指南。
4
+
5
+ ## 自动安装
6
+
7
+ ```bash
8
+ cd /your/project
9
+ npx superpowers-zh --tool hermes
10
+ ```
11
+
12
+ 安装脚本会将 20 个 skills 复制到 `.hermes/skills/` 目录,并自动生成 `HERMES.md` 引导文件(含工具映射表和 skills 列表)。
13
+
14
+ 如果项目中已存在 `.hermes` 目录或 `HERMES.md` 文件,也会被自动检测到:
15
+
16
+ ```bash
17
+ npx superpowers-zh # 自动检测
18
+ ```
19
+
20
+ ## 手动安装
21
+
22
+ ```bash
23
+ git clone https://github.com/jnMetaCode/superpowers-zh.git
24
+ cp -r superpowers-zh/skills /your/project/.hermes/skills
25
+ ```
26
+
27
+ ## 通过 HERMES.md 引导
28
+
29
+ Hermes Agent 在会话开始时自动加载项目根目录下的 `HERMES.md`(或 `.hermes.md`)作为上下文。安装器会自动生成此文件,内容包括:
30
+
31
+ - 工具映射表(Claude Code → Hermes Agent 工具名称)
32
+ - 所有可用 skills 的列表和描述
33
+ - 核心规则和使用说明
34
+
35
+ ## 通过 config.yaml 配置外部 skills 目录
36
+
37
+ 如果希望全局使用 superpowers-zh skills,可以在 `~/.hermes/config.yaml` 中配置:
38
+
39
+ ```yaml
40
+ skills:
41
+ external_dirs:
42
+ - /path/to/superpowers-zh/skills
43
+ ```
44
+
45
+ ## 工具映射
46
+
47
+ Skills 中引用的 Claude Code 工具名称对应 Hermes Agent 的等价工具:
48
+
49
+ | Claude Code | Hermes Agent |
50
+ |-------------|-------------|
51
+ | `Read` | `read_file` |
52
+ | `Write` | `write_file` |
53
+ | `Edit` | `patch` |
54
+ | `Bash` | `terminal` |
55
+ | `Grep` / `Glob` | `search_files` |
56
+ | `Skill` | `skill_view` |
57
+ | `Task`(子智能体) | `delegate_task` |
58
+ | `WebSearch` | `web_search` |
59
+ | `WebFetch` | `web_extract` |
60
+ | `TodoWrite` | `todo` |
61
+
62
+ 完整映射参见 `skills/using-superpowers/references/hermes-tools.md`。
63
+
64
+ ## 使用技能
65
+
66
+ Hermes Agent 支持三级渐进式加载:
67
+
68
+ ```
69
+ # 浏览所有可用技能
70
+ skills_list
71
+
72
+ # 加载某个技能的完整内容
73
+ skill_view("brainstorming")
74
+
75
+ # 查看技能的引用文件
76
+ skill_view("using-superpowers", "references/hermes-tools.md")
77
+ ```
78
+
79
+ ## 故障排查
80
+
81
+ ### Skills 未发现
82
+
83
+ 1. 确认 `.hermes/skills/` 目录存在且包含 skill 文件夹
84
+ 2. 每个 skill 目录下需要有 `SKILL.md` 文件
85
+ 3. 使用 `skills_list` 查看已发现的技能
86
+
87
+ ### HERMES.md 未加载
88
+
89
+ 1. 确认文件在项目根目录(与 `.hermes/` 同级)
90
+ 2. 文件名可以是 `HERMES.md` 或 `.hermes.md`
91
+
92
+ ## 获取帮助
93
+
94
+ - 提交 Issue:https://github.com/jnMetaCode/superpowers-zh/issues
95
+ - 项目主页:https://github.com/jnMetaCode/superpowers-zh
96
+ - Hermes Agent 文档:https://hermes-agent.nousresearch.com/docs/
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superpowers-zh",
3
3
  "description": "AI 编程超能力中文版 — TDD、调试、代码审查等经过实战验证的工作方法论",
4
- "version": "1.1.1",
4
+ "version": "1.1.6",
5
5
  "contextFileName": "GEMINI.md"
6
6
  }
@@ -35,23 +35,23 @@ warning_escaped=$(escape_for_json "$warning_message")
35
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>"
36
36
 
37
37
  # Output context injection as JSON.
38
- # Cursor hooks expect additional_context.
39
- # Claude Code hooks expect hookSpecificOutput.additionalContext.
40
- # Claude Code reads BOTH fields without deduplication, so we must only
41
- # emit the field consumed by the current platform to avoid double injection.
38
+ # Cursor hooks expect additional_context (snake_case).
39
+ # Claude Code hooks expect hookSpecificOutput.additionalContext (nested).
40
+ # Copilot CLI (v1.0.11+) and others expect additionalContext (top-level, SDK standard).
41
+ # Claude Code reads BOTH additional_context and hookSpecificOutput without
42
+ # deduplication, so we must emit only the field the current platform consumes.
42
43
  #
43
- # Uses printf instead of heredoc (cat <<EOF) to work around a bash 5.3+
44
- # bug where heredoc variable expansion hangs when content exceeds ~512 bytes.
44
+ # Uses printf instead of heredoc to work around bash 5.3+ heredoc hang.
45
45
  # See: https://github.com/obra/superpowers/issues/571
46
46
  if [ -n "${CURSOR_PLUGIN_ROOT:-}" ]; then
47
- # Cursor sets CURSOR_PLUGIN_ROOT (may also set CLAUDE_PLUGIN_ROOT) — emit additional_context
47
+ # Cursor sets CURSOR_PLUGIN_ROOT (may also set CLAUDE_PLUGIN_ROOT)
48
48
  printf '{\n "additional_context": "%s"\n}\n' "$session_context"
49
- elif [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
50
- # Claude Code sets CLAUDE_PLUGIN_ROOT emit only hookSpecificOutput
49
+ elif [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -z "${COPILOT_CLI:-}" ]; then
50
+ # Claude Code sets CLAUDE_PLUGIN_ROOT without COPILOT_CLI
51
51
  printf '{\n "hookSpecificOutput": {\n "hookEventName": "SessionStart",\n "additionalContext": "%s"\n }\n}\n' "$session_context"
52
52
  else
53
- # Other platformsemit additional_context as fallback
54
- printf '{\n "additional_context": "%s"\n}\n' "$session_context"
53
+ # Copilot CLI (sets COPILOT_CLI=1) or unknown platform SDK standard format
54
+ printf '{\n "additionalContext": "%s"\n}\n' "$session_context"
55
55
  fi
56
56
 
57
57
  exit 0
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "superpowers-zh",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "engines": {
5
5
  "node": ">=14.0.0"
6
6
  },
7
- "description": "AI 编程超能力中文增强版 — superpowers(99k+ ⭐)完整汉化 + 6 个中国原创 skills,支持 OpenClaw / Claude Code / Cursor / Windsurf / Kiro / Gemini CLI 等 14 款工具",
7
+ "description": "AI 编程超能力中文增强版 — superpowers(99k+ ⭐)完整汉化 + 6 个中国原创 skills,支持 Claude Code / Copilot CLI / Hermes Agent / Cursor / Claw Code / Windsurf / Kiro / Gemini CLI 等 17 款工具",
8
8
  "type": "module",
9
9
  "main": ".opencode/plugins/superpowers.js",
10
10
  "bin": {
@@ -18,8 +18,9 @@
18
18
  "hooks/",
19
19
  ".claude-plugin/",
20
20
  ".cursor-plugin/",
21
- ".codex/",
22
- ".opencode/",
21
+ ".codex/INSTALL.md",
22
+ ".opencode/INSTALL.md",
23
+ ".opencode/plugins/",
23
24
  "GEMINI.md",
24
25
  "gemini-extension.json",
25
26
  "docs/",
@@ -43,6 +44,9 @@
43
44
  "qwen",
44
45
  "vscode",
45
46
  "copilot",
47
+ "hermes",
48
+ "hermes-agent",
49
+ "claw-code",
46
50
  "ai-coding",
47
51
  "skills",
48
52
  "chinese",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: chinese-git-workflow
3
- description: 适配国内 Git 平台和团队习惯的工作流规范——Gitee、Coding、极狐 GitLab 全覆盖
3
+ description: 适配国内 Git 平台和团队习惯的工作流规范——Gitee、Coding、极狐 GitLab、CNB 全覆盖
4
4
  ---
5
5
 
6
6
  # 国内 Git 工作流规范
@@ -15,14 +15,14 @@ description: 适配国内 Git 平台和团队习惯的工作流规范——Gitee
15
15
 
16
16
  ### 平台对比
17
17
 
18
- | 特性 | Gitee | Coding.net | 极狐 GitLab | GitHub |
19
- |------|-------|------------|-------------|--------|
20
- | 国内访问 | 快 | 快 | 快 | 不稳定 |
21
- | 免费私有仓库 | 有 | 有 | 有 | 有 |
22
- | CI/CD | Gitee Go | Coding CI | 内置 GitLab CI | GitHub Actions |
23
- | 代码审查 | PR | MR | MR | PR |
24
- | 制品库 | 有限 | 完整 | 完整 | Packages |
25
- | 适合场景 | 开源/小团队 | 中大型团队 | 企业私有化 | 国际项目 |
18
+ | 特性 | Gitee | Coding.net | 极狐 GitLab | CNB | GitHub |
19
+ |------|-------|------------|-------------|-----|--------|
20
+ | 国内访问 | 快 | 快 | 快 | 快 | 不稳定 |
21
+ | 免费私有仓库 | 有 | 有 | 有 | 有 | 有 |
22
+ | CI/CD | Gitee Go | Coding CI | 内置 GitLab CI | 内置(.cnb.yml) | GitHub Actions |
23
+ | 代码审查 | PR | MR | MR | MR | PR |
24
+ | 制品库 | 有限 | 完整 | 完整 | 完整 | Packages |
25
+ | 适合场景 | 开源/小团队 | 中大型团队 | 企业私有化 | 云原生 / Docker 流水线 | 国际项目 |
26
26
 
27
27
  ### Gitee 特有配置
28
28
 
@@ -63,6 +63,17 @@ git remote add origin https://jihulab.com/<group>/<repo>.git
63
63
  git remote add origin https://gitlab.yourcompany.com/<group>/<repo>.git
64
64
  ```
65
65
 
66
+ ### CNB(Cloud Native Build)特有配置
67
+
68
+ ```bash
69
+ # CNB 仓库地址(仅支持 HTTPS,不提供 SSH 协议)
70
+ git remote add origin https://cnb.cool/<org>/<repo>.git
71
+
72
+ # HTTPS 认证:用户名固定为 cnb,密码为个人访问令牌(Access Token)
73
+ # 在 CNB 平台 → 个人设置 → 访问令牌 中生成
74
+ git config credential.helper store
75
+ ```
76
+
66
77
  ## 工作流选择
67
78
 
68
79
  ### 方案一:主干开发(Trunk-Based Development)
@@ -372,16 +383,42 @@ variables:
372
383
  when: manual # 生产环境手动触发
373
384
  ```
374
385
 
386
+ ### CNB(Cloud Native Build)
387
+
388
+ ```yaml
389
+ # .cnb.yml — branch-first 结构,直接指定 Docker 镜像跑流水线
390
+ main:
391
+ push:
392
+ - docker:
393
+ image: node:20
394
+ stages:
395
+ - npm ci
396
+ - npm test
397
+ - npm run build
398
+ pull_request:
399
+ - docker:
400
+ image: node:20
401
+ stages:
402
+ - npm run lint
403
+ - npm test
404
+ ```
405
+
406
+ **特点:**
407
+ - 每个流水线独立指定 Docker 镜像,天然云原生
408
+ - 支持 `push` / `pull_request` 触发
409
+ - 同一事件可并行多条流水线
410
+ - `stages` 也支持 `- name: xxx` + `script:` 的展开形式,复杂场景见官方文档
411
+
375
412
  ### GitHub Actions 国内替代方案对照
376
413
 
377
- | GitHub Actions 功能 | Gitee Go | Coding CI | 极狐 GitLab CI |
378
- |---------------------|----------|-----------|----------------|
379
- | 触发条件 | triggers | Jenkinsfile triggers | only/rules |
380
- | 缓存依赖 | cache step | stash/unstash | cache |
381
- | 制品存储 | artifacts | 制品库 | artifacts |
382
- | 环境变量 | env | environment | variables |
383
- | 密钥管理 | 环境变量配置 | 凭据管理 | CI/CD Variables |
384
- | 手动触发 | 手动运行 | 手动触发 | when: manual |
414
+ | GitHub Actions 功能 | Gitee Go | Coding CI | 极狐 GitLab CI | CNB |
415
+ |---------------------|----------|-----------|----------------|-----|
416
+ | 触发条件 | triggers | Jenkinsfile triggers | only/rules | push / pull_request |
417
+ | 缓存依赖 | cache step | stash/unstash | cache | 见官方文档 |
418
+ | 制品存储 | artifacts | 制品库 | artifacts | 见官方文档 |
419
+ | 环境变量 | env | environment | variables | env |
420
+ | 密钥管理 | 环境变量配置 | 凭据管理 | CI/CD Variables | Access Token |
421
+ | 手动触发 | 手动运行 | 手动触发 | when: manual | 页面手动运行 |
385
422
 
386
423
  ## PR/MR 描述模板
387
424