Skip to content

Commit cd651cd

Browse files
authored
feat: 新增 CodeBuddy(腾讯 AI IDE)工具支持(关 #18 #75) (#98)
CodeBuddy 加载机制类似同类 IDE:项目根 CODEBUDDY.md 作 bootstrap, skills 放 .codebuddy/skills/。仅项目级(用户级加载路径未证实,暂不做全局)。 - bin: 加 TARGET(检测 .codebuddy / CODEBUDDY.md)+ 别名(codebuddy/-cn/-code) + CODEBUDDY.md bootstrap 生成 + 卸载哨兵清理 - 工具数 18 → 19:README/站点/package.json/FAQ/stats 全量同步 - docs/README.codebuddy.md 中文使用文档;audit TOOLS 加 codebuddy - 站点 FAQ 与工具列表补 CodeBuddy 测试:audit 122 PASS/0 FAIL(含 codebuddy 装/幂等/卸载)、全局套件 50/50 回归无破、站点重建 42 页工具数 19。
1 parent 5d423a1 commit cd651cd

6 files changed

Lines changed: 130 additions & 20 deletions

File tree

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
🌐 **简体中文** | [English (upstream)](https://github.com/obra/superpowers)
44

5-
> 🦸 **superpowers(250k+ ⭐)完整汉化 + 4 个中国原创 skills** — 让 Claude Code / Copilot CLI / Hermes Agent / Cursor / Windsurf / Kiro / Gemini CLI / Qoder 等 **18 款 AI 编程工具**真正会干活。从头脑风暴到代码审查,从 TDD 到调试,每个 skill 都是经过实战验证的工作方法论。
5+
> 🦸 **superpowers(250k+ ⭐)完整汉化 + 4 个中国原创 skills** — 让 Claude Code / Copilot CLI / Hermes Agent / Cursor / Windsurf / Kiro / Gemini CLI / Qoder 等 **19 款 AI 编程工具**真正会干活。从头脑风暴到代码审查,从 TDD 到调试,每个 skill 都是经过实战验证的工作方法论。
66
7-
Chinese community edition of [superpowers](https://github.com/obra/superpowers) — 20 skills across 18 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 19 AI coding tools, including full translations and China-specific development skills.
88

99
[![官网 sp.aiolaola.com](https://img.shields.io/badge/🌐_官网-sp.aiolaola.com-F59E0B)](https://sp.aiolaola.com)
1010
[![GitHub stars](https://img.shields.io/github/stars/jnMetaCode/superpowers-zh?style=social)](https://github.com/jnMetaCode/superpowers-zh)
@@ -64,7 +64,7 @@ AI:在开始实现之前,我需要了解几个关键问题:
6464
| ⭐ Star 数 | 250k+ ||
6565
| 📦 Skills 总数 | 14 | **20**(14 翻译 + 4 国产原创 + 2 上游历史保留) |
6666
| 🌐 语言 | 英文 | 中文(技术术语保留英文) |
67-
| 🤖 **支持工具** | **6 款**:Claude Code / Cursor / Codex / OpenCode / Copilot CLI / Gemini CLI | **18**:上述 6 款 + Hermes Agent / Trae / Kiro / Qwen Code(通义灵码)/ OpenClaw / Claw Code / Antigravity / DeerFlow / VS Code / Windsurf / Aider / Qoder |
67+
| 🤖 **支持工具** | **6 款**:Claude Code / Cursor / Codex / OpenCode / Copilot CLI / Gemini CLI | **19**:上述 6 款 + Hermes Agent / Trae / Kiro / Qwen Code(通义灵码)/ OpenClaw / Claw Code / Antigravity / DeerFlow / VS Code / Windsurf / Aider / Qoder / CodeBuddy(腾讯) |
6868
|**安装方式** | 按工具分别装(每款一条不同的 plugin marketplace 命令) | **`npx superpowers-zh` 一条命令自动识别项目里的工具并安装**;识别不出可 `--tool <name>` 显式指定 |
6969
| 🇨🇳 Git 平台 | GitHub 为主 | GitHub + Gitee + Coding + 极狐 GitLab + **CNB(腾讯云原生构建)** |
7070
| 🇨🇳 CI/CD 示例 | GitHub Actions | GitHub Actions + Gitee Go + Coding CI + 极狐 CI + `.cnb.yml` |
@@ -78,9 +78,9 @@ AI:在开始实现之前,我需要了解几个关键问题:
7878
| 💬 社区 | Discord | 微信公众号「AI不止语」+ 微信群 + QQ 群 |
7979
| 📜 License | MIT | MIT |
8080

81-
**一句话总结:** 英文上游 = 方法论内核;中文增强版 = 方法论内核 **+** 18 款工具一键适配 **+** 国内 Git/CI 生态 **+** 中文化表达习惯。
81+
**一句话总结:** 英文上游 = 方法论内核;中文增强版 = 方法论内核 **+** 19 款工具一键适配 **+** 国内 Git/CI 生态 **+** 中文化表达习惯。
8282

83-
### 🤖 支持 18 款主流 AI 编程工具
83+
### 🤖 支持 19 款主流 AI 编程工具
8484

8585
| 工具 | 类型 | 一键安装 | 手动安装 |
8686
|------|------|:---:|:---:|
@@ -102,6 +102,7 @@ AI:在开始实现之前,我需要了解几个关键问题:
102102
| [Antigravity](https://github.com/anthropics/antigravity) | CLI | `npx superpowers-zh` | `.agents/skills/` |
103103
| [Claw Code](https://github.com/ultraworkers/claw-code) | CLI (Rust) | `npx superpowers-zh` | `.claw/skills/` |
104104
| [Qoder](https://qoder.com) (阿里 AI IDE) | IDE | `npx superpowers-zh` | `.qoder/skills/` + `.qoder/rules/` |
105+
| [CodeBuddy](https://copilot.tencent.com) (腾讯 AI IDE) | IDE | `npx superpowers-zh` | `.codebuddy/skills/` + `CODEBUDDY.md` |
105106

106107
> 运行 `npx superpowers-zh` 会自动检测你项目中使用的工具,将 20 个 skills 安装到正确位置。
107108
@@ -230,7 +231,7 @@ cp -r superpowers-zh/skills /your/project/.qoder/skills # Qoder(阿里 AI
230231
| Claw Code | `.claw/skills/*/SKILL.md` | Rust 版 CLI agent,兼容 Claude Code 的 SKILL.md 格式 |
231232
| Qoder | `.qoder/skills/*/SKILL.md` + `.qoder/rules/superpowers-zh.md` | 阿里 AI IDE,自动生成 `trigger: always_on` 的 bootstrap rule |
232233

233-
> **详细安装指南**[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) · [Qoder](docs/README.qoder.md) · [Kimi Code](docs/README.kimi.md) · [Pi](docs/README.pi.md)
234+
> **详细安装指南**[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) · [Qoder](docs/README.qoder.md) · [CodeBuddy](docs/README.codebuddy.md) · [Kimi Code](docs/README.kimi.md) · [Pi](docs/README.pi.md)
234235
235236
### 卸载 / 误装清理(v1.2.1+)
236237

@@ -344,7 +345,7 @@ MIT License — 自由使用,商业或个人均可。
344345

345346
<div align="center">
346347

347-
**🦸 AI 编程超能力:让 Claude Code / Hermes Agent / Cursor / Claw Code / Qoder 等 18 款工具真正会干活**
348+
**🦸 AI 编程超能力:让 Claude Code / Hermes Agent / Cursor / Claw Code / Qoder 等 19 款工具真正会干活**
348349

349350
[Star 本项目](https://github.com/jnMetaCode/superpowers-zh) · [提交 Issue](https://github.com/jnMetaCode/superpowers-zh/issues) · [贡献代码](https://github.com/jnMetaCode/superpowers-zh/pulls)
350351

bin/superpowers-zh.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const TARGETS = [
7777
{ name: 'Hermes Agent', dir: '.hermes/skills', detect: ['.hermes', 'HERMES.md', '.hermes.md'] },
7878
{ name: 'Claw Code', dir: '.claw/skills', detect: ['.claw', 'CLAW.md'] },
7979
{ name: 'Qoder', dir: '.qoder/skills', detect: '.qoder', global: { dir: '.qoder/skills', detect: '.qoder' } },
80+
{ name: 'CodeBuddy', dir: '.codebuddy/skills', detect: ['.codebuddy', 'CODEBUDDY.md'] },
8081
];
8182

8283
function countDirs(dir) {
@@ -426,6 +427,49 @@ ${skillList}
426427
}
427428
}
428429

430+
// CodeBuddy(腾讯 AI IDE)—— 加载机制类似 Claude Code:项目根 CODEBUDDY.md 作 bootstrap,
431+
// skills 放 .codebuddy/skills/。仅项目级(其用户级 skills 加载路径未证实,暂不做全局)。
432+
function generateCodeBuddyBootstrap(baseDir) {
433+
const skillEntries = scanSkillEntries(SKILLS_SRC);
434+
const skillList = skillEntries.map(s => `- **${s.name}**: ${s.desc}`).join('\n');
435+
436+
const content = `# Superpowers-ZH 中文增强版
437+
438+
本项目已安装 superpowers-zh 技能框架(${skillEntries.length} 个 skills)。
439+
440+
## 核心规则
441+
442+
1. **收到任务时,先检查是否有匹配的 skill** — 哪怕只有 1% 的可能性也要检查
443+
2. **设计先于编码** — 收到功能需求时,先用 brainstorming skill 做需求分析
444+
3. **测试先于实现** — 写代码前先写测试(TDD)
445+
4. **验证先于完成** — 声称完成前必须运行验证命令
446+
447+
## 可用 Skills
448+
449+
Skills 位于 \`.codebuddy/skills/\` 目录,每个 skill 有独立的 \`SKILL.md\` 文件。
450+
451+
${skillList}
452+
453+
## 如何使用
454+
455+
当任务匹配某个 skill 时,读取对应的 \`.codebuddy/skills/<skill-name>/SKILL.md\` 并严格遵循其流程。
456+
`;
457+
458+
const mdPath = resolve(baseDir, 'CODEBUDDY.md');
459+
if (existsSync(mdPath)) {
460+
const existing = readFileSync(mdPath, 'utf8');
461+
if (!existing.includes('superpowers-zh')) {
462+
writeFileSync(mdPath, existing.replace(/\s+$/, '') + '\n\n' + wrapWithSentinel(content), 'utf8');
463+
console.log(` ✅ CodeBuddy: 追加 skills 引用 -> ${mdPath}`);
464+
} else {
465+
console.log(` ✅ CodeBuddy: CODEBUDDY.md 已包含 superpowers-zh 引用`);
466+
}
467+
} else {
468+
writeFileSync(mdPath, wrapWithSentinel(content), 'utf8');
469+
console.log(` ✅ CodeBuddy: bootstrap -> ${mdPath}`);
470+
}
471+
}
472+
429473
// 工具名称别名映射(用户输入 -> TARGETS.name)
430474
const TOOL_ALIASES = {
431475
'claude': 'Claude Code',
@@ -455,6 +499,10 @@ const TOOL_ALIASES = {
455499
'claw-code': 'Claw Code',
456500
'clawcode': 'Claw Code',
457501
'qoder': 'Qoder',
502+
'codebuddy': 'CodeBuddy',
503+
'codebuddy-code': 'CodeBuddy',
504+
'codebuddycode': 'CodeBuddy',
505+
'codebuddy-cn': 'CodeBuddy',
458506
};
459507

460508
function showHelp() {
@@ -537,6 +585,10 @@ function installForTarget(target, baseDir, isGlobal) {
537585
if (target.name === 'Claude Code') {
538586
generateClaudeCodeBootstrap(baseDir, isGlobal);
539587
}
588+
589+
if (target.name === 'CodeBuddy') {
590+
generateCodeBuddyBootstrap(baseDir);
591+
}
540592
}
541593

542594
function isHomeDir(p) {
@@ -558,6 +610,7 @@ const BOOTSTRAP_CLEAN_SECTION = [
558610
'GEMINI.md',
559611
'HERMES.md',
560612
'CONVENTIONS.md',
613+
'CODEBUDDY.md',
561614
];
562615
const BOOTSTRAP_SECTION_MARKERS = [
563616
'# Superpowers-ZH 中文增强版',

docs/README.codebuddy.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# CodeBuddy 使用指南
2+
3+
[CodeBuddy](https://copilot.tencent.com)(腾讯云 AI 编程助手 / AI IDE)加载 superpowers-zh skills 的方式与 Claude Code 类似:项目根目录的 `CODEBUDDY.md` 作为 bootstrap 引导,skills 放在 `.codebuddy/skills/` 下。
4+
5+
## 一键安装(推荐)
6+
7+
在你的项目根目录运行:
8+
9+
```bash
10+
npx superpowers-zh
11+
```
12+
13+
自动检测到 `.codebuddy/``CODEBUDDY.md` 时会安装到 CodeBuddy。检测不到时显式指定:
14+
15+
```bash
16+
npx superpowers-zh --tool codebuddy
17+
```
18+
19+
安装内容:
20+
21+
- `.codebuddy/skills/` — 20 个 skill(每个含 `SKILL.md`
22+
- `CODEBUDDY.md` — bootstrap 引导(已存在则在哨兵注释间追加,不覆盖你的内容)
23+
24+
## Skill 加载优先级
25+
26+
| 位置 | 说明 |
27+
|------|------|
28+
| `.codebuddy/skills/` | 项目级,仅当前项目 |
29+
30+
> 目前仅支持项目级安装。CodeBuddy 的用户级(全局)skills 加载路径尚未验证,确认可行后再补 `--global` 支持。
31+
32+
## 使用
33+
34+
1. 安装完成后**重启 CodeBuddy**
35+
2. CodeBuddy 读取 `CODEBUDDY.md` 后,会在任务匹配某个 skill 的触发条件时,读取对应的 `.codebuddy/skills/<skill-name>/SKILL.md` 并遵循其流程。
36+
3. 当任务涉及需求分析、TDD、系统化调试、代码审查等场景时,对应 skill 会被引用。
37+
38+
## 卸载
39+
40+
```bash
41+
npx superpowers-zh --uninstall
42+
```
43+
44+
移除 `.codebuddy/skills/` 下的 skills,并按哨兵注释精确切除 `CODEBUDDY.md` 里的 superpowers-zh 段落(不误删你自己的内容)。
45+
46+
## 故障排查
47+
48+
- **skills 没生效**:确认已重启 CodeBuddy;确认 `CODEBUDDY.md` 里存在 `# Superpowers-ZH 中文增强版` 段落。
49+
- **自动检测不到**:用 `npx superpowers-zh --tool codebuddy` 显式指定。
50+
51+
## 反馈
52+
53+
- 提交 Issue:https://github.com/jnMetaCode/superpowers-zh/issues
54+
- 项目主页:https://github.com/jnMetaCode/superpowers-zh

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"engines": {
55
"node": ">=20.0.0"
66
},
7-
"description": "AI 编程超能力中文增强版 — superpowers(250k+ ⭐)完整汉化 + 4 个中国原创 skills,支持 Claude Code / Copilot CLI / Hermes Agent / Cursor / Claw Code / Windsurf / Kiro / Gemini CLI / Qoder 等 18 款工具",
7+
"description": "AI 编程超能力中文增强版 — superpowers(250k+ ⭐)完整汉化 + 4 个中国原创 skills,支持 Claude Code / Copilot CLI / Hermes Agent / Cursor / Claw Code / Windsurf / Kiro / Gemini CLI / Qoder 等 19 款工具",
88
"type": "module",
99
"main": ".opencode/plugins/superpowers.js",
1010
"bin": {
@@ -57,6 +57,7 @@
5757
"hermes-agent",
5858
"claw-code",
5959
"qoder",
60+
"codebuddy",
6061
"ai-coding",
6162
"skills",
6263
"chinese",

scripts/audit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ if [ "$QUICK" != "1" ]; then
9595
hdr "Category 2: Installer 功能测试(18 款工具)"
9696
#==============================================================================
9797

98-
declare -a TOOLS=(claude cursor codex kiro deerflow trae antigravity vscode openclaw windsurf gemini aider opencode qwen hermes claw copilot qoder)
98+
declare -a TOOLS=(claude cursor codex kiro deerflow trae antigravity vscode openclaw windsurf gemini aider opencode qwen hermes claw copilot qoder codebuddy)
9999

100100
for tool in "${TOOLS[@]}"; do
101101
TMP=$(mktemp -d)

0 commit comments

Comments
 (0)