← 返回 Skills 市场
axelhu

Superpowers Requesting Code Review

作者 AxelHu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
194
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install openclaw-requesting-code-review
功能描述
Use when completing tasks, implementing major features, or before merging - dispatches code review subagent to catch issues before they cascade, adapted for...
使用说明 (SKILL.md)

Superpowers Requesting Code Review(OpenClaw 适配版)

概述

在问题级联前派发代码审查 subagent 捕获问题。审查者获得精确构造的上下文做评估——永远不是你 session 的历史。这保持审查者专注在工作产出上,而非你的思维过程。

核心原则: 尽早审查,经常审查。

OpenClaw 适配

Superpowers 原版使用 Task 工具派发 code-reviewer subagent。OpenClaw 用 sessions_spawn

  • 派发前准备审查上下文(git diff、变更摘要、规格引用)
  • sessions_spawn(mode="run") 派发一次性审查 session
  • 审查结果通过 session 历史或文件系统返回

何时请求审查

强制:

  • subagent-dev 中每个任务完成后
  • 完成重大功能后
  • Merge 到 main 前

可选但有价值:

  • 卡住时(新鲜视角)
  • 重构前(基线检查)
  • 修复复杂 bug 后

如何请求

1. 收集上下文

# 获取 git diff
git diff BASE_SHA HEAD > /tmp/review-diff.patch
git log --oneline BASE_SHA..HEAD

# 获取变更统计
git diff --stat BASE_SHA HEAD

2. 准备审查 prompt

审查 prompt 应包含:

  • 实现了什么 — 刚刚构建的内容
  • 计划/需求 — 应该做什么
  • 基准 SHA — 起始 commit
  • 头部 SHA — 结束 commit
  • 变更描述 — 简要总结

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 问题供以后
  • 如果审查者错了——用技术理由反驳

审查关注点

规格合规

  • 每个计划需求有对应实现吗?
  • 没有做多余的东西?
  • 边界情况覆盖了吗?

代码质量

  • DRY(不要重复自己)?
  • 命名清晰有意义?
  • 测试覆盖好?
  • 没有明显的性能问题?

问题严重度

级别 含义 行动
Critical 破坏功能或安全 立即修复
Important 重要但非破坏 继续前修复
Minor 风格/改进建议 记录可选做

Red Flags

永远不要:

  • 因为"简单"就跳过审查
  • 忽略 Critical 问题
  • 有未修复 Important 问题时继续
  • 用合理技术反驳有效反馈

如果审查者错了:

  • 用技术理由反驳
  • 展示证明它工作的代码/测试
  • 请求澄清

与工作流集成

Subagent 驱动开发:

  • 每个任务审查
  • 在问题级联前捕获
  • 继续前修复

顺序执行:

  • 每个批次(3 个任务)后审查
  • 获得反馈,应用,继续

临时开发:

  • Merge 前审查
  • 卡住时审查
安全使用建议
This skill appears to be what it says: a recipe for spawning an ephemeral code-review subagent. Before installing/using it, confirm that your agent environment provides the sessions_spawn API and that the cwd you supply points to the intended repository. Be careful not to include sensitive secrets in the git diff or the review prompt (credentials, private keys, API tokens); redact or exclude those files. Prefer ephemeral project paths and least-privilege subagent runtimes, and validate any subagent outputs before acting (especially for fixes marked Critical). If you require stricter controls, enforce policies that prevent subagents from accessing secrets or external network resources.
功能分析
Type: OpenClaw Skill Name: openclaw-requesting-code-review Version: 1.0.0 The skill bundle provides a structured workflow for an AI agent to request code reviews from subagents using the OpenClaw 'sessions_spawn' tool. The instructions in SKILL.md focus on standard development practices such as generating git diffs, summarizing changes, and evaluating code quality, with no evidence of malicious intent, data exfiltration, or unauthorized execution.
能力评估
Purpose & Capability
The name/description promise (dispatch code-review subagent) matches the SKILL.md: it explains collecting a git diff, preparing a review prompt, and calling sessions_spawn to run a subagent. No unrelated binaries, env vars, or config paths are requested.
Instruction Scope
Runtime instructions focus on preparing review context (git diff, summary, SHAs) and spawning a review session. They do not instruct reading unrelated system files, exfiltrating session history, or sending data to external endpoints. The use of cwd and /tmp is typical for repository-based workflows.
Install Mechanism
This is an instruction-only skill with no install spec and no code files — lowest-risk install posture. There is nothing downloaded or written by an installer.
Credentials
The skill declares no required environment variables or credentials. It expects access to a git repository (running git diff/log), which is coherent for a code-review helper. No unrelated credentials or secrets are requested.
Persistence & Privilege
always is false and autonomous invocation is allowed (platform default). The skill does not request persistent system presence or modification of other skills' configurations.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install openclaw-requesting-code-review
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /openclaw-requesting-code-review 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: OpenClaw-adapted skill.
元数据
Slug openclaw-requesting-code-review
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Superpowers Requesting Code Review 是什么?

Use when completing tasks, implementing major features, or before merging - dispatches code review subagent to catch issues before they cascade, adapted for... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 194 次。

如何安装 Superpowers Requesting Code Review?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install openclaw-requesting-code-review」即可一键安装,无需额外配置。

Superpowers Requesting Code Review 是免费的吗?

是的,Superpowers Requesting Code Review 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Superpowers Requesting Code Review 支持哪些平台?

Superpowers Requesting Code Review 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Superpowers Requesting Code Review?

由 AxelHu(@axelhu)开发并维护,当前版本 v1.0.0。

💬 留言讨论