Superpowers
An agentic skills framework & software development methodology that works.
一个真正可行的 Agent 技能框架与软件开发方法论
Superpowers is a complete software development workflow for your coding agents, built on top of a set of composable "skills" and some initial instructions that make sure your agent uses them.
It starts from the moment you fire up your coding agent. As soon as it sees that you're building something, it doesn't just jump into trying to write code. Instead, it steps back and asks you what you're really trying to do.
Once it's teased a spec out of the conversation, it shows it to you in chunks short enough to actually read and digest.
After you've signed off on the design, your agent puts together an implementation plan that's clear enough for an enthusiastic junior engineer with poor taste, no judgement, no project context, and an aversion to testing to follow. It emphasizes true red/green TDD, YAGNI (You Aren't Gonna Need It), and DRY.
Next up, once you say "go", it launches a subagent-driven-development process, having agents work through each engineering task, inspecting and reviewing their work, and continuing forward. It's not uncommon for Claude to be able to work autonomously for a couple hours at a time without deviating from the plan you put together.
Superpowers 是一套完整的软件开发工作流程,专为编程 Agent 设计。它构建在一组可组合的"技能"(Skills)以及一系列初始指令之上,确保你的 Agent 会主动使用这些技能。
从你启动编程 Agent 的那一刻起,Superpowers 就开始发挥作用。当它发现你要构建什么东西时,不会贸然跳进去写代码,而是会退后一步,询问你真正想要实现什么。
从对话中提炼出规格说明后,它会将内容分成小块展示给你,让你能够真正阅读和消化。
当你对设计签字确认后,Agent 会制定一份实现计划,其清晰程度足以让一个热情但缺乏品味、没有判断力、不了解项目上下文、还讨厌写测试的初级工程师也能遵循。计划强调真正的红/绿 TDD、YAGNI(你不会需要它)以及 DRY(不要重复自己)原则。
一旦你说"开始",它就会启动 Subagent 驱动开发流程,让 Agent 处理每一个工程任务,检验和审查它们的工作,然后继续推进。Claude 能够自主工作数小时而不偏离你们共同制定的计划,这是很常见的。
Test-Driven Development
测试驱动开发 — Write tests first, always. 先写测试,永远如此。
Systematic over ad-hoc
系统化优于临时抱佛脚 — Process over guessing. 流程优于猜测。
Complexity reduction
降低复杂度 — Simplicity as primary goal. 简洁是首要目标。
Evidence over claims
证据优于声明 — Verify before declaring success. 在宣布成功前先验证。
Claude Code
🇺🇸 English
Superpowers is available via the official Claude plugin marketplace.
In Claude Code, register the marketplace first:
/plugin marketplace add obra/superpowers-marketplace
Then install the plugin from this marketplace:
/plugin install superpowers@superpowers-marketplace
To update:
/plugin update superpowers
🇨🇳 中文
Superpowers 可通过官方 Claude 插件市场获取。
在 Claude Code 中,先注册插件市场:
/plugin marketplace add obra/superpowers-marketplace
然后从该市场安装插件:
/plugin install superpowers@superpowers-marketplace
更新方法:
/plugin update superpowers
OpenAI Codex
Tell Codex:
Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.codex/INSTALL.md
Detailed docs: docs/README.codex.md
Manual Setup:
- Clone the repo:
git clone https://github.com/obra/superpowers.git ~/.codex/superpowers - Create the skills symlink:
mkdir -p ~/.agents/skills && ln -s ~/.codex/superpowers/skills ~/.agents/skills/superpowers - Restart Codex.
For subagent skills (optional), add to Codex config:
[features]
multi_agent = true
Codex has native skill discovery — it scans ~/.agents/skills/ at startup, parses SKILL.md frontmatter, and loads skills on demand.
告诉 Codex:
Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.codex/INSTALL.md
详细文档:docs/README.codex.md
手动安装:
- 克隆仓库:
git clone https://github.com/obra/superpowers.git ~/.codex/superpowers - 创建技能符号链接:
mkdir -p ~/.agents/skills && ln -s ~/.codex/superpowers/skills ~/.agents/skills/superpowers - 重启 Codex。
如需 Subagent 技能(可选),在 Codex 配置中添加:
[features]
multi_agent = true
Codex 有原生技能发现机制——启动时扫描 ~/.agents/skills/,解析 SKILL.md frontmatter,按需加载技能。
OpenCode.ai
Add superpowers to the plugin array in your opencode.json (global or project-level):
{
"plugin": ["superpowers@git+https://github.com/obra/superpowers.git"]
}
Restart OpenCode. The plugin auto-installs via Bun and registers all skills automatically.
Verify by asking: "Tell me about your superpowers"
If you previously installed via git clone and symlinks, remove the old setup first:
rm -f ~/.config/opencode/plugins/superpowers.js
rm -rf ~/.config/opencode/skills/superpowers
rm -rf ~/.config/opencode/superpowers
Superpowers updates automatically when you restart OpenCode. To pin a specific version:
{
"plugin": ["superpowers@git+https://github.com/obra/superpowers.git#v5.0.3"]
}
在 opencode.json(全局或项目级)的插件数组中添加 superpowers:
{
"plugin": ["superpowers@git+https://github.com/obra/superpowers.git"]
}
重启 OpenCode。插件通过 Bun 自动安装并注册所有技能。
验证方法:问 "Tell me about your superpowers"
如果之前通过 git clone 和符号链接安装过,先移除旧配置:
rm -f ~/.config/opencode/plugins/superpowers.js
rm -rf ~/.config/opencode/skills/superpowers
rm -rf ~/.config/opencode/superpowers
重启 OpenCode 时 Superpowers 会自动更新。如需固定版本:
{
"plugin": ["superpowers@git+https://github.com/obra/superpowers.git#v5.0.3"]
}
GitHub Copilot
🇺🇸 English
copilot plugin marketplace add obra/superpowers-marketplace
copilot plugin install superpowers@superpowers-marketplace
Google Gemini
🇺🇸 English
gemini extensions install https://github.com/obra/superpowers
gemini extensions update superpowers
Start a new session in your chosen platform and ask for something that should trigger a skill (for example, "help me plan this feature" or "let's debug this issue"). The agent should automatically invoke the relevant superpowers skill.
- brainstorming - Activates before writing code. Refines rough ideas through questions, explores alternatives, presents design in sections for validation. Saves design document.
- using-git-worktrees - Activates after design approval. Creates isolated workspace on new branch, runs project setup, verifies clean test baseline.
- writing-plans - Activates with approved design. Breaks work into bite-sized tasks (2-5 minutes each). Every task has exact file paths, complete code, verification steps.
- subagent-driven-development / executing-plans - Activates with plan. Dispatches fresh subagent per task with two-stage review (spec compliance, then code quality), or executes in batches with human checkpoints.
- test-driven-development - Activates during implementation. Enforces RED-GREEN-REFACTOR: write failing test, watch it fail, write minimal code, watch it pass, commit. Deletes code written before tests.
- requesting-code-review - Activates between tasks. Reviews against plan, reports issues by severity. Critical issues block progress.
- finishing-a-development-branch - Activates when tasks complete. Verifies tests, presents options (merge/PR/keep/discard), cleans up worktree.
在你选择的平台上启动新会话,问一些能触发技能的问题(例如"帮我规划这个功能"或"我们来调试这个问题")。Agent 会自动调用相关的 Superpowers 技能。
- brainstorming(头脑风暴)- 在写代码之前激活。通过提问细化粗糙想法,探索替代方案,分段展示设计供确认,保存设计文档。
- using-git-worktrees(使用 Git Worktrees)- 设计确认后激活。在新分支上创建隔离工作空间,运行项目设置,验证测试基线干净。
- writing-plans(编写计划)- 设计获批后激活。将工作拆分为小任务(每个 2-5 分钟)。每个任务都有精确的文件路径、完整代码和验证步骤。
- subagent-driven-development / executing-plans(Subagent 驱动开发 / 执行计划)- 有计划时激活。为每个任务分派新的 Subagent,进行两阶段审查(先规范合规性,再代码质量),或批量执行并在关键节点暂停等待人工确认。
- test-driven-development(测试驱动开发)- 实现阶段激活。强制执行红-绿-重构循环:先写失败测试,看它失败,再写最少量代码,看它通过,然后提交。删除在测试之前写的代码。
- requesting-code-review(请求代码审查)- 任务之间激活。对照计划进行审查,按严重程度报告问题。严重问题阻止进度。
- finishing-a-development-branch(完成开发分支)- 任务完成时激活。验证测试,提供选项(合并/PR/保留/丢弃),清理 worktree。
Testing 测试
- test-driven-development — RED-GREEN-REFACTOR cycle (includes testing anti-patterns reference)
Debugging 调试
- systematic-debugging — 4-phase root cause process (includes root-cause-tracing, defense-in-depth, condition-based-waiting techniques)
- verification-before-completion — Ensure it's actually fixed
Collaboration 协作
- brainstorming — Socratic design refinement
- writing-plans — Detailed implementation plans
- executing-plans — Batch execution with checkpoints
- dispatching-parallel-agents — Concurrent subagent workflows
- requesting-code-review — Pre-review checklist
- receiving-code-review — Responding to feedback
- using-git-worktrees — Parallel development branches
- finishing-a-development-branch — Merge/PR decision workflow
- subagent-driven-development — Fast iteration with two-stage review (spec compliance, then code quality)
- brainstorming(头脑风暴)— 苏格拉底式设计精化
- writing-plans(编写计划)— 详细的实现计划
- executing-plans(执行计划)— 带检查点的批量执行
- dispatching-parallel-agents(分发并行 Agent)— 并发 Subagent 工作流
- requesting-code-review(请求代码审查)— 审查前检查清单
- receiving-code-review(接收代码审查)— 响应反馈
- using-git-worktrees(使用 Git Worktrees)— 并行开发分支
- finishing-a-development-branch(完成开发分支)— 合并/PR 决策工作流
- subagent-driven-development(Subagent 驱动开发)— 两阶段审查快速迭代(先规范合规性,再代码质量)
Meta Skills
- writing-skills — Create new skills following best practices (includes testing methodology)
- using-superpowers — Introduction to the skills system
This document describes how to test Superpowers skills, particularly the integration tests for complex skills like subagent-driven-development.
Testing skills that involve subagents, workflows, and complex interactions requires running actual Claude Code sessions in headless mode and verifying their behavior through session transcripts.
Test Structure:
tests/
├── claude-code/
│ ├── test-helpers.sh # Shared test utilities
│ ├── test-subagent-driven-development-integration.sh
│ ├── analyze-token-usage.py # Token analysis tool
│ └── run-skill-tests.sh # Test runner
Integration tests execute real Claude Code sessions with actual skills.
# Run the subagent-driven-development integration test
cd tests/claude-code
./test-subagent-driven-development-integration.sh
Note: Integration tests can take 10-30 minutes as they execute real implementation plans with multiple subagents.
Requirements:
- Must run from the superpowers plugin directory (not from temp directories)
- Claude Code must be installed and available as
claudecommand - Local dev marketplace must be enabled:
"superpowers@superpowers-dev": truein~/.claude/settings.json
What the integration test verifies:
- Plan Loading: Reads the plan once at the beginning
- Full Task Text: Provides complete task descriptions to subagents (doesn't make them read files)
- Self-Review: Ensures subagents perform self-review before reporting
- Review Order: Runs spec compliance review before code quality review
- Review Loops: Uses review loops when issues are found
- Independent Verification: Spec reviewer reads code independently, doesn't trust implementer reports
本文档描述如何测试 Superpowers 技能,特别是像 subagent-driven-development 这类复杂技能的集成测试。
测试涉及 Subagent、工作流和复杂交互的技能,需要以无头模式运行真实的 Claude Code 会话,并通过会话转录文件验证其行为。
测试结构:
tests/
├── claude-code/
│ ├── test-helpers.sh # 共享测试工具
│ ├── test-subagent-driven-development-integration.sh
│ ├── analyze-token-usage.py # Token 分析工具
│ └── run-skill-tests.sh # 测试运行器
集成测试执行带有真实技能的 Claude Code 会话。
# 运行 subagent-driven-development 集成测试
cd tests/claude-code
./test-subagent-driven-development-integration.sh
注意:集成测试可能需要 10-30 分钟,因为它们用多个 Subagent 执行真实的实现计划。
要求:
- 必须从 superpowers 插件目录运行(不能从临时目录)
- Claude Code 必须已安装且可用
claude命令调用 - 必须启用本地开发市场:在
~/.claude/settings.json中设置"superpowers@superpowers-dev": true
集成测试验证的内容:
- 计划加载: 在开始时读取一次计划
- 完整任务文本: 向 Subagent 提供完整任务描述(不让他们读文件)
- 自我审查: 确保 Subagent 在报告前进行自我审查
- 审查顺序: 先进行规范合规性审查,再进行代码质量审查
- 审查循环: 发现问题时使用审查循环
- 独立验证: 规范审查者独立阅读代码,不信任实现者报告
Token Usage Analysis / Token 使用分析
Analyze token usage from any Claude Code session:
python3 tests/claude-code/analyze-token-usage.py ~/.claude/projects//.jsonl
Session transcripts are stored in ~/.claude/projects/ with the working directory path encoded. The analysis shows:
- Main session usage: Token usage by the coordinator
- Per-subagent breakdown: Each Task invocation with agent ID, description, message count, input/output tokens, cache usage, and estimated cost
- Totals: Overall token usage and cost estimate
Typical cost per task: $0.05-$0.15 per subagent depending on task complexity.
Guide for using Superpowers with OpenAI Codex via native skill discovery.
Windows (PowerShell) — Use a junction instead of a symlink:
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.agents\skills"
cmd /c mklink /J "$env:USERPROFILE\.agents\skills\superpowers" "$env:USERPROFILE\.codex\superpowers\skills"
Codex has native skill discovery — it scans ~/.agents/skills/ at startup, parses SKILL.md frontmatter, and loads skills on demand.
Skills are discovered automatically. Codex activates them when:
- You mention a skill by name (e.g., "use brainstorming")
- The task matches a skill's description
- The using-superpowers skill directs Codex to use one
Create your own skills:
mkdir -p ~/.agents/skills/my-skill
# Create ~/.agents/skills/my-skill/SKILL.md:
---
name: my-skill
description: Use when [condition] - [what it does]
---
# My Skill
[Your skill content here]
Update skills:
cd ~/.codex/superpowers && git pull
Skills update instantly through the symlink.
Uninstall:
rm ~/.agents/skills/superpowers
Troubleshooting:
- Verify the symlink:
ls -la ~/.agents/skills/superpowers - Check skills exist:
ls ~/.codex/superpowers/skills - Restart Codex — skills are discovered at startup
通过原生技能发现机制,在 OpenAI Codex 中使用 Superpowers 的指南。
Windows (PowerShell) — 使用目录联接点(Junction)代替符号链接:
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.agents\skills"
cmd /c mklink /J "$env:USERPROFILE\.agents\skills\superpowers" "$env:USERPROFILE\.codex\superpowers\skills"
Codex 有原生技能发现机制——启动时扫描 ~/.agents/skills/,解析 SKILL.md frontmatter,按需加载技能。
技能会被自动发现,Codex 在以下情况下激活它们:
- 你提到技能名称时(例如 "use brainstorming")
- 任务与技能描述匹配时
- using-superpowers 技能指示 Codex 使用某个技能时
创建你自己的技能:
mkdir -p ~/.agents/skills/my-skill
# 创建 ~/.agents/skills/my-skill/SKILL.md:
---
name: my-skill
description: Use when [condition] - [what it does]
---
# My Skill
[Your skill content here]
更新技能:
cd ~/.codex/superpowers && git pull
技能通过符号链接即时更新。
卸载:
rm ~/.agents/skills/superpowers
故障排除:
- 验证符号链接:
ls -la ~/.agents/skills/superpowers - 检查技能是否存在:
ls ~/.codex/superpowers/skills - 重启 Codex — 技能在启动时被扫描发现
Complete guide for using Superpowers with OpenCode.ai.
The plugin does two things:
- Injects bootstrap context via the
experimental.chat.system.transformhook, adding superpowers awareness to every conversation. - Registers the skills directory via the config hook, so OpenCode discovers all superpowers skills without symlinks or manual config.
Skills written for Claude Code are automatically adapted for OpenCode:
- TodoWrite → todowrite
- Task with subagents → OpenCode's @mention system
- Skill tool → OpenCode's native skill tool
- File operations → Native OpenCode tools
Troubleshooting:
- Check OpenCode logs:
opencode run --print-logs "hello" 2>&1 | grep -i superpowers - Verify the plugin line in your
opencode.jsonis correct - Make sure you're running a recent version of OpenCode
- Use OpenCode's skill tool to list available skills
- Check that the plugin is loading
- Each skill needs a SKILL.md file with valid YAML frontmatter
- Check OpenCode version supports
experimental.chat.system.transformhook - Restart OpenCode after config changes
在 OpenCode.ai 中使用 Superpowers 的完整指南。
该插件做两件事:
- 通过
experimental.chat.system.transformhook 注入引导上下文,为每次对话添加 Superpowers 感知。 - 通过配置 hook 注册技能目录,使 OpenCode 无需符号链接或手动配置即可发现所有 Superpowers 技能。
为 Claude Code 编写的技能会自动适配 OpenCode:
- TodoWrite → todowrite
- 带 Subagent 的 Task → OpenCode 的 @mention 系统
- Skill 工具 → OpenCode 原生技能工具
- 文件操作 → OpenCode 原生工具
故障排除:
- 检查 OpenCode 日志:
opencode run --print-logs "hello" 2>&1 | grep -i superpowers - 验证
opencode.json中的插件行配置正确 - 确保运行的是最新版本的 OpenCode
- 使用 OpenCode 的技能工具列出可用技能
- 检查插件是否正在加载
- 每个技能需要一个带有有效 YAML frontmatter 的 SKILL.md 文件
- 检查 OpenCode 版本是否支持
experimental.chat.system.transformhook - 配置更改后重启 OpenCode
Superpowers is built by Jesse Vincent and the folks at Prime Radiant.
- Discord: Join us for community support, questions, and sharing what you're building
- Issues: GitHub Issues
- Release announcements: Sign up to get notified about new versions
- Blog post: Superpowers for Claude Code
If Superpowers has helped you do stuff that makes money and you are so inclined, I'd greatly appreciate it if you'd consider sponsoring my open source work.
Superpowers 由 Jesse Vincent 和 Prime Radiant 团队构建。
- Discord: 加入我们 获取社区支持、提问和分享你用 Superpowers 构建的内容
- 问题反馈: GitHub Issues
- 版本发布通知: 订阅 以获取新版本通知
- 博客文章: Superpowers for Claude Code
如果 Superpowers 帮助你完成了能赚钱的事情,希望你能考虑赞助我的开源工作,我将不胜感激。
Skills live directly in this repository. To contribute:
- Fork the repository
- Create a branch for your skill
- Follow the writing-skills skill for creating and testing new skills
- Submit a PR
See skills/writing-skills/SKILL.md for the complete guide.
技能直接存在于本仓库中。贡献步骤:
- Fork 本仓库
- 为你的技能创建一个分支
- 遵循 writing-skills 技能中的指南来创建和测试新技能
- 提交 Pull Request
完整指南见 skills/writing-skills/SKILL.md。
Superpowers 中英对照翻译页面 · 翻译自 github.com/obra/superpowers
Generated by 小胡 🦊 · 返回首页