4人参与 • 2026-04-22 • CPU
软件地址: https://github.com/obra/superpowers?tab=coc-ov-file
superpowers 是 opencode 生态中最强大的工程化 ai 编程技能库,能让 ai 严格遵循 tdd(测试驱动开发)、代码规范、工程流程,输出可直接上线的工业级代码,彻底解决 ai 编码 “堆屎山” 问题。本文提供 macos/linux/windows 全平台安装、验证、使用、避坑 完整文档,可直接发布。
表格
| 类别 | 技能 | 功能 |
|---|---|---|
| 🧪 测试 | test-driven-development | 先写测试→再写代码→重构(red-green-refactor) |
| verification-before-completion | 完成前必须提供验证证据 | |
| 🐞 调试 | systematic-debugging | 四阶段调试:根因→分析→验证→修复 |
| 🤝 协作 | requesting-code-review | 主动发起代码审查 |
| receiving-code-review | 合理响应审查意见 | |
| finishing-a-development-branch | 分支合并 / pr / 丢弃规范流程 | |
| dispatching-parallel-agents | 多任务并行代理调度 | |
| brainstorming | 需求澄清、苏格拉底式对话 | |
| writing-plans | 生成精确开发计划(文件路径 + 代码 + 验证) | |
| executing-plans | 批量执行开发计划 | |
| code-structure | 项目结构规范 | |
| naming-conventions | 命名规范 | |
| error-handling | 错误处理规范 | |
| 🧩 元技能 | using-superpowers | superpowers 使用指南 |
| writing-skills | 自定义技能开发 |
opencode.json 配置自动安装(1 行配置)找到 opencode 配置文件:
~/.config/opencode/opencode.json%userprofile%\.config\opencode\opencode.json添加 plugin 字段(无则新增,有则追加):
{
"plugin": [
"superpowers@git+https://github.com/obra/superpowers.git"
]
}在 opencode 聊天框输入:
tell me about your superpowers
✅ 成功:返回 superpowers 技能列表、功能说明❌ 失败:重启 opencode 或检查配置文件格式
# 克隆(已存在则更新) if [ -d ~/.config/opencode/superpowers ]; then cd ~/.config/opencode/superpowers && git pull else git clone https://github.com/obra/superpowers.git ~/.config/opencode/superpowers fi
mkdir -p ~/.config/opencode/plugins ~/.config/opencode/skills
rm -f ~/.config/opencode/plugins/superpowers.js rm -rf ~/.config/opencode/skills/superpowers
# 插件链接 ln -s ~/.config/opencode/superpowers/.opencode/plugins/superpowers.js ~/.config/opencode/plugins/superpowers.js # 技能目录链接 ln -s ~/.config/opencode/superpowers/skills ~/.config/opencode/skills/superpowers
git clone https://github.com/obra/superpowers.git %userprofile%\.config\opencode\superpowers
mkdir "%userprofile%\.config\opencode\plugins" 2>nul mkdir "%userprofile%\.config\opencode\skills" 2>nul
del "%userprofile%\.config\opencode\plugins\superpowers.js" 2>nul rmdir "%userprofile%\.config\opencode\skills\superpowers" 2>nul
# 插件链接 mklink "%userprofile%\.config\opencode\plugins\superpowers.js" ^ "%userprofile%\.config\opencode\superpowers\.opencode\plugins\superpowers.js" # 技能目录链接( junction,无需开发者模式) mklink /j "%userprofile%\.config\opencode\skills\superpowers" ^ "%userprofile%\.config\opencode\superpowers\skills"
# 检查插件链接 ls -l ~/.config/opencode/plugins/superpowers.js # 检查技能链接 ls -l ~/.config/opencode/skills/superpowers
✅ 成功:显示 -> 指向 superpowers 目录
/skills list → 看到 superpowers/xxx 技能列表/brainstorm → 触发需求澄清对话/write-plan → 生成开发计划/execute-plan → 批量执行代码/brainstorm # 需求澄清(苏格拉底式对话) /write-plan # 生成开发计划(文件+代码+测试) /execute-plan # 执行计划(自动写代码+跑测试) /skill list # 查看所有 superpowers 技能 /skill superpowers/test-driven-development # 调用tdd技能
/brainstorm → 明确功能、技术栈、边界/write-plan → 生成精确任务清单/execute-plan → ai 自动写测试→代码→重构# 1. 需求 /brainstorm 开发用户登录模块:手机号+密码、jwt 认证、错误处理、测试用例 # 2. 计划 /write-plan 基于上述需求,生成 tdd 开发计划 # 3. 执行 /execute-plan 按计划编写代码、单元测试、集成测试
https://gitee.com/mirrors/superpowers.git/brainstorm 或 /skill using-superpowers/skills list 是否有 superpowers 技能rm -rf ~/.config/opencode/superpowers rm -f ~/.config/opencode/plugins/superpowers.js rm -rf ~/.config/opencode/skills/superpowers
~/.config/opencode 目录有读写权限# macos/linux cd ~/.config/opencode/superpowers && git pull # windows cd %userprofile%\.config\opencode\superpowers && git pull
重启 opencode 生效
# macos/linux rm -rf ~/.config/opencode/superpowers rm -f ~/.config/opencode/plugins/superpowers.js rm -rf ~/.config/opencode/skills/superpowers # windows rmdir /s /q %userprofile%\.config\opencode\superpowers del %userprofile%\.config\opencode\plugins\superpowers.js rmdir /s /q %userprofile%\.config\opencode\skills\superpowers
superpowers 是 opencode 必备的工程化增效插件,彻底解决 ai 编码不规范、难维护、bug 多的痛点。推荐优先用方式 a(自动安装),1 行配置搞定;windows / 旧版用方式 b(手动)。
下一步:安装后直接用 /brainstorm 启动你的第一个 tdd 项目,体验 ai 工业级编码!
扩展:open code教程(五)| skills 之 superpowers 安装
相关链接:https://github.com/obra/superpowers/blob/main/.opencode/install.md
// opencode.json
{
"plugin": ["superpowers@git+https://github.com/obra/superpowers.git"]
}重启 opencode 后自动安装。
bun 在 windows 上下载 git 包时存在 ssl 证书验证问题:
error: unable_to_verify_leaf_signature downloading tarball superpowers@github:obra/superpowers
macos/linux 正常,windows 失败。
# 1. 克隆仓库(删除旧的,重新克隆)
remove-item -path "$env:userprofile\.config\opencode\superpowers" -recurse -force -erroraction silentlycontinue
git clone --depth 1 https://github.com/obra/superpowers.git "$env:userprofile\.config\opencode\superpowers"
# 2. 创建目录(公共目录,不存在才创建)
if (-not (test-path "$env:userprofile\.config\opencode\plugins")) {
new-item -itemtype directory -path "$env:userprofile\.config\opencode\plugins" | out-null
}
if (-not (test-path "$env:userprofile\.config\opencode\skills")) {
new-item -itemtype directory -path "$env:userprofile\.config\opencode\skills" | out-null
}
# 3. 复制插件文件(直接覆盖,确保最新)
copy-item -path "$env:userprofile\.config\opencode\superpowers\.opencode\plugins\superpowers.js" -destination "$env:userprofile\.config\opencode\plugins\superpowers.js" -force
# 4. 创建链接(已存在则重建,确保指向正确)
if (test-path "$env:userprofile\.config\opencode\skills\superpowers") {
remove-item -path "$env:userprofile\.config\opencode\skills\superpowers" -force
}
new-item -itemtype junction -path "$env:userprofile\.config\opencode\skills\superpowers" -target "$env:userprofile\.config\opencode\superpowers\skills" | out-nullcd "$env:userprofile\.config\opencode\superpowers" git pull
# 删除插件文件 remove-item -path "$env:userprofile\.config\opencode\plugins\superpowers.js" -force -erroraction silentlycontinue # 删除 skills 链接 remove-item -path "$env:userprofile\.config\opencode\skills\superpowers" -force -erroraction silentlycontinue # 删除仓库 remove-item -path "$env:userprofile\.config\opencode\superpowers" -recurse -force -erroraction silentlycontinue
重启 opencode,输入:
tell me about your superpowers
到此这篇关于opencode 安装 superpowers 完全攻略的文章就介绍到这了,更多相关opencode 安装 superpowers 内容请搜索代码网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持代码网!
到此这篇关于opencode 安装 superpowers 完全攻略的文章就介绍到这了,更多相关opencode 安装 superpowers 内容请搜索代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持代码网!
您想发表意见!!点此发布评论
版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。
发表评论