跳到正文
Skillpedia
部署与云(DevOps)101k · #982

diff-review

它能做什么

这个工具会以你能看懂的方式展示你代码的改动,方便你决定是接受还是拒绝这些修改。它会把这些改动整理好,便于审阅。

适用场景

  • ✓工具自动修改你的代码之后。
  • ✓当你想在永久应用修改之前先审阅时。
  • ✓当你想决定一组改动中,哪些部分要接受、哪些要拒绝时。

技能链接

https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/diff-review/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/diff-review/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“审阅一下我代码的改动,告诉我应该接受还是拒绝。”

每周 5 个新技能,1 分钟读完。

工作原理

工具会收集你项目中的所有改动,然后以清晰的格式(类似“diff”)展示出来,让你选择接受、拒绝,或部分接受这些修改。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Diff review

Spec §20.3 / §21.3.2: a code-migration / tune-collab handoff is worthless without a human-reviewable diff. This atom is the "present the patch, capture the decision" stage.

Inputs

  • The project cwd's accumulated edits since the run started (or since the previous diff-review iteration).
  • plan/steps.json for context per file.

Output

project-cwd/
└── review/
    ├── diff.patch        # unified diff (git apply-shaped)
    ├── summary.md        # human-friendly per-file walkthrough
    ├── decision.json     # { decision: 'accept' | 'reject' | 'partial', accepted_files: [...], rejected_files: [...], reviewer: 'user' | 'agent' }
    └── meta.json         # { generatedAt, atomDigest, planRevision }

The atom raises a choice GenUI surface with the three top-level decisions (accept / reject / partial). On partial the user flips per-file decisions through follow-up surfaces.

Convergence

The atom completes when decision.json has a non-empty decision. Acceptance writes handoffKind: 'patch' (or 'deployable-app' when a successful build-test is on file) into the eventual artifact manifest; rejection rolls back the patch via git restore or the equivalent in the code-import-bound repo path.

Anti-patterns the prompt fragment forbids

  • Skipping the surface and assuming acceptance.
  • Generating a decision.json that lacks accepted_files / rejected_files on partial decisions.
  • Rolling back files outside plan/steps.json's union of files[] — the patch boundary is a contract.

Status

Implemented by the daemon runner in apps/daemon/src/plugins/atoms/diff-review.ts, with GenUI decisions persisted by apps/daemon/src/plugins/atoms/diff-review-genui-bridge.ts.

常见问题

什么是“diff”?

“diff”是一份报告,展示两个版本的文件或文件集之间的差异,会标出新增、删除或修改的内容。

如果我拒绝这些修改会怎样?

如果你拒绝修改,工具会撤销这些改动,把代码恢复到修改之前的状态。

“部分接受”是什么意思?

意思是你可以逐个文件地审阅并做决定,在同一组改动中,有的接受,有的拒绝。

详情

作者的原始描述

Render the patch-edit run's accumulated changes as a reviewable diff, surface it through a GenUI choice surface, and persist the user's accept / reject decision into the artifact manifest.

repo: nexu-io/open-design

热度

GitHub 星标
101k
排名
#982
许可证
Apache-2.0
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能