code-review

code-review is a skill for Claude Code, Codex from vinvcn/mattpocock-skills-zh-CN. It costs 94 tokens per session (1,577 once invoked), scanned A, original, MIT.

A code-review skill that compares changes from a chosen commit, branch, tag, or merge-base against the repository’s coding standards and the related issue or specification.

In plain words
What is it for?
Use it to review a branch, pull request, or set of changes since a specified starting point.
Why use it?
It separates style and project-practice problems from failures to meet the requested behavior.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions subagents.

Part of the mattpocock-skills plugin — 36 skills shipped together

Good fit Use it to review a branch, pull request, or set of changes since a specified starting point.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vinvcn/mattpocock-skills-zh-cn/code-review
About the project

mattpocock-skills-zh-CN is a Simplified Chinese localization of a collection of reusable instructions for coding agents. Chinese-speaking developers use the translated skills to support engineering workflows while keeping their original commands, paths, identifiers, and behavior. The catalogue contains the localized skills, instructions, and plugin components.

vinvcn/mattpocock-skills-zh-CN · 4,114 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vinvcn/mattpocock-skills-zh-CN --skill code-review
Clone the repo
git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN

Made for: Claude Code, Codex.

Or install mattpocock-skills, the plugin that ships this one along with the rest of its 36 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/vinvcn/mattpocock-skills-zh-cn/code-review/github.svg)](https://agentmods.dev/skills/vinvcn/mattpocock-skills-zh-cn/code-review)
Your own site
<a href="https://agentmods.dev/skills/vinvcn/mattpocock-skills-zh-cn/code-review"><img src="https://agentmods.dev/badge/skills/vinvcn/mattpocock-skills-zh-cn/code-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/vinvcn/mattpocock-skills-zh-cn/code-review"><img src="https://agentmods.dev/badge/skills/vinvcn/mattpocock-skills-zh-cn/code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,577 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 30 Aug 2026
  • Snyk warn 30 Aug 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00094 $0.01577
Opus 5 $0.00047 $0.00788
Sonnet 5 $0.00019 $0.00315
Haiku 4.5 $0.00009 $0.00158

Measured 11d ago against content hash 36ef136c3863, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

code-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/engineering/code-review/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

对用户提供的 fixed point 与 HEAD 之间的 diff 做双轴 review:

  • Standards — 代码是否符合这个 repo 记录下来的 coding standards?
  • Spec — 代码是否忠实实现来源 issue / spec?

两个轴线都作为并行 sub-agents运行,避免互相污染 context;然后这个 skill 聚合它们的 findings。

Issue tracker 应该已经提供给你;如果缺少 docs/agents/issue-tracker.md,运行 /setup-matt-pocock-skills

Process

1. Pin the fixed point

用户说的任何内容都是 fixed point:commit SHA、branch name、tag、mainHEAD~5 等。如果用户没有指定,就询问。

先捕获一次 diff command:git diff <fixed-point>...HEAD(three-dot,因此比较对象是 merge-base)。同时用 git log <fixed-point>..HEAD --oneline 记录 commits 列表。

继续前,确认 fixed point 能解析(git rev-parse <fixed-point>),并且 diff 非空。错误 ref 或空 diff 应该在这里失败,而不是进入两个并行 sub-agents 后才失败。

2. Identify the spec source

按以下顺序寻找来源 spec:

  1. Commit messages 中的 issue references(#123Closes #45、GitLab !67 等)— 按 docs/agents/issue-tracker.md 中的 workflow 获取。
  2. 用户作为 argument 传入的 path。
  3. docs/specs/.scratch/ 下与 branch name 或 feature 匹配的 spec 文件。
  4. 如果什么都找不到,询问用户 spec 在哪里。如果用户说没有 spec,Spec sub-agent 跳过并报告 “no spec available”。

3. Identify the standards sources

Repo 中任何记录代码应该如何写的内容,例如 CODING_STANDARDS.mdCONTRIBUTING.md

在 repo 自己记录的 standards 之外,Standards 轴线始终带有下面的 smell baseline:一组固定的 Fowler code smells(Refactoring 第 3 章),即使 repo 没有任何约定也适用。有两条规则:

  • The repo overrides. 已记录的 repo standard 永远优先;如果它认可 baseline 会标记的东西,就压制该 smell。
  • Always a judgement call. 每个 smell 都是带 label 的 heuristic(例如 "possible Feature Envy"),不是硬性违规;和这里的其他 standard 一样,跳过 tooling 已经强制检查的内容。

每个 smell 按 what it is -> how to fix 读取,并对照 diff:

  • Mysterious Name — function、variable 或 type 的名称没有说明它做什么或装什么。-> rename it;如果找不到诚实名称,设计本身可能浑浊。
  • Duplicated Code — 同一 logic shape 出现在多个 hunk 或 file 中。-> 抽出共享形状,让两边调用。
  • Feature Envy — method 访问另一个 object 的 data 多于自己的 data。-> 把 method 移到它羡慕的数据上。
  • Data Clumps — 同几组 fields 或 params 总是一起出现。-> 包成一个 type 来传。
  • Primitive Obsession — primitive 或 string 代替了值得拥有自有 type 的 domain concept。-> 给该 concept 一个小 type。
  • Repeated Switches — 对同一 type 的相同 switch/if cascade 在改动中重复。-> 换成 polymorphism,或共享一个 map。
  • Shotgun Surgery — 一个 logical change 迫使 diff 分散修改很多文件。-> 把一起变化的东西收拢进一个 module。
  • Divergent Change — 一个 file 或 module 因多个无关原因被修改。-> 拆分,让每个 module 只因一个原因变化。
  • Speculative Generality — 为 spec 没有的需求增加 abstraction、params 或 hooks。-> 删除它,inline 回来,直到有真实需要。
  • Message Chains — caller 不该依赖的长链式导航 a.b().c().d()。-> 把这段导航藏到第一个 object 的一个 method 后面。
  • Middle Man — class 或 function 基本只是在继续委托。-> 删掉它,直接调用真实目标。
  • Refused Bequest — subclass 或 implementer 忽略或 override 了继承来的大部分内容。-> 去掉 inheritance,使用 composition。

Read the full file on GitHub · 88 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 88 lines · 94 tokens per session scan A 36ef136c3863

Subscribe to this mod's changes

code-review is a skill published in the GitHub repository vinvcn/mattpocock-skills-zh-CN (4,114 stars, last pushed 4d ago), licensed MIT. It adds 94 tokens to every session and 1,577 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.