code-review 是什么?
固定一个Git比较基点,让两个独立上下文Agent分别审查代码规范与原需求兑现情况,最后分开呈现结果。规范做对并不代表需求实现对,因此它不把两种检查揉成单一结论。
中文说明由本站依据来源整理;英文原文保留在页面下方。
同名项目,请核对仓库和目录
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
code-review,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 code-review
请在 Codex 的当前工作环境中安装并检查 code-review 这个 Skill。
项目身份:mattpocock/skills / code-review
来源:https://github.com/mattpocock/skills/blob/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/engineering/code-review/SKILL.md
已定位的源文件:skills/engineering/code-review/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 code-review
请在 Claude Code 的当前工作环境中安装并检查 code-review 这个 Skill。
项目身份:mattpocock/skills / code-review
来源:https://github.com/mattpocock/skills/blob/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/engineering/code-review/SKILL.md
已定位的源文件:skills/engineering/code-review/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 code-review
请在 Cursor Agent 的当前工作环境中安装并检查 code-review 这个 Skill。
项目身份:mattpocock/skills / code-review
来源:https://github.com/mattpocock/skills/blob/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/engineering/code-review/SKILL.md
已定位的源文件:skills/engineering/code-review/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 code-review
请在 当前 Agent 的当前工作环境中安装并检查 code-review 这个 Skill。
项目身份:mattpocock/skills / code-review
来源:https://github.com/mattpocock/skills/blob/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/engineering/code-review/SKILL.md
已定位的源文件:skills/engineering/code-review/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 提供可解析的commit、分支、tag或merge-base参照,以及来源需求或工单;需要可访问Git历史和并行子Agent。
会得到什么
- 规范和需求两份独立评审结果、各自发现数及最严重问题。
实际使用顺序
- 先解析基点并检查 git diff <fixed-point>...HEAD 非空,同时记录相关提交;无效ref或空差异先结束核对。
- 从提交工单引用、指定路径或匹配分支的规格寻找需求;确实没有规格时明确跳过Spec轴。
- 收集仓库编码标准,让一个Agent查标准与代码气味,另一个查漏实现、范围扩张和错误兑现,二者独立阅读。
- 分别呈现Standards与Spec发现,代码气味标为判断线索而非绝对违规;仓库明确规则优先,不给两种结果混排总分。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
教学示例:请用code-review评审feature/chinese-search相对main的已提交差异,需求在docs/specs/chinese-search.md。先确认基点和非空差异,再并行检查仓库标准与规格兑现,分两份报告,指出文件证据,不修改代码。预期得到可追溯到差异与规格的两轴发现;本例未运行,不能把未执行的测试写成通过。
使用条件与边界
- 三点diff以merge-base为参照;它不等同随意比较两个工作目录,也不会自动包含未提交改动。
- 代码气味是启发式判断,不能无视仓库约定或把机器已检查的内容重复当人工发现。
常见问题
没有规格还能审吗?
可以进行规范轴,但Spec轴应明确写无可用规格,不能用猜出的需求宣布需求已满足。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
skills/engineering/code-review/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".
查看源文件章节 / Source sections
- 原文:Process
- 原文:1. Pin the fixed point
- 原文:2. Identify the spec source
- 原文:3. Identify the standards sources
- 原文:4. Spawn both sub-agents in parallel
- 原文:5. Aggregate
- 原文:Why two axes
原文:正文开头
Two-axis review of the diff between `HEAD` and a fixed point the user supplies: - **Standards**: does the code conform to this repo's documented coding standards? - **Spec**: does the code faithfully implement the originating issue / spec? Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings. Start every sub-agent with a fresh context window. The issue tracker should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
原文:1. Pin the fixed point
Whatever the user said is the fixed point (a commit SHA, branch name, tag, `main`, `HEAD~5`, etc.). If they didn't specify one, ask for it. Capture the diff command once: `git diff <fixed-point>...HEAD` (three-dot, so the comparison is against the merge-base). Also note the list of commits via `git log <fixed-point>..HEAD --oneline`. Before going further, confirm the fixed point resolves (`git rev-parse <fixed-point>`) and the diff is non-empty. A bad ref or empty diff should fail here, not inside two parallel sub-agents.
原文:2. Identify the spec source
Look for the originating spec, in this order: 1. Issue references in the commit messages (`#123`, `Closes #45`, GitLab `!67`, etc.), fetched via the workflow in the tracker doc. 2. A path the user passed as an argument. 3. A spec file under `docs/`, `specs/`, or `.scratch/` matching the branch name or feature. 4. If nothing is found, ask the user where the spec is. If they say there isn't one, the **Spec** sub-agent will skip and report "no spec available".
原文:3. Identify the standards sources
Search the repo for every file that documents how code should be written. When `CODING_STANDARDS.md` or `CONTRIBUTING.md` exists, it must be on the list. On top of whatever the repo documents, the Standards axis always carries the **smell baseline** below: a fixed set of Fowler code smells (_Refactoring_, ch.3) that applies even when a repo documents nothing. Two rules bind it: - **The repo overrides.** A documented repo standard always wins; where it endorses something the baseline would flag, suppress the smell. - **Always a judgement call.** Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation. Like any standard here, skip anything tooling already enforces. Each smell reads *what it is* → *how to fix*; match it against the diff:
本段为节选,完整内容见源文件。
原文:4. Spawn both sub-agents in parallel
Issue both sub-agent calls together, in the foreground, and aggregate the reports they return. **Standards sub-agent prompt** should include: - The full diff command and commit list. - The list of standards-source files you found in step 3, **plus the smell baseline from step 3** pasted in full (the sub-agent has no other access to it). - The brief: "Report, per file/hunk where relevant, (a) every place the diff violates a documented standard: cite the standard (file + the rule); and (b) any baseline smell you spot: name it and quote the hunk. Distinguish hard violations from judgement calls: documented-standard breaches can be hard, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words." **Spec sub-agent prompt** should include: - The diff command and commit list. - The path or fetched contents of the spec. - The brief: "Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words." If the spec is missing, skip the Spec sub-agent and note this in the final report.
原文:5. Aggregate
Present the two reports under `## Standards` and `## Spec` headings, verbatim or lightly cleaned. Do **not** merge or rerank findings, because the two axes are deliberately separate (see _Why two axes_). End with a one-line summary: total findings per axis, and the worst issue _within each axis_ (if any). Don't pick a single winner across axes: that's the reranking the separation exists to prevent.
文件 SHA256:9c921a8d88138a41401d8897ca1bb852088ab1b7b605cdd04edc13e3e8aab6dd
仓库许可证记录:MIT;repository-license-recorded-scope-unverified,查看来源。
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding…
这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。
历史收录数据
| Skill标识 | code-review |
|---|---|
| 来源仓库 | mattpocock/skills |
| 榜单快照 | 2026-07-28 |
| 榜单口径 | Skills.sh累计安装量 |
| 快照名次 | 121 |
| 快照累计安装量 | 195725 |
历史资料说明
- 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
- 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。
此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。
