OpenCode Superpowers 插件安装与使用全指南
OpenCode Superpowers 插件将软件工程最佳实践(TDD、代码审查、重构)植入 AI 生成逻辑,提升代码质量和开发效率。
一、插件介绍
核心价值:
- 规范 AI 开发流程:强制引导 AI 遵循 TDD、YAGNI 等最佳实践;
- 技能化拆解任务:内置多种实用技能(头脑风暴、调试、代码审查、重构),按需加载;
- 轻量无负担:仅依赖 OpenCode 原生能力,支持全局/本地双部署;
- 兼容性强:适配主流 OpenCode 版本,兼容 Claude Code、Codex 等多种 AI 编程代理。
二、前置准备
- 已安装 OpenCode(任意稳定版本均可);
- 具备基础终端操作能力,能执行 git、ln 命令;
- 网络正常:需访问 GitHub 拉取仓库代码。
三、详细安装步骤
步骤 1:克隆 Superpowers 仓库
git clone https://github.com/obra/superpowers.git ~/.config/opencode/superpowers
步骤 2:注册插件(创建符号链接)
mkdir -p ~/.config/opencode/plugins
ln -sf ~/.config/opencode/superpowers/.opencode/plugins/superpowers.js ~/.config/opencode/plugins/
步骤 3:关联技能目录(创建符号链接)
mkdir -p ~/.config/opencode/skills
ln -sf ~/.config/opencode/superpowers/skills ~/.config/opencode/skills/superpowers
步骤 4:安装完成验证
ls -l ~/.config/opencode/plugins/superpowers.js
ls -l ~/.config/opencode/skills/superpowers
成功标志:输出结果中包含'->',且指向正确的 superpowers 目录。
四、激活插件 + 验证安装
步骤 1:重启 OpenCode
exit
opencode
步骤 2:验证插件是否生效
输入以下提问:
do you have superpowers?
成功回复示例:
Yes! I have Superpowers installed and ready to use. Available skills include: superpowers/brainstorming, superpowers/tdd, superpowers/debugging, superpowers/code-review, superpowers/refactoring.
若验证失败,请重新执行步骤 2 和步骤 3 的链接命令,再重启 OpenCode。


