Superpowers Requesting Code Review(OpenClaw 适配版)
name: superpowers-requesting-code-review
by axelhu · published 2026-04-01
$ claw add gh:axelhu/axelhu-openclaw-requesting-code-review---
name: superpowers-requesting-code-review
description: Use when completing tasks, implementing major features, or before merging - dispatches code review subagent to catch issues before they cascade, adapted for OpenClaw sessions_spawn model
---
# Superpowers Requesting Code Review(OpenClaw 适配版)
概述
在问题级联前派发代码审查 subagent 捕获问题。审查者获得精确构造的上下文做评估——永远不是你 session 的历史。这保持审查者专注在工作产出上,而非你的思维过程。
**核心原则:** 尽早审查,经常审查。
OpenClaw 适配
Superpowers 原版使用 `Task` 工具派发 code-reviewer subagent。OpenClaw 用 `sessions_spawn`:
何时请求审查
**强制:**
**可选但有价值:**
如何请求
1. 收集上下文
# 获取 git diff
git diff BASE_SHA HEAD > /tmp/review-diff.patch
git log --oneline BASE_SHA..HEAD
# 获取变更统计
git diff --stat BASE_SHA HEAD2. 准备审查 prompt
审查 prompt 应包含:
3. 派发审查 subagent
sessions_spawn({
task: `代码审查请求
实现了什么:
[具体描述刚完成的工作]
规格/需求:
[任务来自哪个计划,相关规格要求]
变更:
[git diff 关键内容或指向 diff 文件的路径]
请审查:
1. 规格合规——实现是否满足需求?
2. 代码质量——DRY、命名、测试设计
3. 潜在问题——bug、边界情况、安全
返回:strengths、issues(按 severity 分类)、assessment`,
runtime: "subagent",
mode: "run",
cwd: "/path/to/project"
})4. 处理反馈
审查关注点
规格合规
代码质量
问题严重度
| 级别 | 含义 | 行动 |
|------|------|------|
| **Critical** | 破坏功能或安全 | 立即修复 |
| **Important** | 重要但非破坏 | 继续前修复 |
| **Minor** | 风格/改进建议 | 记录可选做 |
Red Flags
**永远不要:**
**如果审查者错了:**
与工作流集成
**Subagent 驱动开发:**
**顺序执行:**
**临时开发:**
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...