Skip to content

Commit fd145dc

Browse files
committed
feat: add OpenClaw support
- Add OpenClaw target in installer (detect .openclaw/, install to skills/) - Add OpenClaw to README supported tools list, manual install, config table - Add docs/README.openclaw.md installation guide - Add openclaw keyword to package.json
1 parent 03baa78 commit fd145dc

File tree

4 files changed

+109
-3
lines changed

4 files changed

+109
-3
lines changed

README.md

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

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

2121
---
2222

@@ -80,6 +80,7 @@ cp -r superpowers-zh/skills /your/project/.kiro/steering # Kiro
8080
cp -r superpowers-zh/skills /your/project/skills/custom # DeerFlow 2.0
8181
cp -r superpowers-zh/skills /your/project/.trae/rules # Trae
8282
cp -r superpowers-zh/skills /your/project/.antigravity # Antigravity
83+
cp -r superpowers-zh/skills /your/project/skills # OpenClaw
8384
```
8485

8586
### 方式三:在配置文件中引用
@@ -95,8 +96,9 @@ cp -r superpowers-zh/skills /your/project/.antigravity # Antigravity
9596
| Antigravity | `GEMINI.md``AGENTS.md` | 项目根目录 |
9697
| VS Code | `.github/copilot-instructions.md` | Copilot 自定义指令 |
9798
| Cursor | `.cursor/rules/*.md` | 项目级规则目录 |
99+
| OpenClaw | `skills/*/SKILL.md` | 工作区级 skills 目录,自动发现 |
98100

99-
> **详细安装指南**[Kiro](docs/README.kiro.md) · [DeerFlow](docs/README.deerflow.md) · [Trae](docs/README.trae.md) · [Antigravity](docs/README.antigravity.md) · [VS Code](docs/README.vscode.md) · [Codex](docs/README.codex.md) · [OpenCode](docs/README.opencode.md)
101+
> **详细安装指南**[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)
100102
101103
---
102104

bin/superpowers-zh.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const TARGETS = [
1919
{ name: 'Trae', dir: '.trae/rules', detect: '.trae' },
2020
{ name: 'Antigravity', dir: '.antigravity/skills', detect: '.antigravity' },
2121
{ name: 'VS Code', dir: '.github/superpowers', detect: '.github/copilot-instructions.md' },
22+
{ name: 'OpenClaw', dir: 'skills', detect: '.openclaw' },
2223
];
2324

2425
function countDirs(dir) {
@@ -37,7 +38,7 @@ function showHelp() {
3738
3839
说明:
3940
自动检测当前项目使用的 AI 编程工具:
40-
Claude Code / Cursor / Codex / Kiro / DeerFlow / Trae / Antigravity / VS Code
41+
Claude Code / Cursor / Codex / Kiro / DeerFlow / Trae / Antigravity / VS Code / OpenClaw
4142
${countDirs(SKILLS_SRC)} 个 skills 安装到对应目录。
4243
Claude Code 还会额外安装 agents 到 .claude/agents/。
4344
如果未检测到任何工具,默认安装到 .claude/skills/ 和 .claude/agents/。

docs/README.openclaw.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Superpowers 中文版 — OpenClaw 安装指南
2+
3+
[OpenClaw](https://github.com/anthropics/claude-code) 中使用 superpowers-zh 的完整指南。
4+
5+
## 快速安装
6+
7+
```bash
8+
cd /your/project
9+
npx superpowers-zh
10+
```
11+
12+
安装脚本会自动检测 `.openclaw/` 目录并将 skills 复制到 `skills/` 目录。
13+
14+
## 手动安装
15+
16+
```bash
17+
git clone https://github.com/jnMetaCode/superpowers-zh.git
18+
cp -r superpowers-zh/skills/* /your/project/skills/
19+
```
20+
21+
或安装到全局(所有项目共享):
22+
23+
```bash
24+
cp -r superpowers-zh/skills/* ~/.openclaw/skills/
25+
```
26+
27+
## 工作原理
28+
29+
OpenClaw 按以下优先级加载 skills:
30+
31+
| 位置 | 优先级 | 说明 |
32+
|------|--------|------|
33+
| `<workspace>/skills/` | 最高 | 工作区级,当前项目专用 |
34+
| `~/.openclaw/skills/` || 用户级,所有项目共享 |
35+
| 内置 skills | 最低 | OpenClaw 自带 |
36+
37+
每个 skill 是一个 `skills/{name}/SKILL.md` 文件,包含 YAML frontmatter 和指令内容。OpenClaw 会自动发现并加载。
38+
39+
### 推荐配置方式
40+
41+
在项目根目录的 `CLAUDE.md``AGENTS.md` 中引用:
42+
43+
```markdown
44+
# CLAUDE.md
45+
46+
本项目使用 superpowers-zh skills 框架。
47+
优先使用 brainstorming(头脑风暴)开始新任务。
48+
Skills 位于 skills/ 目录下。
49+
```
50+
51+
### 工具映射
52+
53+
OpenClaw 与 Claude Code 使用相同的工具名称,skills 无需额外适配:
54+
55+
| 工具 | OpenClaw | Claude Code |
56+
|------|----------|-------------|
57+
| 读文件 | `Read` | `Read` |
58+
| 写文件 | `Write` | `Write` |
59+
| 编辑 | `Edit` | `Edit` |
60+
| 终端 | `Bash` | `Bash` |
61+
| Skills | `Skill` | `Skill` |
62+
63+
## 使用
64+
65+
安装完成后重启 OpenClaw,所有 skills 会自动生效。你可以:
66+
67+
- 输入 `/brainstorming` 开始头脑风暴
68+
- 输入 `/commit` 使用中文提交规范
69+
- 在任何编码任务中,skills 会被自动调用
70+
71+
## 全局 Skills
72+
73+
如果你想让所有项目都能使用 superpowers-zh:
74+
75+
```bash
76+
mkdir -p ~/.openclaw/skills
77+
cp -r superpowers-zh/skills/* ~/.openclaw/skills/
78+
```
79+
80+
也可以通过 `~/.openclaw/openclaw.json` 配置额外 skills 目录:
81+
82+
```json
83+
{
84+
"skills": {
85+
"load": {
86+
"extraDirs": ["/path/to/superpowers-zh/skills"]
87+
}
88+
}
89+
}
90+
```
91+
92+
## 更新
93+
94+
```bash
95+
cd /your/project
96+
npx superpowers-zh
97+
```
98+
99+
## 获取帮助
100+
101+
- 提交 Issue:https://github.com/jnMetaCode/superpowers-zh/issues
102+
- QQ 群:833585047

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"deerflow",
3333
"trae",
3434
"antigravity",
35+
"openclaw",
3536
"vscode",
3637
"copilot",
3738
"ai-coding",

0 commit comments

Comments
 (0)