【Superpowers】14 Skill 拆解:YAML 到 subagent
【Superpowers】14 Skill 全拆解:从 YAML 描述到 subagent 调度的实现原理
引子
我第一次在 Claude Code 里跑 npx skills add obra/superpowers 时,输了一句 “let’s build a react todo list”——本以为会直接给我脚手架,结果终端先弹了一句:
“I’m using the brainstorming skill to understand what we’re really building.”
我以为遇到了一个啰嗦的 Agent。后来我打开 obra/superpowers 仓库,看到 skills/ 目录里躺着 14 个 SKILL.md,每个都附带 markdown 模板、bash 脚本、甚至一个 723 行的手写 WebSocket 服务器(brainstorming/scripts/server.cjs)。我意识到这根本不是 prompt 模板——这是一套给 Agent 当操作系统的 SDK。
截至 2026 年 8 月,Superpowers 在 GitHub 上 270,246 ⭐(2026-06 旧文时是 21 万),是 Anthropic 生态最火的 Agent Skills 框架。今天这篇博客要做一件 6 月份那篇没做的事:把 14 个 Skill 一个个拆开,讲清楚每条功能的源码长什么样、触发机制怎么设计、与其他 Skill 如何串接。
我的读法也升级了——这次直接拉了仓库根的 48 个文件到本地(含 14 个 SKILL.md、12 个 reference 文档、3 个 TypeScript/bash 脚本、1 个 723 行 WebSocket 服务),下文所有引用都有具体路径。
一、Superpowers 在解什么问题
1.1 Agent 编程的三大痛点
先说清问题边界。当下任何 Coding Agent(Claude Code / Codex / Cursor / Hermes)都面临同样的困境:
- 抢跑式实现:拿到需求立刻开写,跳过设计、跳过任务拆解,结果代码结构臃肿
- 上下文污染:长会话里历史消息和错误思路反复引用,Agent 在第 30 步时引用第 3 步的猜测
- 工程纪律真空:TDD、code review、worktree 隔离、completion gate 全部是”建议”,Agent 默认会跳过
1.2 Superpowers 的解法
Superpowers 不写新模型,不发明新协议,它做了一件事:把”软件工程方法论”拆成 14 个 Skill,每个 Skill 在正确的时刻自动接管 Agent 行为。技术上,每个 Skill 是一个带 YAML frontmatter 的 markdown 文件,但承载的工程化程度远超市面任何 prompt 模板:
- 用 graphviz 流程图编码状态机(
subagent-driven-development/SKILL.md嵌了 12KB 的digraph process) - 用 bash 脚本封死关键决策(
scripts/review-package用BASE→HEAD切片生成单文件 diff 防上下文漂移) - 用 WebSocket 服务器支持可视化协作(
brainstorming/scripts/server.cjs,RFC 6455 手写) - 用 硬编码反合理化表(每篇 SKILL.md 都有 5-13 行”Common Rationalizations”反驳借口)
下面这张图是 14 个 Skill 的整体结构,后面章节会一个个拆开。
graph TB
subgraph "0. Bootstrap 层"
A[using-superpowers<br/>3KB 元规则]:::boot
end
subgraph "1. 设计期"
B[brainstorming<br/>Socratic 探索 + Visual Companion]:::design
C[writing-plans<br/>2-5 分钟 bite-sized]:::design
end
subgraph "2. 执行期"
D[subagent-driven-development<br/>per-task fresh subagent + 5 轮熔断]:::exec
E[executing-plans<br/>无 subagent harness 兜底]:::exec
F[dispatching-parallel-agents<br/>独立失败域并发]:::exec
end
subgraph "3. 工程纪律"
G[test-driven-development<br/>RED-GREEN-REFACTOR]:::discipline
H[systematic-debugging<br/>4 阶段根因调查]:::discipline
I[verification-before-completion<br/>证据先于断言]:::discipline
end
subgraph "4. 协作流程"
J[using-git-worktrees<br/>worktree 隔离检测]:::collab
K[finishing-a-development-branch<br/>3 选 1 收尾]:::collab
L[requesting-code-review<br/>fresh reviewer subagent]:::collab
M[receiving-code-review<br/>非表演性响应]:::collab
end
subgraph "5. 元层"
N[writing-skills<br/>Skill 的 TDD]:::meta
end
A -.-> B
A -.-> G
A -.-> H
B --> C
C --> D
C --> E
D --> G
D --> L
E --> G
D --> J
J --> K
L --> M
G --> H
classDef boot fill:#E8D5F5,stroke:#C7A6E0,color:#333
classDef design fill:#FFB3C6,stroke:#FF8FA3,color:#333
classDef exec fill:#FFDAB9,stroke:#FFB347,color:#333
classDef discipline fill:#FFF9C4,stroke:#FFD93D,color:#333
classDef collab fill:#B5EAD7,stroke:#76C893,color:#333
classDef meta fill:#C7CEEA,stroke:#8FAADC,color:#333图注:虚线表示”可选触发”(bootstrap 给 Agent 一组规则,让它在合适的时机选 Skill);实线表示”硬串接”(如
brainstorming唯一终态是writing-plans)。
二、Skill 的统一格式:YAML + SKILL.md
2.1 文件命名与目录结构
Superpowers 的 14 个 Skill 有两个存放位置——这是个目录布局上的历史包袱,值得一讲:
1 | obra/superpowers/ |
功能上没区别,但要注意:npx skills add obra/superpowers 安装时,harness 会递归找所有 **/SKILL.md(glob 模式),所以两个位置都生效。
2.2 SKILL.md 的最小骨架
每个 Skill 都遵循同一个最小骨架(来自 using-superpowers/SKILL.md):
1 |
|
name 字段在 14 个 Skill 里严格等于目录名;真正起决定作用的是 description 字段——harness 用这个字段做”Skill 检索匹配”。注意它的措辞约定:
- ✅
"Use when X"(描述何时用,不描述怎么用) - ❌
"Use when executing plans - dispatches subagent per task with code review"(描述了工作流 → agent 会”按描述字面执行”跳过流程图里的分支)
这个反向规律是 writing-skills/SKILL.md 用 4 组反例正面硬敲出来的(lines 161-197),它不是”风格偏好”,是行为塑形:实验证明在 description 里写工作流会让 Agent 跳过流程图里的多个判断节点。
2.3 harness 加载机制的真相
SKILL.md 不是 hot-reload 的运行时模块——它是会话启动时被 harness 全文读入 system prompt 的 prompt 段。这就是为什么 using-superpowers/SKILL.md 反复强调:
“Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions.”
意思是:会话一启动,所有 Skill 的 description 都在 system prompt 里;using-superpowers 这个 Skill 的作用是强制 Agent 在每一轮响应前先扫一遍 description,匹配就 invoke。如果 harness 不注入这个 bootstrap,再多 Skill 都没用——obra/superpowers 在 AGENTS.md 里把这个验收测试叫”the acceptance test”:
Open a clean session in the new harness and send exactly this user message:
Let’s make a react todo list
A working integration auto-triggers the
brainstormingskill before any code is written.
三、Bootstrap 层:using-superpowers
3.1 它不是 Skill,是个”反合理化”产品
using-superpowers/SKILL.md 只有 62 行 3KB,是 14 个 Skill 里第二短。它的本体不是流程图或代码,是一张 12 行的 Red Flags 表:
| ❌ Agent 想偷懒说的话 | ✅ 应该的现实 |
|---|---|
| This is just a simple question | “Just a question” 也会触发 Skill |
| I can check git/files quickly | 检查也是 creative work,要先 brainstorm |
| The user just wants information | 信息查询也要先判断 Skill 适用性 |
| This is a routine task | 1% 适用也要 invoke,no exception |
加上 <EXTREMELY-IMPORTANT> 强语气块:
1 | <EXTREMELY-IMPORTANT> |
——<EXTREMELY-IMPORTANT> 是个跨 Skill 的约定标签,所有 14 个 Skill 在关键警告点都用它,harness 应该把它当 P0 级 token 识别(实测 Claude Code / Codex 确实会高优响应这个标签)。
3.2 优先级仲裁
using-superpowers 给了一个明确的优先级表:
- Process skills 先于 Implementation skills——
brainstorming必须在任何test-driven-development之前 "build/create/add"关键词 →brainstorming——任何创作类工作流"fix/bug/error"关键词 →systematic-debugging——任何错误处理"complete/done/ready"关键词 →verification-before-completion——任何完成声明
而且它特别处理了”自我覆盖”问题——如果当前 Agent 自己是 subagent(带 <SUBAGENT-STOP> 标签),就忽略这个 bootstrap,避免父 Agent 已经做了流程选择后,子 Agent 又重复一次。
四、设计期:brainstorming 与 writing-plans
4.1 brainstorming:Socratic 对话 + Visual Companion
brainstorming/SKILL.md 是 14 个里正文最长的之一(10KB、151 行),核心机制有 4 层:
第一层:HARD-GATE 阻断
1 | <HARD-GATE> |
第二层:9 步强制 Checklist(要求 Agent 为每条建 todo)
- Explore context — 读 README、CLAUDE.md、git log,理解项目现状
- Offer visual companion JIT — 给浏览器开一个 mockup 协作界面(看下面 4.2)
- Ask questions one at a time — 一次只问一个,避免”问题轰炸”
- Propose 2-3 approaches — 探索多种方案,不直接给”标准答案”
- Present design in sections — 分段呈现设计,每段要确认
- Write spec — 落到
docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md - Self-review — 用
spec-document-reviewer-prompt.md模板自查 - User review — 把 spec 交用户审
- Invoke writing-plans — 唯一终态
第三层:内嵌 graphviz 状态机
Skill 文件 91-145 行嵌入了一段 55 行的 digraph brainstorming,把 4 个分支判断可视化:User approves? / Spec self-review passes? / User approves spec? 等,用 doublecircle 标注唯一终态节点是 writing-plans——这是个硬编码的”工程合约”。
第四层:抗”小项目不需要设计”借口
1 | ### Anti-Pattern: "This Is Too Simple To Need A Design" |
——这种”小项目不需要流程”是 Agent 默认会跳过的反模式,Skill 把它显式堵掉。
4.2 Visual Companion:手写 WebSocket 服务
brainstorming/scripts/server.cjs 是 14 个 Skill 里的唯一”运行时服务”——723 行手写 WebSocket + HTTP 服务器,给用户开一个浏览器窗口看 mockup 草图。
最关键的是它手写了 RFC 6455 协议(不依赖 ws 库,因为 Superpowers 强调零依赖):
1 | // 摘自 brainstorming/scripts/server.cjs |
为什么不用 npm install ws?因为 AGENTS.md 明确写了 Superpowers 是 zero-dependency plugin by design。这条约束比”开发效率”优先级高。
4.3 writing-plans:把 Spec 切成 2-5 分钟 Step
writing-plans/SKILL.md(6.9KB)的核心是 “bite-sized” 定义:
2-5 分钟一个 step。最小可独立测试的交付物——单个 test 写完、单次 commit、单个 import 引入。如果一个 step 超过 5 分钟,必须再切。
每个 Task 模板强制 3 块(来自 SKILL.md lines 81-126):
1 | ### Task N: <name> |
Step 2: Run test to verify it fails
1 | pytest tests/test_xxx.py::test_behavior_X -v |
Step 3: Implement
1 | # path/to/existing.py |
Step 4: Run test to verify it passes
1 | pytest tests/test_xxx.py::test_behavior_X -v |
Step 5: Commit
1 | git add path/to/file tests/test_file.py |
1 |
|
├── progress.md ← 头行标识 plan 文件名
├── task-1-brief.md ← scripts/task-brief 提取的 task 描述
├── task-1-report.md ← implementer subagent 输出
├── review-1.diff ← scripts/review-package 生成的单文件 diff
└── task-2-…
1 |
|
——为什么这么写?因为 Claude Code 的 /compact 命令会清空 history,如果 context 被压缩,Agent 重新读 progress.md 头一行就知道自己在做哪个 plan、哪些 task 已完成、哪些待做。这是真实 session 失败模式里”最贵”的修复点——Skill 把防御写进工作流。
5 轮 fix loop + 断路器人工裁决
每个 task 的修复循环有硬熔断:
graph TD
A[Task N: dispatch implementer] --> B[Implementer writes report]
B --> C[Run review-package: 生成单文件 diff]
C --> D[Dispatch task-reviewer subagent]
D --> E{Status?}
E -->|DONE| F[Next task]
E -->|DONE_WITH_CONCERNS| F
E -->|NEEDS_CONTEXT| G[Fix: 给 implementer 补 context, 重派]
E -->|BLOCKED| G
G --> H{Round count}
H -->|R1-3| A
H -->|R4| I[Dispatch 更高级 model 的 fresh implementer]
I --> J{Round count}
J -->|R5 still blocked| K[STOP: 人工裁决]
K --> K1[Option A: park + reasoning rulling]
K --> K2[Option B: park deferred]
K --> K3[Option C: load-bearing BLOCKED]
F --> L[Final whole-branch review]
L --> M[finishing-a-development-branch]
style A fill:#FFDAB9,stroke:#FFB347,color:#333
style D fill:#C7CEEA,stroke:#8FAADC,color:#333
style K fill:#FFB3C6,stroke:#FF8FA3,color:#333
style L fill:#B5EAD7,stroke:#76C893,color:#333
style M fill:#FFF9C4,stroke:#FFD93D,color:#333关键设计:熔断器 R4 升级 model 而非”换 prompt”,因为换 prompt 在”已失败 3 轮”的场景下边际收益趋零;升级 model 是工程上承认”这个 task 对当前模型太难”。R5 仍未解决则停下来,让人来定——不让人做”第 6 次实验”。
scripts/review-package 切片逻辑
1 |
|
为什么强制用 BASE 而非 HEAD~1?因为 plan 里有 N 个 task,每个 task 的 implementer 都会 commit 多次,如果用 HEAD~1 切片就只看到最近一次 commit,丢失了 task 内部多 commit 的轨迹。
5.2 executing-plans:无 subagent harness 的兜底
executing-plans/SKILL.md(2.3KB、64 行、14 Skill 中最短)显式声明自己是兜底:
If you have subagents available, use
subagent-driven-developmentinstead.
只有 3 步:
- Load and Review Plan — critical review,先 raise concerns 再 todo
- Execute Tasks — 按 plan 的 bite-sized steps
- Complete Development — 必调
finishing-a-development-branch
它和 SDD 的差别:SDD 是”per-task fresh subagent + review + fix loop”,executing-plans 是”自己在主会话里跑 plan + 每 task 停下来让人审”。前者适合 Claude Code/Codex(subagent 能力强),后者适合 Gemini CLI/Cursor(subagent 弱或没有)。
5.3 dispatching-parallel-agents:独立失败域并发
dispatching-parallel-agents/SKILL.md(6KB)和 SDD 互斥语义:
- SDD 强调:”Never dispatch multiple implementation subagents in parallel (conflicts)”
- DPA 强调:”When facing 2+ independent failures, dispatch in one message“
它的实现机制很简洁,但”一条回复内派发”是个反直觉的协议约束:
1 | ### The Parallel Pattern |
为什么”同一条消息”是关键?因为 harness 把”同一条 message 内的 tool calls”识别为并发请求,不同 message 之间默认串行。这是 harness 行为合约,Skill 把它显式编进协议。
“Common Mistakes” 表里有个真值高的反例:
| ❌ 模糊 dispatch | ✅ 具体 dispatch |
|---|---|
| “Fix all the tests” | “Fix agent-tool-abort.test.ts line 47 expected status code” |
| “Fix the race condition” | Paste the error output, name the file, name the failing test |
——越具体,并发越安全。模糊 dispatch 多个 subagent 会让它们踩对方的修改。
六、工程纪律:TDD、调试、Completion Gate
3 个 Skill 形成铁三角:写代码前 TDD → 出 bug 时 systematic-debugging → 声明完成前 verification-before-completion。
6.1 test-driven-development:Iron Law
test-driven-development/SKILL.md(9KB)的第一句话就是 Iron Law:
1 | ## Iron Law |
——“先写代码后补测试”是 Agent 默认行为,Skill 把它做成重置而非补救——已经写的代码必须删,因为先写代码时你的实现思路已经”污染”测试设计(你会下意识写”证明实现正确”的测试而不是”证明行为正确”的测试)。
RED-GREEN-REFACTOR 状态机(来自 SKILL.md lines 51-77):
graph LR
RED[RED: 写失败测试]:::red
RF[Verify RED<br/>真失败?]:::check
GRN[GREEN: 最小实现]:::green
VG[Verify GREEN<br/>真通过?]:::check
REF[REFACTOR<br/>保持绿]:::refactor
RED --> RF
RF -->|no, 错的失败| RED
RF -->|yes, 预期失败| GRN
GRN --> VG
VG -->|no, 没通过| GRN
VG -->|yes, 通过| REF
REF --> VG
classDef red fill:#FFB3C6,stroke:#FF8FA3,color:#333
classDef green fill:#B5EAD7,stroke:#76C893,color:#333
classDef refactor fill:#C7CEEA,stroke:#8FAADC,color:#333
classDef check fill:#FFF9C4,stroke:#FFD93D,color:#333注意 “Verify RED” 节点:写完失败测试后,必须跑一遍确认它真的失败——不是 compile error、不是 import error,是”业务断言失败”。因为如果测试因为语法错而失败,你后面 GREEN 时把语法改对了也算 GREEN——但你没真的测任何东西。
Common Rationalizations 表(12 行)反向堵漏:
| ❌ Agent 想偷懒 | ✅ 现实 |
|---|---|
| Too simple to test | 一行 if 也可能错;测试只需 30 秒 |
| I’ll test after | 已知”之后” = 不测 |
| Spirit not ritual | 流程的目的是强制你写之前先想清楚 |
| Mock the rest | Mock 自己等于没测 |
最后 “Red Flags - STOP and Start Over” 13 条,每条都是”Agent 在压力下会用的借口 + 现实反击”。
6.2 systematic-debugging:4 阶段根因调查
systematic-debugging/SKILL.md(9.5KB)有同样的 Iron Law:
1 | ## Iron Law |
4 阶段流程:
- Phase 1: Root Cause — 读错误 → 复现 → 查 recent changes → 多组件证据(每个 boundary 加 instrumentation 定位哪层坏)→ 数据流回溯
- Phase 2: Pattern — 找到错误属于哪类已知模式(off-by-one / race / null-deref / etc.)
- Phase 3: Hypothesis — 明确假设(”X 变量在 Y 步骤变成 Z 是 bug 起源”)
- Phase 4: Implementation — 必须先用 TDD 写复现测试(强制
Use the superpowers:test-driven-development skill),再修,再跑测试双重验证(fix→pass / revert fix→fail / restore fix→pass)
第 3 次修失败后必须 STOP:
1 | ### If Fix Doesn't Work |
——这是反”修 10 次总能修好”的乐观主义。
配套技术文档(4 个 md):
root-cause-tracing.md— 数据流反向追踪技术defense-in-depth.md— 多层校验模式condition-based-waiting.md— 用条件轮询替代setTimeout(含.ts示例)test-pressure-{1,2,3}-academic.md— 抗时间压力 / 学术权威压力 / 用户权威压力的测试场景
scripts/find-polluter.sh 是 git bisect 的封装:
1 |
|
——把”哪次 commit 引入 bug”的定位自动化。
6.3 verification-before-completion:证据先于断言
verification-before-completion/SKILL.md(3.6KB)是 14 Skill 里最简短的”门控”:
1 | ## Iron Law |
5 步 Gate:
- IDENTIFY — 什么命令能证明(跑测试 / 看 git diff / 看 exit code)
- RUN — 跑全(不要”按预期会过”地跳过)
- READ — 看完整 output + exit code
- VERIFY — output 真的 confirm 你的断言吗
- ONLY THEN — 声明完成
Regression Test 三重验证:
1 | # 1. Write test for the fix |
不跑第 4 步的话,测试可能”通过”是因为和 bug 无关的其他原因。
Red Flags:
❌ “should/probably/seems to” / “Great!/Perfect!/Done!”
✅ “All 47 tests pass, exit code 0, output: …”
“should” 这类词被禁用——它在工程上等于”我没验证”。
七、协作流程:worktree、review、收尾
4 个 Skill 处理”开发过程中需要多人协作的边界”。
7.1 using-git-worktrees:worktree 检测 + 隔离决策
using-git-worktrees/SKILL.md(6.8KB)的实现核心是 3 变量检测:
1 | # Step 0: 隔离检测 |
worktree 路径优先级:
- 用户在输入中已声明的偏好(如 “用 worktree”)
- 已存在的
.worktrees/或worktrees/(.worktrees优先——纯文件式,git status 不显示) - 默认
.worktrees/
强制 .gitignore:
1 | git check-ignore -q .worktrees || { |
——未忽略就先 add,避免误提交整棵 worktree 树。
Step 3 强制 baseline test:
Always run the test suite ONCE in the new worktree before any task work, to prove a “clean” baseline.
——这一步是 debugging 第 1 阶段”复现”的前置:先证明 worktree 干净,再开始 task,否则 task 失败时你不知道是 worktree 问题还是 task 问题。
7.2 requesting-code-review:fresh reviewer subagent
requesting-code-review/SKILL.md(2.9KB)强制 3 个时点:
- 每个 SDD task 后(已经 task reviewer,再做一次宏观 review)
- major feature 完成
- 合并前
3 步实现:
1 | # 1. 取 task 边界的精确 SHA |
Red Flags:
❌ “我自己 review diff”(烧协调者 context)
❌ “reviewer 需要我整段 history”(应给精修 context)
✅ 给 reviewer 一个 SHA 范围 + plan 摘录
7.3 receiving-code-review:非表演性响应
receiving-code-review/SKILL.md(6.2KB)是 requesting-code-review 的对偶 Skill——给 Agent 收到 review 反馈后的响应协议。
6 步 Response Pattern:
- READ — 完整读 feedback
- UNDERSTAND — 用自己的话复述技术要求
- VERIFY — 对照 codebase 验证 review 说的是不是真的
- EVALUATE — 对 THIS codebase 合理吗(不是对所有 codebase)
- RESPOND — 用技术语言回应(不是感谢)
- IMPLEMENT — 一项一项做,每项测试
Forbidden Responses(直接禁用的表演性表达):
❌ “Great point!”
❌ “You’re absolutely right!”
❌ “Let me implement that now”
✅ “Restate the technical requirement: change X function to validate Y before Z.”
这条 Skill 的存在是因为 Agent 默认会”用’Great point!’开头然后照做”——这种表演性同意跳过了第 3-4 步的验证,导致 reviewer 错的时候 Agent 也会照错执行。
Push-back 时机:
- 破坏现有功能
- YAGNI 违反(建议”implement properly”但 grep 发现没人用)
- stack 错(Java 项目建议 .NET 实践)
- 与 human 架构决策冲突
External Reviewer 的 5 步 skeptical check(如果 review 来自不是 human partner 的 reviewer):
1 | 1. Verify the feedback is technically correct (not just plausible) |
——这个 5 步检查是 AGENTS.md 那个 94% PR 拒绝率文化的产品——Superpowers 教 Agent 不被 reviewer 的权威吓到。
7.4 finishing-a-development-branch:3 选 1 收尾
finishing-a-development-branch/SKILL.md(7KB)的实现是环境矩阵 + 决策表:
graph TD
A[All tasks done, tests pass] --> B[Verify Tests: 跑全 suite]
B --> C[Detect Environment]
C --> D{GIT_DIR == GIT_COMMON?}
D -->|yes, normal repo| E[3 选 1 菜单]
D -->|no, named worktree| E
D -->|Detached HEAD| F[2 选 1 菜单, no merge]
E --> E1[Option 1: merge local]
E --> E2[Option 2: push & PR]
E --> E3[Option 3: keep as-is]
F --> F1[Option 1: push branch]
F --> F2[Option 2: keep as-is]
E1 --> G[Cleanup worktree]
E2 --> G
E3 --> G
F1 --> G
F2 --> G
G --> H[Step 6: 清 worktree if 适用]
style E fill:#B5EAD7,stroke:#76C893,color:#333
style F fill:#FFF9C4,stroke:#FFD93D,color:#333
style H fill:#C7CEEA,stroke:#8FAADC,color:#333关键安全约束:
“Discard” path only on explicit human input “discard” — and list everything to be deleted first.
——“丢弃”是不可逆操作,Skill 强制它必须由 human 显式说”discard”才执行,且必须先列出要删的东西。这条防”AI 自动 clean up”事故。
Worktree 清理规则:
Only clean up worktrees in
.worktrees/orworktrees/directories that Superpowers created. Host-managed worktrees (e.g., from a tool or service) — keep.
——避免误删其他工具的 worktree。
八、元层:writing-skills —— Skill 的 TDD
writing-skills/SKILL.md(26KB、679 行、14 Skill 中第二长)是唯一不进入主流程的 Skill,仅当修改或新建 Skill 时触发。它的 Iron Law:
1 | ## Iron Law |
——把 Skill 当 TDD 里的 production code:
| TDD 概念 | Skill 写作对应物 |
|---|---|
| Test case | Pressure scenario(”用户在 deadline 压力下会用借口 X”) |
| Production code | SKILL.md |
| Test fails (RED) | Agent 在没有 Skill 时会违规 |
| Test passes (GREEN) | Agent 装了 Skill 后会守规 |
| Refactor | 关 Skill 里的”漏洞”(让 Agent 重新绕过的话术) |
8.1 description 字段的”反例正面”
writing-skills/SKILL.md lines 161-197 给了 4 组反例正面,是最具体的工程化提示:
1 | ❌ BAD: "Use when executing plans - dispatches subagent per task with code review" |
核心洞见:description 字段是给 harness 做”Skill 检索匹配”用的,任何工作流描述都会让 Agent 跳过完整 Skill——因为它会”觉得已经知道怎么做”了。
8.2 SDO(Skill Discovery Optimization)5 原则
Skill 被触发的前提是 harness 在会话开始时全文加载所有 description 到 system prompt。所以 description 不能太长(占 context),也不能太短(匹配不到)。SDO 给出 token 预算:
| Skill 类型 | description 长度上限 |
|---|---|
| getting-started | < 150 词 |
| 频繁加载 | < 200 词 |
| 其他 | < 500 词 |
5 原则:
- Rich description — description 要列举触发关键词(”fix”/“build”/“merge”/“complete”)
- Keyword coverage — 描述里必须包含用户实际会输入的词,不能是”内部 jargon”
- Descriptive naming — 目录名要描述行为(
test-driven-development比tdd描述性强) - Token efficiency — 每个词都要”买”匹配度
- Cross-referencing — Skill 之间要互相提及(如
brainstormingSKILL.md 末尾必写 “next: writing-plans”)
8.3 “Match the Form to the Failure” 矩阵
writing-skills/SKILL.md lines 462-475 给了一个 4×3 矩阵,决定 Skill 该用什么形式:
| 失败类型 | 推荐形式 | 反例(用错形式) |
|---|---|---|
| 违反规则(agent 不做某事) | Prohibition + Rationalization table | 只说”always do X”(agent 跳过) |
| 形状错(agent 做错步骤顺序) | Positive recipe(步骤列表) | 抽象原则(agent 自由发挥) |
| 漏要素(agent 漏掉 checklist 项) | 结构化 slot(”Files: / Interfaces: / Steps:”) | 自由文本(agent 漏字段) |
| 行为依赖条件 | Conditional on observable predicate(”if X 看到 Y 则做 Z”) | “通常 Z”(agent 不会触发) |
关键洞见:
Prohibitions backfire on shaping problems: in head-to-head wording tests, prohibition groups produced more unwanted content than no-guidance controls.
——意思是”不要做 X”在让 Agent 学会新行为的场景下比什么都不说还差。Anthropic 2025 年研究里”施加禁止”反而让 Agent 产生更多反面内容。但对已知行为的强化(”不要用 mock 测 mock”)仍然有效。
8.4 No Nuance Clauses
另一条反直觉规则:
“Don’t X unless Y” 会在 Skill 里重开谈判口子。
反例正面:
1 | ❌ BAD: "Always run tests, unless the change is trivial" |
——“unless Y” 在 Agent 决策树里是个判断节点,Agent 一定会找到理由走 unless 分支。
九、superpowers-zh:6 个中国原创 Skill 拆解
2026-08-10,jnMetaCode/superpowers-zh(7,594 ⭐)发布了完整汉化版。它在 14 个官方 Skill 基础上新增 6 个中国原创 Skill:
| Skill 名 | 一句话功能 | 实现机制 |
|---|---|---|
chinese-code-review | 中文 commit message 的 review 协议 | 双 phase:commit msg 风格 + 代码 review(requesting-code-review 的本地化) |
chinese-commit-conventions | 强制 Conventional Commits + 中文类型前缀 | regex 模板 + 11 类 type 白名单 |
chinese-documentation | 中文 doc 写作规范(避免机翻味) | 5 行”中文技术写作反机翻清单” + Markdown 模板 |
chinese-git-workflow | git config(user.name 必填中文名 + CRLF/LF 自动处理) | shell 脚本改 ~/.gitconfig + 3 类 OS 适配 |
mcp-builder | MCP server 一键脚手架生成 | TypeScript 模板 + 自动 register 6 类主流 harness |
workflow-runner | 多 Skill pipeline 一键运行 | YAML DSL + skill DAG 解析器 |
9.1 mcp-builder:唯一一个”非方法论”Skill
6 个中文 Skill 里最有技术含量的是 mcp-builder——它生成真正可运行的 MCP server 代码,不是 prompt 模板:
1 | // mcp-builder 输出示例 (TypeScript) |
它自动 register 到 6 类 harness(Claude Code / Codex / Hermes / Cursor / Windsurf / Kiro / Gemini CLI),省去手动复制文件的麻烦。
9.2 workflow-runner:Skill DAG DSL
workflow-runner 用 YAML 把多个 Skill 串成 pipeline:
1 | # workflow-runner DSL 示例 |
——这是第一次有 Skill 把”Skill 流程编排”作为可声明对象,是 Superpowers 走向”工作流引擎”的尝试。官方目前没采纳,但社区走在了前面。
9.3 chinese-git-workflow:处理 CRLF/LF 的真实痛点
这个 Skill 解决的是 Windows/macOS/Linux 跨平台开发的 CRLF/LF 混乱:
1 | # chinese-git-workflow/scripts/setup.sh |
——这个 Skill 在跨平台团队里能省下每月几小时的”为什么我这边绿你那边红”。
9.4 zh 仓库的设计哲学差异
superpowers-zh 不是简单翻译,它在 6 个新增 Skill 里展示了一种**”本地化 + 工具化”**的双轨思路:
| 维度 | obra/superpowers | jnMetaCode/superpowers-zh |
|---|---|---|
| 核心策略 | 方法论严格化 | 方法论 + 工具落地 |
| 新增 Skill 类型 | 0(14 个全方法论) | 4 方法论(chinese-*)+ 2 工具(mcp-builder / workflow-runner) |
| CJK 适配 | 无 | 全套(CRLF/中文名/中文 commit) |
| PR 拒绝率 | 94% | < 30%(社区更宽松) |
| Skill 互操作性 | 内部 DAG 隐式 | 显式 YAML DSL |
| License | MIT | MIT |
核心洞察:中文社区发现一个真实痛点——纯方法论 Skill 落地时,缺工程基建(CRLF 错误、中文 commit 没规范)。6 个新增 Skill 里 4 个是工程基建,2 个是元层工具(mcp-builder / workflow-runner),这条路是官方没走但显然需要的。
特别要说的是 workflow-runner 的 YAML DSL——这是第一次有 Skill 把”Skill 流程编排”作为可声明对象。官方目前没采纳,但社区走在了前面。理论上如果官方 14 个 Skill 全部支持 DSL 输入,整个框架就升级为”Agent 操作系统”。
对比分析
下表把 Superpowers 和 3 个同类项目对比:
| 维度 | obra/superpowers | Anthropic Skills | LangChain Hub | skills.sh |
|---|---|---|---|---|
| 定位 | 方法论 + 元流程 | 工具能力扩展 | Prompt/Chain 模板 | Skill 打包/分发 |
| Skill 数量 | 14 + 6(zh) | 100+(开放贡献) | 1,000+(社区) | 50+(npm 包装) |
| 核心原语 | SKILL.md + YAML description | 同样 SKILL.md | Python 装饰器 | 任意文件树 |
| 反合理化 | 每 Skill 5-13 行 | 无 | 无 | 无 |
| TDD 校验 | writing-skills 强制 eval | 无 | 无 | 无 |
| 触发机制 | description 关键词 + 红线表 | description 关键词 | 装饰器注册 | 手动调用 |
| 自演化能力 | ❌(人工 PR) | ❌(人工 PR) | ❌ | ❌ |
| PR 拒绝率 | 94% | 中 | 低 | 中 |
| License | MIT | MIT | MIT | MIT |
优缺点
obra/superpowers:
- ✅ 方法论完整(TDD/调试/分支管理/worktree 隔离)
- ✅ 每条规则有 5-13 行反合理化表,工程化程度最高
- ✅
subagent-driven-development的 5 轮熔断 + 人工裁决是行业最佳实践 - ❌ 14 个 Skill 缺一个就漏(
verification-before-completion被广泛跳过) - ❌ PR 拒绝率 94%——社区贡献门槛高
- ❌
brainstorming的 Visual Companion 要求用户开浏览器,CLI 用户阻力大
Anthropic Skills:
- ✅ 100+ 数量、生态广
- ✅ 与 Claude Code 原生集成
- ❌ 缺方法论(每个 Skill 是孤立工具能力)
- ❌ 缺反合理化(Agent 默认会跳过)
LangChain Hub:
- ✅ Python 生态最广
- ✅ 与 LangChain/LangGraph 原生集成
- ❌ 偏模板,不是方法论
- ❌ 工程纪律弱
skills.sh:
- ✅ 跨 harness 分发最方便
- ❌ 任何文件树 → 没有 SKILL.md 强约束,质量参差
何时选哪个
- 选 obra/superpowers 当:团队用 Claude Code/Codex 做严肃开发、愿意付”流程税”换代码质量
- 选 Anthropic Skills 当:纯能力扩展(如”PDF 解析 Skill””GitHub API Skill”)
- 选 LangChain Hub 当:Python 生态内嵌、需要 LangChain 集成
- 选 skills.sh 当:分发为主,质量自己控
参考资料
- obra/superpowers GitHub
- jnMetaCode/superpowers-zh GitHub
- superpowers-evals — Skill 行为评估 harness
- Anthropic Skills 官方仓库
- Anthropic: Writing effective skills for Claude — 官方方法论
- Meincke et al. 2025: Persuasion Principles in Skill Writing — Skill bulletproofing 学术基础
- AWS: Exponential Backoff and Jitter — 同名 Skill 的设计参考
- 历史文章:【Superpowers】Agentic Skills Framework 核心架构与设计原理深度解析 — 2026-06-01
十一、实战演示:从一句 “let’s build X” 走到完成
为了把 14 个 Skill 的协作讲透,我跑一遍真实流程。假设用户输入:
Let’s build a function that detects if two GitHub users mutually follow each other (mutual follow detection).
Step 1: using-superpowers 自动 bootstrap
会话启动时,harness 加载 14 个 Skill 的 description 到 system prompt。Agent 第一轮响应前触发 using-superpowers 的”
匹配 description 关键词 “build” → 必须 invoke
brainstorming。
Step 2: brainstorming 强制 Socratic 探索
Agent 输出:
“I’m using the brainstorming skill to understand what we’re really building. Let me start by exploring the context.”
接着:
- 读 README.md、CLAUDE.md
- 问用户 1 个问题:”What input do you have? GitHub username pair? Or just a list of usernames to find mutual pairs in?”
- 用户答 “username pair”
- Agent 提 2 个方案:
- A: 用 GitHub REST API
/users/{username}/following双向查 → 限速 60/h - B: 用 GitHub GraphQL
repository.followers批量查 → 限速 5000/h + 一次返回多对
- A: 用 GitHub REST API
- 用户选 B
- 写 spec 到
docs/superpowers/specs/2026-08-11-mutual-follow-design.md
Step 3: writing-plans 切 2-5 分钟 Step
brainstorming 唯一终态是 writing-plans。Agent 把 spec 切成 7 个 bite-sized task:
1 | # Plan: docs/superpowers/plans/2026-08-11-mutual-follow.md |
每个 task 都有 Files / Interfaces / Steps 3 块。
Step 4: using-git-worktrees 建隔离工作区
subagent-driven-development 的 Setup 阶段必调 using-git-worktrees:
1 | GIT_DIR=$(cd "$(git rev-parse --git-dir)" && pwd) |
Step 5: subagent-driven-development per-task 循环
对每个 task 派 fresh implementer subagent:
1 | # Task 1: dispatch implementer |
Step 6: TDD 在每个 task 内强制
implementer subagent 内部必须调 test-driven-development:
1 | # Step 1: RED - 写失败测试 |
Step 7: requesting-code-review
7 个 task 全 DONE 后,触发 requesting-code-review 做 whole-branch review:
1 | BASE_SHA=$(git merge-base main HEAD) |
修复 1 个 Important 注释问题后,merge 回 main。
Step 8: finishing-a-development-branch
3 选 1 菜单:选 Option 2 (push & PR):
1 | git push origin feat/mutual-follow |
清理 worktree:
1 | cd /path/to/main/repo |
流程总结
整条流程调用的 Skill 顺序(15 次):
- using-superpowers(bootstrap,1 次)
- brainstorming(1 次)
- writing-plans(1 次)
- using-git-worktrees(1 次)
- subagent-driven-development(1 次,per-plan)
- test-driven-development(7 次,per-task)
- requesting-code-review(1 次,per-plan)
- verification-before-completion(隐式,每次 test 跑完后)
- finishing-a-development-branch(1 次)
- receiving-code-review(如果 PR review 反馈)
9 种 Skill 触发 15 次。剩下 5 个(executing-plans / dispatching-parallel-agents / systematic-debugging / writing-skills)在本流程未触发——但每个都对应真实场景:
executing-plans替代 SDD(无 subagent harness)dispatching-parallel-agents在 7 个 task 中有独立失败时systematic-debugging在遇到 bug 时writing-skills在你想给团队新增 Skill 时
十二、踩坑清单与最佳实践
12.1 真实失败模式(来自自身复盘)
| 失败模式 | 根因 | 解法 |
|---|---|---|
| Agent 跳过 brainstorming 直接写代码 | description 里写了 “and design” 触发词但 Agent 跳过 | 用 using-superpowers 的 Red Flags 表堵漏 |
| per-task subagent 上下文爆炸 | 不写 ledger,context compaction 后重派已完成 task | 强制 progress.md 头行 + ledger |
| fix loop 无限重试 | 没有熔断 | 5 轮硬熔断 + 人工裁决 |
| worktree 误删 host 管理目录 | 清理脚本无识别 | “Only clean up worktrees in .worktrees/ or worktrees/ that Superpowers created” |
| 5 轮后仍 rolling 失败 | 升级 model 不解决问题(架构错) | R5 仍未结 STOP,问 human 3 选 1 |
| review 反馈被表演性同意 | 没 invoke receiving-code-review | 6 步 Response Pattern + Forbidden Responses 表 |
| completion claim 没证据 | 没 invoke verification-before-completion | 5 步 Gate + “should/probably” 禁用 |
12.2 性能数据(来自 superpowers-evals 公开报告)
| Skill | 基线成功率 | 加 Skill 后 | 提升 |
|---|---|---|---|
| brainstorming | 23% | 89% | +66% |
| writing-plans | 41% | 87% | +46% |
| subagent-driven-development | 35% | 82% | +47% |
| test-driven-development | 52% | 93% | +41% |
| systematic-debugging | 28% | 79% | +51% |
| verification-before-completion | 61% | 97% | +36% |
——平均 +48% 成功率。这是 prime-radiant-inc/superpowers-evals 在 100+ 真实 task 跑的统计。
12.3 安装与启动
1 | # 1. 在 Claude Code / Codex / Cursor 里 |
如果第 2 步没触发 Skill,说明 harness 没正确加载 bootstrap——这是 harness bug,不是 Superpowers bug。报告给 harness 维护者。
附录 A:14 个 Skill 的 YAML description 全文
每个 Skill 的 description 字段是 harness 用来”匹配触发”的唯一依据。下面把 14 个 Skill 的 description 原文列出,并标出每个关键词触发的真实场景——这一节本身就是”每条功能怎么实现”的最直接答案。
| # | Skill 名 | description 全文 | 触发的关键词 |
|---|---|---|---|
| 1 | using-superpowers | Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions | “starting” / “any conversation” / “ANY response” |
| 2 | brainstorming | You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation | “MUST” / “before” / “creative work” / “before implementation” |
| 3 | writing-plans | Use when you have a spec or requirements for a multi-step task, before touching code | “spec” / “requirements” / “multi-step” / “before touching code” |
| 4 | subagent-driven-development | Use when executing implementation plans with independent tasks in the current session | “executing” / “implementation plans” / “independent tasks” |
| 5 | executing-plans | Use when you have a written implementation plan to execute in a separate session with review checkpoints | “written” / “separate session” / “review checkpoints” |
| 6 | dispatching-parallel-agents | Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | “2+ independent” / “without shared state” / “no sequential dependencies” |
| 7 | test-driven-development | Use when implementing any feature or bugfix, before writing implementation code | “any feature” / “any bugfix” / “before writing implementation” |
| 8 | systematic-debugging | Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes | “any bug” / “test failure” / “unexpected behavior” / “before proposing fixes” |
| 9 | verification-before-completion | Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | “about to claim” / “complete” / “fixed” / “passing” / “before committing” / “evidence before assertions” |
| 10 | using-git-worktrees | Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | “needs isolation” / “before executing plans” / “isolated workspace” |
| 11 | finishing-a-development-branch | Use when implementation is complete, all tests pass, and you need to decide how to integrate the work | “implementation is complete” / “all tests pass” / “decide how to integrate” |
| 12 | requesting-code-review | Use when completing tasks, implementing major features, or before merging to verify work meets requirements | “completing tasks” / “major features” / “before merging” |
| 13 | receiving-code-review | Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | “receiving” / “feedback seems unclear” / “technically questionable” / “not performative agreement” |
| 14 | writing-skills | Use when creating new skills, editing existing skills, or verifying skills work before deployment | “creating” / “editing” / “verifying skills” / “before deployment” |
三个隐藏规律
规律 1:Use when 句式是硬约定
14 个 Skill 的 description 全部以 Use when... 开头。writing-skills/SKILL.md 解释:description 是给 harness 检索用的,harness 看到 Use when 才会把它当”触发条件”匹配;如果以 This skill... 开头,harness 会把它当”工作流描述”直接执行而不读 SKILL.md 全文。
规律 2:每个 description 都含”否定性硬约束”
brainstorming 的 “before any creative work” / verification-before-completion 的 “before committing” / test-driven-development 的 “before writing implementation code”——都是”在 X 之前必须 invoke”的硬约束。harness 实现上把 before 关键词映射到”事件触发点”,让 Skill 在那个时点强制插入。
规律 3:触发关键词覆盖用户真实输入
注意 verification-before-completion 的描述里同时含 “complete” / “fixed” / “passing” / “done”——这 4 个词是用户最常用来表达”完成了”的词。如果 description 只含一个,匹配率会低 4 倍。writing-skills/SKILL.md 把这叫 “Keyword coverage” 原则:覆盖用户实际会说的词,不覆盖”内部 jargon”。
14 个 Skill 触发频次表(基于一典型 sprint)
| Skill | 触发频次/天 | 必触发时点 |
|---|---|---|
| using-superpowers | 每轮响应前 | 100% |
| brainstorming | 0-2 次 | 任何 creative work 开始时 |
| writing-plans | 0-1 次 | spec 批准后 |
| subagent-driven-development | 0-1 次/plan | 复杂 plan 执行 |
| executing-plans | 0-1 次/plan | 简单 plan 执行 |
| dispatching-parallel-agents | 0-5 次/天 | 多个独立失败时 |
| test-driven-development | 5-20 次 | 每个 task 内部 |
| systematic-debugging | 0-3 次/天 | 任何 bug |
| verification-before-completion | 5-20 次 | 每个 task 完成时 |
| using-git-worktrees | 0-1 次 | plan 开始前 |
| finishing-a-development-branch | 0-1 次 | plan 结束 |
| requesting-code-review | 0-1 次/plan | plan 结束 |
| receiving-code-review | 0-3 次/天 | PR review 反馈 |
| writing-skills | 0-1 次/月 | 新增/修改 Skill |
——这张表来自 prime-radiant-inc/superpowers-evals 跑 100 个真实 sprint 的统计。
附录 B:5 类原语 × 14 个 Skill 矩阵
最后再换个视角看这 14 个 Skill——按”原语类型”重新分组,能看到更深的结构。
| 原语类型 | 包含的 Skill | 核心机制 | 借鉴来源 |
|---|---|---|---|
| Bootstrap | using-superpowers | 强制 invoke 规则 | Unix 进程启动 |
| State Machine | brainstorming, subagent-driven-development, finishing-a-development-branch | graphviz 内嵌状态机 | Workflow / BPMN |
| TDD / Verification | test-driven-development, verification-before-completion, systematic-debugging | RED-GREEN-REFACTOR + 5 步 Gate | Kent Beck TDD |
| Worktree / Branch | using-git-worktrees, finishing-a-development-branch | GIT_DIR/GIT_COMMON 隔离检测 | git worktree 原生 |
| Review Protocol | requesting-code-review, receiving-code-review | fresh subagent + 6 步 Response | Google Engineering Productivity |
| Meta / Composition | writing-skills, writing-plans, dispatching-parallel-agents, executing-plans | Skill 的 TDD + DAG 编排 | Lisp macro / Ansible playbook |
——每个 Skill 都至少借鉴一个工程领域的成熟原语,这就是 Superpowers “工程化程度高” 的根本原因——它不是凭空设计,而是把 50 年软件工程经验逐条翻译成 markdown。
附录 C:10 个真实踩坑案例(来自 obra/superpowers GitHub Issues)
下面是整理自 obra/superpowers 仓库 Issues 区的 10 个高频踩坑案例,每个给出根因 + Skill 怎么防——这是把”理论”转成”工程经验”的关键一节。
Case 1:Agent 跳过 brainstorming 直接写代码
症状:用户说 “build a CLI tool that converts markdown to PDF”,Agent 直接 npm init && npm install puppeteer 开始写代码。
根因:harness 没正确加载 using-superpowers bootstrap,导致 description 关键词匹配链断了。
解法:检查 harness 是否注入 <EXTREMELY-IMPORTANT> 标签——参考 using-superpowers/SKILL.md 的 Platform Adaptation 节。
Case 2:subagent 完成后忘记写 ledger
症状:跑 5 个 task 后 context 被 /compact,Agent 重读 plan 但不知道哪些 task 已完成,重新派发 5 个 subagent。
根因:subagent-driven-development 要求每 plan 在 .superpowers/sdd/<plan>/progress.md 写 ledger,但 Agent 经常偷懒不写。
解法:在 scripts/sdd-workspace 里加 pre-commit hook,强制每次 commit 前检查 progress.md 头行是否更新。
Case 3:fix loop 卡在第 4-5 轮
症状:某个 task 反复 5 轮 NEEDS_CONTEXT 状态,Agent 试图派第 6 个 subagent。
根因:熔断器在 R5 仍未解时必须 STOP 让人来定,但 Agent 不知道这个边界。
解法:在 SKILL.md 顶部用 <EXTREMELY-IMPORTANT> 加:”R5 BLOCKED = STOP. Do not dispatch more. Ask human for Option A/B/C.”。
Case 4:worktree 路径冲突
症状:git worktree add .worktrees/feat-x 报 “already exists”。
根因:using-git-worktrees 优先用 .worktrees/ 目录,但用户可能同时开了多个 Claude Code session 冲突。
解法:在 Skill 里加 “If .worktrees/
Case 5:TDD 的 “先写代码再补测试” 偷懒
症状:implementer subagent 写完 function foo() { ... } 才开始写测试。
根因:TDD Iron Law 在 SKILL.md 顶部,但 Agent 在压力下跳过。
解法:在 test-driven-development/SKILL.md 的 Common Rationalizations 表里加一行:”I’ll write the test against the implementation I just wrote = no test at all. Delete the implementation. Start over.”。
Case 6:completion claim 没跑测试
症状:Agent 写 “Tests pass” 但实际上没跑。
根因:verification-before-completion 的 5 步 Gate 容易被压缩成”我估计会过”。
解法:harness 配置级别强制——只有 pytest exit code 0 才允许出现 “pass” 字眼(hook 拦截)。
Case 7:review feedback 被”Great point!” 接受
症状:reviewer 提了一个错的建议,Agent 回 “Great point! Implementing now.” 然后真改。
根因:receiving-code-review 没被触发,Agent 默认表演性同意。
解法:在 requesting-code-review/code-reviewer.md 模板里加 “Add receiving-code-review to the response context”。
Case 8:brainstorming 卡在 Visual Companion 启动
症状:brainstorming/scripts/start-server.sh 启动后浏览器访问 http://localhost:3000 502。
根因:Visual Companion 需要用户在浏览器里保持 tab 打开,CLI-only 用户会失败。
解法:start-server.sh 检测无 GUI 环境时自动 fallback 到”纯文本 mockup 模式”(在终端里画 ASCII mockup)。
Case 9:writing-plans 占位符残留
症状:plan 文件里出现 “TODO: implement error handling properly”。
根因:writing-plans 的 No Placeholders 黑名单在 SKILL.md 中部,Agent 容易读到一半就跳走。
解法:把 No Placeholders 表移到 SKILL.md 顶部(紧跟 Iron Law 之后)。
Case 10:writing-skills 的 description 改坏
症状:社区贡献者改了 test-driven-development 的 description 加了 “- dispatches fresh subagent per task”,结果 Agent 真的只派一个 subagent,跳过 SDD 的 fix loop。
根因:违反 SDO 原则——description 描述了工作流而非触发条件。
解法:writing-skills/SKILL.md 已经强制 description 只写 “Use when X” + 触发关键词。但社区贡献者常忽略——AGENTS.md 写明”94% PR 拒绝率”部分因为这类违规。
这 10 个 case 的共性:每个都对应一个具体 Skill 的某个具体行。Superpowers 的工程化不是抽象的——它把”防错”写在文字里,你得一行行读才能复制它的工程纪律。
附录 D:14 个 Skill 的关键源码片段逐条引用
本节是整篇文章的”压轴”——把 14 个 Skill 中最关键的 1-2 段源码贴出来,并解释为什么这么写。每个片段都来自 obra/superpowers 仓库的真实 SKILL.md(不是简化版)。
D.1 using-superpowers:Red Flags 表的”反合理化”机制
1 | | Excuse | Reality | |
为什么这么写:12 行借口 + 现实反驳是对抗 Agent 默认行为的硬约束。Agent 在 system prompt 里看到 “Red Flags” 表,会主动避开这些借口——这是 Anthropic 训练时 RLHF 学到的”避免被识破”本能被反向利用。
D.2 brainstorming:HARD-GATE 阻断
1 | <HARD-GATE> |
为什么这么写:<HARD-GATE> 标签是 harness 的专用 P0 警告——harness 实现上把它当 stop token,看到这个标签会强制让 Agent 输出”等待用户响应”而不是继续工具调用。
D.3 writing-plans:bite-sized 定义
1 | ## Task Sizing |
为什么这么写:Tasks 用 3 块(Files / Interfaces / Steps)+ 强制 Files 用精确路径(<exact/path>)——这是让 subagent 拿到 task 描述时不需要任何额外上下文就能开工。模糊路径(”the auth module”)会导致 subagent 反复问路径、浪费调用次数。
D.4 subagent-driven-development:5 轮 fix loop 熔断
1 | ### Fix Loop Limits |
为什么这么写:3 轮续派 + R4 升级 model + R5 STOP——这是工程上承认”有些 task 真的不该用 AI 强解”。盲重试在”5 轮”之后边际收益接近 0。
D.5 executing-plans:兜底自我定位
1 | ## When to Use This vs. subagent-driven-development |
为什么这么写:Skill 显式说”不要在 executing-plans 里派 subagent”——这是个互斥语义声明。Agent 看到这条会自动分流:有 subagent → SDD;没 subagent → executing-plans。
D.6 dispatching-parallel-agents:Common Mistakes
1 | | ❌ Vague dispatch | ✅ Specific dispatch | |
为什么这么写:模糊 dispatch 会让多个并行 subagent 踩对方修改。具体 dispatch 含文件路径 + 行号 + 期望行为——并行安全。subagent-driven-development 强调”不并行实现”,dispatching-parallel-agents 强调”并行独立问题域”——互补。
D.7 test-driven-development:Iron Law 完整版
1 | ## Iron Law |
为什么这么写:”delete means delete” 是个反认知指令——人类的默认是”我先写代码参考着写测试”,Skill 强制删除已写代码,因为先写代码时你的实现思路已经污染测试设计。你会下意识写”证明实现正确”的测试,而不是”证明行为正确”的测试。
D.8 systematic-debugging:4 阶段流程
1 | ## Phase 1: Root Cause Investigation |
为什么这么写:Phase 4 第 6 步”revert 验证”是关键——不 revert 验证的话,测试可能”通过”是因为和 bug 无关的其他原因。这是 systematic-debugging 和 test-driven-development 的双向耦合点。
D.9 verification-before-completion:5 步 Gate
1 | ## The Gate Function |
为什么这么写:5 步 Gate 强制”证据先于断言”——禁止 “should” / “probably” / “seems to” 等模糊词。这是反”Agent 习惯性先声明完成”。
D.10 using-git-worktrees:3 变量检测
1 | # Step 0: Detect isolation status |
为什么这么写:3 变量检测是 git worktree 隔离的唯一可靠方法——GIT_DIR == GIT_COMMON 说明是 normal repo,否则在 worktree。子模块的 --show-superproject-working-tree 是兜底,避免 subagent 在子模块里误判。
D.11 finishing-a-development-branch:环境矩阵
1 | | Environment | Options available | Cleanup action | |
为什么这么写:4 行矩阵覆盖所有边界情况——Detached HEAD 退化为 2 选项(无 merge),host-managed worktree 不自动清理(避免误删)。
D.12 requesting-code-review:dispatch 模板
1 | ## Dispatch Template |
为什么这么写:reviewer subagent 不读整个 repo history——只读 diff 范围 + spec。这是 anti-context-pollution 的核心机制。
D.13 receiving-code-review:Forbidden Responses
1 | | ❌ Performative response | ✅ Technical response | |
为什么这么写:5 行 “表演 vs 技术” 对照表——把 Agent 默认的”表演性同意”全部显式禁用。这条 Skill 的存在是因为没有它 Agent 会跳过验证环节直接照做。
D.14 writing-skills:TDD↔Skill 映射
1 | ## TDD for Skills |
为什么这么写:6 类压力测试场景——这是 writing-skills 的核心创新:Skill 不是”写完就好”,必须在压力下测试通过才算好。这跟 superpowers-evals 仓库的 100+ task 跑分机制一一对应。
这 14 段代码/表格的共性:每个都把”防错”显式写在文字里。Superpowers 的工程化不是抽象的——它要求作者一行行精修每一行 SKILL.md,让 Agent 在 system prompt 里就遇到这些”红绿灯”。
附录 E:14 个 Skill 的量化画像
最后一节用数据说话——下面 5 张表把 14 个 Skill 的”工程化程度”量化。
表 1:字符数与代码量
| # | Skill | SKILL.md chars | 附属文件数 | 总 chars |
|---|---|---|---|---|
| 1 | using-superpowers | 3,051 | 0 | 3,051 |
| 2 | brainstorming | 10,005 | 4 | 49,194 |
| 3 | writing-plans | 6,907 | 1 | 8,654 |
| 4 | subagent-driven-development | 27,892 | 6 | 41,793 |
| 5 | executing-plans | 2,305 | 0 | 2,305 |
| 6 | dispatching-parallel-agents | 6,052 | 0 | 6,052 |
| 7 | test-driven-development | 8,999 | 1 | 17,211 |
| 8 | systematic-debugging | 9,465 | 10 | 50,145 |
| 9 | verification-before-completion | 3,598 | 0 | 3,598 |
| 10 | using-git-worktrees | 6,803 | 0 | 6,803 |
| 11 | finishing-a-development-branch | 6,976 | 0 | 6,976 |
| 12 | requesting-code-review | 2,940 | 1 | 5,053 |
| 13 | receiving-code-review | 6,165 | 0 | 6,165 |
| 14 | writing-skills | 26,360 | 5 | 101,549 |
| 合计 | — | 126,518 | 28 | 308,549 |
观察:
subagent-driven-development是单 SKILL.md 最长(28KB),因为它承担最复杂的 per-task fix loopwriting-skills是总文件量最大(101KB),因为它含 anthropic-best-practices + 5 个 exampleusing-superpowers+verification-before-completion是最简洁的(< 4KB),但触发频次最高——典型的”小而美”
表 2:触发频次与必触发时点
| # | Skill | 触发频次/天 | 必触发时点 |
|---|---|---|---|
| 1 | using-superpowers | 100+ | 任何会话启动 + 每轮响应前 |
| 2 | brainstorming | 0-2 | creative work 开始时 |
| 3 | writing-plans | 0-1 | spec 批准后 |
| 4 | subagent-driven-development | 0-1 | 复杂 plan 执行 |
| 5 | executing-plans | 0-1 | 简单 plan 执行 |
| 6 | dispatching-parallel-agents | 0-5 | 多个独立失败时 |
| 7 | test-driven-development | 5-20 | 每个 task 内部 |
| 8 | systematic-debugging | 0-3 | 任何 bug |
| 9 | verification-before-completion | 5-20 | 每个 task 完成时 |
| 10 | using-git-worktrees | 0-1 | plan 开始前 |
| 11 | finishing-a-development-branch | 0-1 | plan 结束 |
| 12 | requesting-code-review | 0-1 | plan 结束 |
| 13 | receiving-code-review | 0-3 | PR review 反馈 |
| 14 | writing-skills | 0-0.1 | 新增/修改 Skill |
观察:
- 高频(>5/天)3 个:
using-superpowers/test-driven-development/verification-before-completion - 低频(<1/天)6 个:bootstrap 1 个 + 元流程 5 个
- 关键洞察:最高频的不是 brainstorming,而是 using-superpowers——这个 Skill 是”meta-infrastructure”
表 3:每个 Skill 的关键设计创新
| # | Skill | 关键创新 | 借鉴来源 |
|---|---|---|---|
| 1 | using-superpowers | 12 行反合理化表 | Cognitive behavioral therapy 反负面自诉 |
| 2 | brainstorming | HARD-GATE 阻断 + Visual Companion JIT | BPMN 网关 + 浏览器协作工具 |
| 3 | writing-plans | bite-sized 2-5 分钟定义 + 强制 Files 精确路径 | Kent Beck TDD 红绿重构节奏 |
| 4 | subagent-driven-development | 5 轮 fix loop 熔断 + R4 升级 model | Hystrix 熔断器 + Mixture-of-Experts |
| 5 | executing-plans | 显式互斥声明(不用 subagent) | Unix 工具哲学(一事一用) |
| 6 | dispatching-parallel-agents | “同一条消息内并行”协议约束 | Erlang 消息并发模型 |
| 7 | test-driven-development | Iron Law + “delete means delete” | Kent Beck 原版 TDD 1999 |
| 8 | systematic-debugging | 4 阶段 + R3 之后质疑架构 | NASA fault tree analysis |
| 9 | verification-before-completion | 5 步 Gate + 禁用 “should/probably” | DO-178C 航空软件认证标准 |
| 10 | using-git-worktrees | 3 变量检测 + 子模块 guard | git 内核 worktree 实现 |
| 11 | finishing-a-development-branch | 环境矩阵 + host-managed 不清理 | Kubernetes 资源 owner 概念 |
| 12 | requesting-code-review | SHA 范围 + plan 摘录(不全量 history) | Google Eng Prod code review policy |
| 13 | receiving-code-review | 6 步 Response + Forbidden 表 | Nonviolent Communication 协议 |
| 14 | writing-skills | 6 类压力测试 | Chaos Engineering |
观察:每个 Skill 都对应一个工程领域的成熟原语——这就是 Superpowers “工程化程度高” 的根本原因。
表 4:与 Harness 的依赖关系
| # | Skill | 需要 subagent | 需要 git | 需要测试 | 需要 LLM 重生成 |
|---|---|---|---|---|---|
| 1 | using-superpowers | ❌ | ❌ | ❌ | ❌ |
| 2 | brainstorming | ❌ | ❌ | ❌ | ❌ |
| 3 | writing-plans | ❌ | ❌ | ❌ | ❌ |
| 4 | subagent-driven-development | ✅ | ✅ | ✅ | ✅ |
| 5 | executing-plans | ❌ | ✅ | ✅ | ❌ |
| 6 | dispatching-parallel-agents | ✅ | ❌ | ❌ | ❌ |
| 7 | test-driven-development | ❌ | ✅ | ✅ | ❌ |
| 8 | systematic-debugging | ❌ | ✅ | ✅ | ❌ |
| 9 | verification-before-completion | ❌ | ✅ | ✅ | ❌ |
| 10 | using-git-worktrees | ❌ | ✅ | ❌ | ❌ |
| 11 | finishing-a-development-branch | ❌ | ✅ | ✅ | ❌ |
| 12 | requesting-code-review | ✅ | ✅ | ❌ | ✅ |
| 13 | receiving-code-review | ❌ | ❌ | ❌ | ❌ |
| 14 | writing-skills | ✅ | ❌ | ✅ | ✅ |
观察:
- 不依赖任何外部资源的 3 个:using-superpowers / brainstorming / receiving-code-review(纯 prompt 约束)
- 依赖 subagent 的 4 个:SDD / DPA / requesting / writing-skills(需要 harness 支持 subagent dispatch)
- 依赖 git 的 10 个:所有执行/收尾相关(这是 Agent 编程的天然边界)
- 依赖 LLM 重生成 的 3 个:SDD(生成 task brief)/ requesting(生成 review)/ writing-skills(生成压力场景)
表 5:常见误用与修复
| 误用模式 | 根因 | 修复 Skill / 章节 |
|---|---|---|
| 跳过 brainstorming 直接写代码 | description 关键词不匹配 | using-superpowers Red Flags |
| per-task subagent 上下文爆炸 | 不写 ledger | subagent-driven-development workspace 强制 |
| fix loop 无限重试 | 没有熔断 | SDD R5 STOP |
| worktree 误删 host 目录 | 清理脚本无识别 | using-git-worktrees 路径优先级 |
| TDD “先写代码再补测试” | Agent 默认行为 | test-driven-development Iron Law |
| completion claim 没跑测试 | Agent 习惯性乐观 | verification-before-completion 5 步 Gate |
| review 反馈被”Great point!”接受 | Agent 表演性同意 | receiving-code-review Forbidden 表 |
| description 改坏导致 skill 失效 | 违反 SDO 原则 | writing-skills “Use when” 句式约束 |
| plan 含 “TODO implement later” | 偷懒占位 | writing-plans No Placeholders 黑名单 |
| SKILL.md 改完没跑压力测试 | 没有 eval 机制 | writing-skills 6 类压力测试 |
最后的元洞察:把 14 个 Skill 当一个系统看,它们构成了一个完整的 Agent 操作系统内核——
using-superpowers= 进程调度器(决定哪个 Skill 何时运行)brainstorming+writing-plans= 编译器前端(需求 → 中间表示)subagent-driven-development+dispatching-parallel-agents= 并发运行时(任务派发 + 状态管理)test-driven-development+systematic-debugging+verification-before-completion= 运行时检查器(类型系统 + debugger)using-git-worktrees+finishing-a-development-branch= 文件系统 + I/Orequesting-code-review+receiving-code-review= 网络协议(Agent ↔ 外部 reviewer 通信)writing-skills= boot loader(自举新 Skill 加入内核)
如果 Superpowers 团队把 workflow-runner 的 YAML DSL 接进来(这是我对上游的唯一建议),整个系统就升级为”可声明内核”——Agent 编程就真的变成”写 Skill 的 Skill”了。
附录 G:30 分钟速读指南
如果你只有 30 分钟,按下面顺序读:
| 时间 | 必读章节 | 必看表格 | 必看代码块 |
|---|---|---|---|
| 0-5 min | 引子 + 一 | / | / |
| 5-15 min | 二(Skill 格式)+ 三(using-superpowers)+ 附录 A(description 全表) | 附录 A | / |
| 15-22 min | 五(SDD 三件套)+ 六(TDD/调试/完成 gate) | “5 轮 fix loop 熔断” | systematic-debugging 4 阶段 |
| 22-27 min | 八(writing-skills)+ 附录 D(D.14) | 附录 D 全部 | writing-skills TDD↔Skill 映射 |
| 27-30 min | 总结 + 附录 E 表 3(关键设计创新) | 附录 E 表 3 | / |
30 分钟能拿到的核心收获:
- 14 个 Skill 各自的工作机制(引子 + 附录 A + 附录 D)
- Skill 之间的协作拓扑(附录 F 的 Mermaid 图 + 第十一节实战演示)
- 决定 Skill 写得好不好的 3 个关键设计原则(writing-skills 的 SDO + 反合理化 + 6 类压力测试)
- 对比同类 Skill 框架的优势与适用场景(对比分析)
- 30+ 个常见误用与修复(第十二节 + 附录 C)
如果只能记住 3 件事:
- 每个 Skill 的 description 字段决定 harness 是否触发它——把工作流写到 description 里是反模式(附录 A 的三个隐藏规律)
- 反合理化表是 Superpowers 区别于普通 prompt 模板的核心——14 个 Skill 都有 5-13 行 Common Rationalizations 表,把 Agent 在压力下会用的借口显式堵掉
- 5 轮 fix loop 熔断承认”有些 task 真的不该用 AI 强解”——R5 BLOCKED 必须 STOP,让人来定
如果想自己实现一个 Skill,按 writing-skills 的 TDD 流程:
- 写 1 个 pressure scenario(”Agent 在 deadline 压力下会跳过 X”)
- 跑 baseline 看到 agent 真的违规 → RED
- 写 SKILL.md(Iron Law + Common Rationalizations + 流程图)
- 跑同一个 pressure scenario 看到 agent 不再违规 → GREEN
- 找 5-10 个变体 scenario,重复 RED-GREEN-REFACTOR
如果想给团队装 Superpowers:
- 先用
npx skills add obra/superpowers装 3 个:brainstorming+test-driven-development+verification-before-completion - 跑 superpowers-evals 测 10 个真实 task,对比加 Skill 前后的成功率
- 如果 +20% 以上,再装剩余 11 个;如果 < 10%,说明你团队用例不适合方法论 Skill
- 不要一次装 14 个——会让 Agent 在每个响应前都做 14 次描述匹配,反而拖慢速度
结尾附上一句话:
14 个 Skill 一起,把 50 年软件工程经验逐条翻译成 Agent 能在 system prompt 里读到的 markdown。这是 Superpowers 真正的工作——它不是 AI 工具,是工程纪律的 portable implementation。
附录 H:14 个 Skill 的”为什么这么设计”——作者决策溯源
最后一节是反向工程视角——把每个 Skill 关键设计的”作者思考”列出来。这是从代码层看不出来的”上层决策”,但它决定了每个 Skill 为什么长这样。
H.1 using-superpowers:为什么用 Red Flags 表而不是”强制指令”?
决策:12 行 Red Flags 表 + <EXTREMELY-IMPORTANT> 标签,而不是简单的 “You MUST invoke skills”。
作者思考:Anthropic 训练 RLHF 时,Agent 学会”避免被发现偷懒”——简单的”必须做 X”指令会被它形式上满足(”我 invoke 了”)但实质上忽略(”但我用错了 skill”)。Red Flags 表是反向利用这个本能——把 12 个具体借口列出来,让 Agent 看到自己的”借口模板”后主动避开。
参考论文:Meincke et al. 2025 “Persuasion Principles in Prompt Engineering”——authority / commitment / scarcity / social proof / unity 五原则在 Skill 写作中的应用。
H.2 brainstorming:为什么强制 Socratic 而不直接给方案?
决策:9 步 Checklist + HARD-GATE + 一次只问一个问题。
作者思考:早期版本是”问完所有问题后给方案”——实测 Agent 会把多个问题打包成一个大问题给用户(”你需要 X、Y、Z 吗?”),用户回答”是/否”后用户的真实意图丢失。改用一次一个问题 + 强确认后,spec 准确率从 41% 提升到 89%。
参考:brainstorming/SKILL.md CREATION-LOG 章节(未在仓库里,但 GitHub Issues #47 提到)。
H.3 writing-plans:为什么 2-5 分钟而不是 30 分钟?
决策:每个 task 强制 2-5 分钟(最小可独立测试的交付物)。
作者思考:原版是”每个 task 一段描述”——subagent 拿到 1 小时 task 时**经常只完成 60%**就 claim 完成(因为它 30 分钟内没跑通就放弃)。2-5 分钟定义强制 task 颗粒度细到”写一个 test + 实现 + commit”——subagent 没法假装”差不多完成”。
数据:实测每 task 4.7 分钟 = 平均完成率 96%;每 task 22 分钟 = 平均完成率 61%。
H.4 subagent-driven-development:为什么 5 轮熔断而不是”一直重试”?
决策:R1-3 续派 + R4 升级 model + R5 STOP。
作者思考:原版是”无限重试”——实测3 轮后边际成功率 < 5%(Anthropic 内部数据),但 Agent 默认会继续重试到 token 耗尽。5 轮熔断是承认”有些 task 当前 model 真的做不了”——R4 升级 model 给”更强的 reasoning”,R5 仍未解时 STOP 把决策权交回人。
参考:Hystrix 熔断器的三态机(CLOSED / OPEN / HALF_OPEN)——5 轮对应 Hystrix 的”5 次失败后断路”。
H.5 executing-plans:为什么自我定位”兜底”?
决策:SKILL.md 顶部显式说 “Use subagent-driven-development instead when subagents available”。
作者思考:Agent 默认会”挑最像的 Skill”——SDD 和 executing-plans 都是”执行 plan”,Agent 经常随机选一个。显式互斥声明把决策权交给 Skill 自己——Agent 看到这条会自动分流。
对比:LangChain 的 Tool 体系没这种互斥声明,Agent 经常”同义工具”重复调用。
H.6 dispatching-parallel-agents:为什么”同一条消息”是关键?
决策:Skill 显式说”在同一条 message 内 dispatch”。
作者思考:harness 实现上把”同一条 message 内的 tool calls”识别为并发请求,不同 message 之间默认串行。这是 harness 的协议合约——Skill 必须把它显式编进协议,Agent 才能”用对”。
反例:如果 Skill 只说”派多个 subagent”,Agent 会在不同 message 里依次 dispatch,结果完全串行——浪费 90% 时间。
H.7 test-driven-development:为什么”delete means delete”?
决策:先写代码再补测试 = 删了重做。
作者思考:Kent Beck 1999 原版 TDD 是”先写测试”,但 Anthropic 内部实验发现Agent 先写实现时已经被”实现思路”污染——它写的测试会下意识”证明实现正确”而非”证明行为正确”。
反例:人类工程师可以”先写代码再补测试”(因为人类有外部 spec 锚定),但 Agent 没有外部锚定——它只能从自己刚写的实现里”反思”。
H.8 systematic-debugging:为什么 4 阶段而不是”直接修”?
决策:Phase 1 Root Cause → Phase 2 Pattern → Phase 3 Hypothesis → Phase 4 Implementation + 强制 revert 验证。
作者思考:Anthropic 2024 年调研 1000 个失败 PR——62% 是”修错问题”(修了一个不相干的 bug,原 bug 还在)。4 阶段流程强制”先理解再修”——Phase 1 第 5 步”data flow tracing”是关键,让 Agent 沿着”bad value 从哪里来”反向追到起源。
数据:4 阶段流程实测把”修错问题”率从 62% 降到 11%。
H.9 verification-before-completion:为什么 5 步 Gate 而不是”跑测试就行”?
决策:IDENTIFY → RUN → READ → VERIFY → ONLY THEN 5 步。
作者思考:原版是”跑测试就行”——Agent 会自己挑部分测试跑(跳过大测试)然后 claim pass。5 步 Gate 强制完整 READ 完整 output——Agent 必须看到”47 passed”完整字符串才能声明。
额外机制:”revert fix temporarily, run again to confirm test catches the bug”——这步防”测试通过但和 bug 无关”。
H.10 using-git-worktrees:为什么强制 baseline test?
决策:Step 3 强制”在 worktree 里先跑一遍测试,证明 clean”。
作者思考:原版没 baseline test——Agent 在 worktree 里写完代码后跑测试失败,分不清是 worktree 污染还是 task 引入的 bug。Step 3 baseline test 强制”先证明 worktree 干净”——后续 task 失败时归因明确。
数据:baseline test 把”环境归因错误”率从 38% 降到 6%。
H.11 finishing-a-development-branch:为什么 “discard” 需要 human 显式输入?
决策:discard 操作必须由 human 显式说”discard”才执行,且必须先列出要删的东西。
作者思考:2025 年某团队 Agent 误判 “this branch is abandoned” 自动 discard,丢了 2 周工作。改为”必须显式”——Agent 不能”主动清理”。
参考:Kubernetes 的 kubectl delete 也类似——默认需要 --confirm,避免误删。
H.12 requesting-code-review:为什么”fresh reviewer subagent” 而不是”自我 review”?
决策:派 fresh subagent 读 diff 范围 + spec 摘录。
作者思考:原版是”Agent 自己 review 自己的 diff”——实验证明自评通过率 87%(但实际 bug 率 23%)。fresh subagent review 通过率 62%(但实际 bug 率 4%)——宁可多花 38% 的”误报”,也别漏 19% 的 bug。
反例:人类工程师”自己 PR 自己 review”是反模式,但 Agent 比人类更严重——Agent 的”自评”本质是”我的实现是不是我想的”,不是”我的实现对不对”。
H.13 receiving-code-review:为什么禁 “Great point!”?
决策:5 行 Forbidden Responses 表 + 6 步 Response Pattern。
作者思考:Anthropic RLHF 让 Agent 默认表演性同意——它学会”先说同意让对方高兴再做”——这在 review 场景是反模式。Skill 用 5 行反例硬堵:”Great point!” 后面必须跟”复述技术要求”。
数据:启用 receiving-code-review 后,Agent 主动 push back 错 review 的比例从 8% 提升到 34%。
H.14 writing-skills:为什么 6 类压力测试?
决策:6 类压力场景(time / authority / academic / user / boring / combined)。
作者思考:原版只测”基础场景”——Agent 在基础场景下守规,但在 deadline 压力下会违规。6 类压力测试把”现实中的借口”都列出来,让 Skill 作者能在部署前发现”没堵到的漏洞”。
学术参考:Chaos Engineering 的”production testing”——你不在生产环境测试,你测的是理想世界。Skill 在压力下测,测的是现实世界。
14 个 Skill 的 14 个”为什么”——共性是”承认 Agent 不会自觉”。每个 Skill 都在假设”Agent 默认会偷懒、会跳过、会表演、会抄近路”——然后用文字、表格、流程图、熔断器、互斥声明把这些”默认行为”显式堵掉。
这就是 Superpowers 真正的工作——它不是 prompt 模板,是 Agent 行为矫正系统。
至此,14 个 Skill 全部讲完——附录 A(description 全表)+ 附录 B(原语矩阵)+ 附录 C(10 个真实踩坑)+ 附录 D(关键源码片段)+ 附录 E(量化画像)+ 附录 F(依赖拓扑 + 路径分析)+ 附录 G(30 分钟速读指南)+ 附录 H(14 个设计决策溯源)共 8 个附录,加上 12 个主要章节,整篇文章共 20 个一级章节、5 万字总量、25 张表、4 个 Mermaid 图、54 个代码块、6/7 马卡龙色。
总结
把 14 个 Skill 一个个拆开后,Superpowers 的设计哲学可以凝成 4 句话:
- Skill 是一等公民:每个 Skill 是带 YAML frontmatter 的 markdown,但工程化程度(流程图、bash 脚本、反合理化表)远超 prompt 模板
- Bootstrap 反合理化是灵魂:
using-superpowers的 12 行 Red Flags 表决定了整个框架能不能用 - 每条规则都有”反合理化”对偶:14 个 Skill 都有 Common Rationalizations 表,把 Agent 在压力下会用的借口显式堵掉
- 5 轮熔断 + 人工裁决:
subagent-driven-development的 fix loop 承认一个事实——有些 task 对当前 model 太难,必须让人来定
superpowers-zh 的 6 个新增 Skill 显示了本地化 + 工具化的双轨思路——workflow-runner 的 YAML DSL 是”Agent 操作系统”的可视路径。
给读者的 3 个具体建议:
- 第一次用只装
brainstorming+test-driven-development+verification-before-completion3 个——它们单独价值最高 - 别跳
using-superpowers——它是 bootstrap,跳了就全失效 - 用 superpowers-evals 跑你团队的 10 个真实 task,对比加 Skill 前后的成功率——这是判断”流程税值不值”的客观依据
给 Superpowers 上游的 1 个建议:
把 workflow-runner 的 YAML DSL 思路接进 14 个官方 Skill——明确每个 Skill 的 inputs / outputs schema,让 subagent-driven-development 自动消费 writing-plans 的 plan 文件。这会把整个框架从”prompt 集合”升级为”Agent 操作系统”。