Open Code教程(五)| Skills 之 Superpowers 安装
Open Code教程(五)| Skills 之 Superpowers 安装
·
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 后自动安装。
为什么 Windows 上用不了
Bun 在 Windows 上下载 git 包时存在 SSL 证书验证问题:
error: UNABLE_TO_VERIFY_LEAF_SIGNATURE downloading tarball superpowers@github:obra/superpowers
macOS/Linux 正常,Windows 失败。
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-Null
更新
cd "$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
更多推荐




所有评论(0)