superpowers-zh 1.1.7 → 1.1.9

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superpowers-zh",
3
- "description": "AI 编程超能力中文增强版:20 个 skills,支持 Claude Code / Hermes Agent / Cursor 等 16 款工具",
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 中国原创),支持 Claude Code / Hermes Agent / Cursor 等 16 款工具",
12
- "version": "1.1.7",
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 中国原创),支持 Claude Code / Hermes Agent / Cursor 等 16 款工具",
4
- "version": "1.1.7",
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 中国原创),支持 Cursor / Claude Code / Hermes Agent 等 16 款工具",
5
- "version": "1.1.7",
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"
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  🌐 **简体中文** | [English (upstream)](https://github.com/obra/superpowers)
4
4
 
5
- > 🦸 **superpowers(116k+ ⭐)完整汉化 + 6 个中国原创 skills** — 让 Claude Code / Copilot CLI / Hermes Agent / Cursor / Windsurf / Kiro / Gemini CLI 等 **16 款 AI 编程工具**真正会干活。从头脑风暴到代码审查,从 TDD 到调试,每个 skill 都是经过实战验证的工作方法论。
5
+ > 🦸 **superpowers(159k+ ⭐)完整汉化 + 6 个中国原创 skills** — 让 Claude Code / Copilot CLI / Hermes Agent / Cursor / Windsurf / Kiro / Gemini CLI 等 **17 款 AI 编程工具**真正会干活。从头脑风暴到代码审查,从 TDD 到调试,每个 skill 都是经过实战验证的工作方法论。
6
6
 
7
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
 
@@ -43,17 +43,40 @@ AI:在开始实现之前,我需要了解几个关键问题:
43
43
 
44
44
  | 📦 翻译 Skills | 🇨🇳 中国特色 Skills | 🤖 支持工具 |
45
45
  |:---:|:---:|:---:|
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** |
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
 
50
50
  ## 这是什么?
51
51
 
52
- [superpowers](https://github.com/obra/superpowers) 是目前最火的 AI 编程 skills 框架(116k+ stars),为 AI 编程工具提供**系统化的工作方法论**。
52
+ [superpowers](https://github.com/obra/superpowers) 是目前最火的 AI 编程 skills 框架(159k+ stars),为 AI 编程工具提供**系统化的工作方法论**。
53
53
 
54
54
  **superpowers-zh** 在完整翻译的基础上,新增了面向中国开发者的特色 skills。
55
55
 
56
- ### 🤖 支持 16 款主流 AI 编程工具
56
+ ### 🆚 与英文上游的区别(老被问,一次说清)
57
+
58
+ | 维度 | superpowers(英文上游) | superpowers-zh(中文增强版) |
59
+ |------|----------------------|---------------------------|
60
+ | ⭐ Star 数 | 159k+ | — |
61
+ | 📦 Skills 总数 | 14 | **20**(14 翻译 + 6 国产原创) |
62
+ | 🌐 语言 | 英文 | 中文(技术术语保留英文) |
63
+ | 🤖 **支持工具** | **6 款**:Claude Code / Cursor / Codex / OpenCode / Copilot CLI / Gemini CLI | **17 款**:上述 6 款 + Hermes Agent / Trae / Kiro / Qwen Code(通义灵码)/ OpenClaw / Claw Code / Antigravity / DeerFlow / VS Code / Windsurf / Aider |
64
+ | ⚡ **安装方式** | 按工具分别装(每款一条不同的 plugin marketplace 命令) | **`npx superpowers-zh` 一条命令自动识别项目里的工具并安装**;识别不出可 `--tool <name>` 显式指定 |
65
+ | 🇨🇳 Git 平台 | GitHub 为主 | GitHub + Gitee + Coding + 极狐 GitLab + **CNB(腾讯云原生构建)** |
66
+ | 🇨🇳 CI/CD 示例 | GitHub Actions | GitHub Actions + Gitee Go + Coding CI + 极狐 CI + `.cnb.yml` |
67
+ | 🇨🇳 代码审查风格 | 西方直接风格 | 适配国内团队沟通文化 |
68
+ | 🇨🇳 Git 提交规范 | 无 | Conventional Commits 中文适配 |
69
+ | 🇨🇳 中文文档规范 | 无 | 中文排版 + 中英混排规则 + 告别机翻味 |
70
+ | ➕ MCP 服务器构建 | 无 | 独立 `mcp-builder` skill |
71
+ | ➕ 工作流执行器 | 无 | 独立 `workflow-runner` skill(多角色 YAML 编排) |
72
+ | 🔄 版本跟进 | 独立迭代 | **同步上游 + 国产增量叠加** |
73
+ | 🤝 接受新 skill PR | 一般不接受(原文:*"we don't generally accept contributions of new skills"*) | 欢迎 PR(中国开发者痛点优先) |
74
+ | 💬 社区 | Discord | 微信公众号「AI不止语」+ 微信群 + QQ 群 |
75
+ | 📜 License | MIT | MIT |
76
+
77
+ **一句话总结:** 英文上游 = 方法论内核;中文增强版 = 方法论内核 **+** 17 款工具一键适配 **+** 国内 Git/CI 生态 **+** 中文化表达习惯。
78
+
79
+ ### 🤖 支持 17 款主流 AI 编程工具
57
80
 
58
81
  | 工具 | 类型 | 一键安装 | 手动安装 |
59
82
  |------|------|:---:|:---:|
@@ -73,6 +96,7 @@ AI:在开始实现之前,我需要了解几个关键问题:
73
96
  | [OpenClaw](https://github.com/anthropics/openclaw) | CLI | `npx superpowers-zh` | `skills/` |
74
97
  | [Qwen Code](https://tongyi.aliyun.com/lingma) (通义灵码) | IDE 插件 | `npx superpowers-zh` | `.qwen/skills/` |
75
98
  | [Antigravity](https://github.com/anthropics/antigravity) | CLI | `npx superpowers-zh` | `.antigravity/skills/` |
99
+ | [Claw Code](https://github.com/ultraworkers/claw-code) | CLI (Rust) | `npx superpowers-zh` | `.claw/skills/` |
76
100
 
77
101
  > 运行 `npx superpowers-zh` 会自动检测你项目中使用的工具,将 20 个 skills 安装到正确位置。
78
102
 
@@ -139,6 +163,7 @@ cp -r superpowers-zh/skills /your/project/.gemini/skills # Gemini CLI
139
163
  cp -r superpowers-zh/skills /your/project/.aider/skills # Aider
140
164
  cp -r superpowers-zh/skills /your/project/.opencode/skills # OpenCode
141
165
  cp -r superpowers-zh/skills /your/project/.qwen/skills # Qwen Code
166
+ cp -r superpowers-zh/skills /your/project/.claw/skills # Claw Code(Rust 版)
142
167
  ```
143
168
 
144
169
  ### 方式三:在配置文件中引用
@@ -163,26 +188,12 @@ cp -r superpowers-zh/skills /your/project/.qwen/skills # Qwen Code
163
188
  | OpenCode | `.opencode/skills/*/SKILL.md` | 项目级 skills 目录 |
164
189
  | Hermes Agent | `.hermes/skills/*/SKILL.md` | 项目级 skills 目录 |
165
190
  | Qwen Code | `.qwen/skills/*/SKILL.md` | 项目级 skills 目录 |
191
+ | Claw Code | `.claw/skills/*/SKILL.md` | Rust 版 CLI agent,兼容 Claude Code 的 SKILL.md 格式 |
166
192
 
167
193
  > **详细安装指南**:[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)
168
194
 
169
195
  ---
170
196
 
171
- ## 对比上游
172
-
173
- | 特性 | superpowers (英文) | superpowers-zh (中文) |
174
- |------|-------------------|----------------------|
175
- | Skills 数量 | 14 | **20**(14 翻译 + 6 原创) |
176
- | 语言 | 英文 | 中文(技术术语保留英文) |
177
- | 代码审查规范 | 西方直接风格 | 适配国内团队沟通文化 |
178
- | Git 平台 | GitHub 为主 | GitHub + Gitee + Coding + 极狐 |
179
- | Git 提交规范 | 无 | Conventional Commits 中文适配 |
180
- | 文档规范 | 英文 | 中文排版规范 + 中英混排 |
181
- | MCP 构建 | 无 | MCP 服务器构建方法论 |
182
- | 社区 | Discord | 微信公众号 + 微信群 |
183
-
184
- ---
185
-
186
197
  ## 贡献
187
198
 
188
199
  欢迎参与!翻译改进、新增 skills、Bug 修复都可以。
@@ -205,20 +216,44 @@ cp -r superpowers-zh/skills /your/project/.qwen/skills # Qwen Code
205
216
 
206
217
  | 渠道 | 加入方式 |
207
218
  |------|---------|
208
- | QQ 群 | [点击加入](https://qm.qq.com/q/EeNQA9xCxy)(群号 1071280067) |
219
+ | QQ 2群 | [点击加入](https://qm.qq.com/q/EeNQA9xCxy)(群号 1071280067) |
209
220
  | 微信群 | 关注公众号后回复「群」获取入群方式 |
210
221
 
211
222
  ---
212
223
 
224
+ ## 🌟 相关项目生态
225
+
226
+ **五个项目组合使用,覆盖 AI 编程从"方法论 → 角色 → 协作 → 教程 → 安全"的完整链路。**
227
+
228
+ | 项目 | 定位 | 一句话 |
229
+ |------|------|-------|
230
+ | **[superpowers-zh](https://github.com/jnMetaCode/superpowers-zh)**(本项目) ![](https://img.shields.io/github/stars/jnMetaCode/superpowers-zh?style=flat&label=⭐) | 🧠 工作方法论 | 20 个 skills 教 AI 怎么干活(TDD / 调试 / 代码审查等) |
231
+ | **[agency-agents-zh](https://github.com/jnMetaCode/agency-agents-zh)** ![](https://img.shields.io/github/stars/jnMetaCode/agency-agents-zh?style=flat&label=⭐) | 🎭 专家角色库 | 211 个**即插即用** AI 专家,含 46 中国原创(小红书 / 抖音 / 飞书 / 钉钉) |
232
+ | **[agency-orchestrator](https://github.com/jnMetaCode/agency-orchestrator)** | 🚀 编排引擎 | 一句话 → 211 专家协作,**几分钟出方案**(9 家 LLM / 6 免费) |
233
+ | **[ai-coding-guide](https://github.com/jnMetaCode/ai-coding-guide)** | 📖 实战教程 | 66 个 Claude Code 技巧 + 9 款工具最佳实践 + 配置模板 |
234
+ | **[shellward](https://github.com/jnMetaCode/shellward)** | 🛡️ 安全中间件 | 8 层防御 + DLP 数据流 + 注入检测,**零依赖**(含 MCP Server) |
235
+
236
+ ---
237
+
238
+ ### 🔥 重点推荐:[agency-orchestrator](https://github.com/jnMetaCode/agency-orchestrator) — 一句话调度 211 个 AI 专家协作,几分钟交付完整方案
239
+
240
+ 以前写个方案:你当指挥官,把 AI 轮流扮演 5 个角色,复制粘贴 10 次,1 小时没了。
241
+
242
+ **现在:** 丢一句话进去 `"做一个电商退款流程"`,**产品 → 架构 → 安全 → 测试 → DBA 自动接力**,几分钟完整方案落地。
243
+
244
+ - 🎭 **211+ 专家角色**(含 46 个中国市场原创:小红书 / 抖音 / 微信 / 飞书 / 钉钉)
245
+ - 🧩 **零代码 YAML**,一行 prompt 就能跑
246
+ - 💰 **9 家 LLM 可选**(DeepSeek / Claude / OpenAI / Ollama 等,**6 家免费**)
247
+ - 🔗 **与 superpowers-zh 互补**:本项目管"**怎么做**"(方法论),orchestrator 管"**谁来做**"(角色协作)
248
+
249
+ 👉 **[立即体验 agency-orchestrator →](https://github.com/jnMetaCode/agency-orchestrator)**
250
+
251
+ ---
252
+
213
253
  ## 致谢
214
254
 
215
255
  - 原始英文版:[obra/superpowers](https://github.com/obra/superpowers)(MIT 协议)
216
256
  - 感谢 [@obra](https://github.com/obra) 创建了这个优秀的项目
217
- - 姊妹项目:
218
- - [ai-coding-guide](https://github.com/jnMetaCode/ai-coding-guide) — AI 编程工具实战指南 — 66 个 Claude Code 技巧 + 9 款工具最佳实践 + 可复制配置模板
219
- - [agency-agents-zh](https://github.com/jnMetaCode/agency-agents-zh) — 187 个专业角色,让 AI 变成安全工程师、DBA、产品经理等
220
- - [agency-orchestrator](https://github.com/jnMetaCode/agency-orchestrator) — 多智能体编排引擎 — 用 YAML 编排 187 个角色协作,支持 DeepSeek/Claude/OpenAI/Ollama,零代码
221
- - [shellward](https://github.com/jnMetaCode/shellward) — AI 智能体安全中间件 — 注入检测、数据防泄露、命令安全、零依赖、MCP Server
222
257
 
223
258
  ---
224
259
 
@@ -230,7 +265,7 @@ MIT License — 自由使用,商业或个人均可。
230
265
 
231
266
  <div align="center">
232
267
 
233
- **🦸 AI 编程超能力:让 Claude Code / Hermes Agent / Cursor 等 16 款工具真正会干活**
268
+ **🦸 AI 编程超能力:让 Claude Code / Hermes Agent / Cursor / Claw Code 17 款工具真正会干活**
234
269
 
235
270
  [Star 本项目](https://github.com/jnMetaCode/superpowers-zh) · [提交 Issue](https://github.com/jnMetaCode/superpowers-zh/issues) · [贡献代码](https://github.com/jnMetaCode/superpowers-zh/pulls)
236
271
 
@@ -56,6 +56,7 @@ const TARGETS = [
56
56
  { name: 'OpenCode', dir: '.opencode/skills', detect: '.opencode' },
57
57
  { name: 'Qwen Code', dir: '.qwen/skills', detect: '.qwen' },
58
58
  { name: 'Hermes Agent', dir: '.hermes/skills', detect: ['.hermes', 'HERMES.md', '.hermes.md'] },
59
+ { name: 'Claw Code', dir: '.claw/skills', detect: ['.claw', 'CLAW.md'] },
59
60
  ];
60
61
 
61
62
  function countDirs(dir) {
@@ -298,6 +299,49 @@ ${skillList}
298
299
  }
299
300
  }
300
301
 
302
+ function generateClaudeCodeBootstrap(projectDir) {
303
+ const skillEntries = scanSkillEntries(SKILLS_SRC);
304
+ const skillList = skillEntries.map(s => `- **${s.name}**: ${s.desc}`).join('\n');
305
+
306
+ const content = `# Superpowers-ZH 中文增强版
307
+
308
+ 本项目已安装 superpowers-zh 技能框架(${skillEntries.length} 个 skills)。
309
+
310
+ ## 核心规则
311
+
312
+ 1. **收到任务时,先检查是否有匹配的 skill** — 哪怕只有 1% 的可能性也要检查
313
+ 2. **设计先于编码** — 收到功能需求时,先用 brainstorming skill 做需求分析
314
+ 3. **测试先于实现** — 写代码前先写测试(TDD)
315
+ 4. **验证先于完成** — 声称完成前必须运行验证命令
316
+
317
+ ## 可用 Skills
318
+
319
+ Skills 位于 \`.claude/skills/\` 目录,每个 skill 有独立的 \`SKILL.md\` 文件。
320
+
321
+ ${skillList}
322
+
323
+ ## 如何使用
324
+
325
+ 当任务匹配某个 skill 时,使用 \`Skill\` 工具加载对应 skill 并严格遵循其流程。绝不要用 Read 工具读取 SKILL.md 文件。
326
+
327
+ 如果你认为哪怕只有 1% 的可能性某个 skill 适用于你正在做的事情,你必须调用该 skill 检查。
328
+ `;
329
+
330
+ const mdPath = resolve(projectDir, 'CLAUDE.md');
331
+ if (existsSync(mdPath)) {
332
+ const existing = readFileSync(mdPath, 'utf8');
333
+ if (!existing.includes('superpowers-zh')) {
334
+ writeFileSync(mdPath, existing + '\n\n' + content, 'utf8');
335
+ console.log(` ✅ Claude Code: 追加 skills 引用 -> ${mdPath}`);
336
+ } else {
337
+ console.log(` ✅ Claude Code: CLAUDE.md 已包含 superpowers-zh 引用`);
338
+ }
339
+ } else {
340
+ writeFileSync(mdPath, content, 'utf8');
341
+ console.log(` ✅ Claude Code: bootstrap -> ${mdPath}`);
342
+ }
343
+ }
344
+
301
345
  // 工具名称别名映射(用户输入 -> TARGETS.name)
302
346
  const TOOL_ALIASES = {
303
347
  'claude': 'Claude Code',
@@ -323,6 +367,9 @@ const TOOL_ALIASES = {
323
367
  'qwen-code': 'Qwen Code',
324
368
  'hermes': 'Hermes Agent',
325
369
  'hermes-agent': 'Hermes Agent',
370
+ 'claw': 'Claw Code',
371
+ 'claw-code': 'Claw Code',
372
+ 'clawcode': 'Claw Code',
326
373
  };
327
374
 
328
375
  function showHelp() {
@@ -386,10 +433,13 @@ function installForTarget(target) {
386
433
  generateHermesBootstrap(PROJECT_DIR);
387
434
  }
388
435
 
389
- if (target.name === 'Claude Code' && existsSync(AGENTS_SRC)) {
390
- const agentsDest = resolve(PROJECT_DIR, '.claude', 'agents');
391
- mkdirSync(agentsDest, { recursive: true });
392
- copyDirSync(AGENTS_SRC, agentsDest);
436
+ if (target.name === 'Claude Code') {
437
+ generateClaudeCodeBootstrap(PROJECT_DIR);
438
+ if (existsSync(AGENTS_SRC)) {
439
+ const agentsDest = resolve(PROJECT_DIR, '.claude', 'agents');
440
+ mkdirSync(agentsDest, { recursive: true });
441
+ copyDirSync(AGENTS_SRC, agentsDest);
442
+ }
393
443
  }
394
444
  }
395
445
 
@@ -441,6 +491,8 @@ function install(forceToolName) {
441
491
  copyDirSync(SKILLS_SRC, dest);
442
492
  console.log(` ✅ 默认安装: ${countDirs(dest)} 个 skills -> ${dest}`);
443
493
 
494
+ generateClaudeCodeBootstrap(PROJECT_DIR);
495
+
444
496
  if (existsSync(AGENTS_SRC)) {
445
497
  const agentsDest = resolve(PROJECT_DIR, '.claude', 'agents');
446
498
  mkdirSync(agentsDest, { recursive: true });
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "superpowers-zh",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "engines": {
5
- "node": ">=14.0.0"
5
+ "node": ">=20.0.0"
6
6
  },
7
- "description": "AI 编程超能力中文增强版 — superpowers(99k+ ⭐)完整汉化 + 6 个中国原创 skills,支持 Claude Code / Copilot CLI / Hermes Agent / Cursor / Windsurf / Kiro / Gemini CLI 等 16 款工具",
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": {
@@ -46,6 +46,7 @@
46
46
  "copilot",
47
47
  "hermes",
48
48
  "hermes-agent",
49
+ "claw-code",
49
50
  "ai-coding",
50
51
  "skills",
51
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