官方安装方式

相关链接: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

Logo

小龙虾开发者社区是 CSDN 旗下专注 OpenClaw 生态的官方阵地,聚焦技能开发、插件实践与部署教程,为开发者提供可直接落地的方案、工具与交流平台,助力高效构建与落地 AI 应用

更多推荐