Agent skill

Code Review

by vinvcn in vinvcn/mattpocock-skills-zh-CN

从固定点(commit、branch、tag 或 merge-base)开始,按 Standards(代码是否符合本仓库记录的编码标准?)和 Spec(代码是否符合来源 issue/spec 的要求?)两个轴线审查变更。两个审查会在并行子代理中运行,并并排报告。适用于用户想审查 branch、PR、进行中的变更,或要求“review since X”时。

MITAuto-check passedDevelopment

Install Code Review

skills CLI
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill code-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vinvcn/mattpocock-skills-zh-CN code-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/engineering/code-review .claude/skills/code-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-review
GitHub stars
4.7k
Token cost
~1.1k tokens
SKILL.md length
496 words
Files
2
Skills in repo
33
Repo updated
First seen
Licence
MIT

At a glance

从固定点(commit、branch、tag 或 merge-base)开始,按 Standards(代码是否符合本仓库记录的编码标准?)和 Spec(代码是否符合来源 issue/spec 的要求?)两个轴线审查变更。两个审查会在并行子代理中运行,并并排报告。适用于用户想审查 branch、PR、进行中的变更,或要求“review since X”时。

  • Works in 5 steps: Pin the fixed point → Identify the spec source → Identify the standards sources → …
  • Tasks that involve Pull requests
  • SKILL.md covers Process and Why two axes
  • Calls git

What it does

Code Review is an agent skill from vinvcn/mattpocock-skills-zh-CN. 从固定点(commit、branch、tag 或 merge-base)开始,按 Standards(代码是否符合本仓库记录的编码标准?)和 Spec(代码是否符合来源 issue/spec 的要求?)两个轴线审查变更。两个审查会在并行子代理中运行,并并排报告。适用于用户想审查 branch、PR、进行中的变更,或要求“review since X”时。

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Development, covering Pull requests, Code review and Subagents. It works with Git. The repository describes itself as: 这是 mattpocock/skills 的简体中文本地化版本。 The licence is MIT.

When your agent uses it

  • Tasks that involve Pull requests
  • Tasks that involve Code review
  • Tasks that involve Subagents

Example prompts

  • “review since X”
  • “/code-review”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Pin the fixed point
  2. Identify the spec source
  3. Identify the standards sources
  4. Spawn both sub-agents in parallel
  5. Aggregate

What it can do on your machine

Read from SKILL.md and the folder at commit 3f92a83. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Review loads about 1.1k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 496 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vinvcn/mattpocock-skills-zh-CN at commit 3f92a83, republished under its MIT licence (© vinvcn). 496 words, ~1,078 tokens.

Download SKILL.mdSave it as .claude/skills/code-review/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
code-review
description
从固定点(commit、branch、tag 或 merge-base)开始,按 Standards(代码是否符合本仓库记录的编码标准?)和 Spec(代码是否符合来源 issue/spec 的要求?)两个轴线审查变更。两个审查会在并行子代理中运行,并并排报告。适用于用户想审查 branch、PR、进行中的变更,或要求“review since X”时。

对用户提供的 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、main、HEAD~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(#123、Closes #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.md 或 CONTRIBUTING.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。
Show full SKILL.md (191 more words)Show less
4. Spawn both sub-agents in parallel

Standards sub-agent prompt — 包含:

  • 完整 diff command 和 commit list。
  • Step 3 中找到的 standards-source files 列表,以及 Step 3 的 smell baseline 全文;sub-agent 没有其他方式读取它。
  • 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 — 包含:

  • Diff command 和 commit list。
  • Spec 的 path 或已获取内容。
  • 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."

如果缺少 spec,跳过 Spec sub-agent,并在最终报告中说明。

5. Aggregate

在 ## Standards 和 ## Spec headings 下展示两个 reports,可原样或轻微清理。不要合并或重新排序 findings;这两个轴线刻意保持分离(见 Why two axes)。

最后用一行总结:每个轴线的 findings 总数,以及每个轴线内最严重的问题(如果有)。不要跨轴线选一个总冠军;分离就是为了避免这种 reranking。

Why two axes

一个变更可能通过其中一个轴线,但失败在另一个轴线:

  • 代码符合所有 standard,但实现了错误的东西 -> Standards pass, Spec fail.
  • 代码完全符合 issue 要求,但破坏了项目约定 -> Spec pass, Standards fail.

分开报告能避免一个轴线掩盖另一个轴线。

© vinvcn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/engineering/code-review of vinvcn/mattpocock-skills-zh-CN.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 3f92a83

Compare with similar skills

Code Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Review this skillvinvcn/mattpocock-skills-zh-CN4.7k—~1.1kAutomated safety check: PassMIT
Parallel Specialist PR Reviewposhan0126/dotclaude871—~1.7kAutomated safety check: PassMIT
Aif Reviewunxed/f4241—~3.3kAutomated safety check: PassBSD-3-Clause
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
GitHub Review Iterationprisma/orm48k—~2.2kAutomated safety check: PassApache-2.0

Similar skills

  • Parallel Specialist PR Review

    poshan0126/dotclaude

    Reviews a pull request, staged changes or a file by sending the diff to specialist reviewer agents in parallel, then merges their findings into one compact report.

    871 GitHub stars~1.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Aif Review

    unxed/f4

    Perform code review on staged changes or a pull request. An agent skill from unxed/f4.

    241 GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Official

    Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.

    48k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Review

    flutter/flutter

    Performs a comprehensive, multi-step code review of pull requests or local code changes, using iterative refinement (generation, critique, synthesis) to ensure high-quality, actionable feedback.

    179k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed

More from vinvcn/mattpocock-skills-zh-CN

All 33 skills in this repo
  • Git Guardrails Claude Code

    vinvcn/mattpocock-skills-zh-CN

    设置 Claude Code hooks,在危险 git commands(push、reset --hard、clean、branch -D 等)执行前阻止它们。适用于用户想防止破坏性 git 操作、添加 git safety hooks,或在 Claude Code 中阻止 git push/reset 时。

    4.7k GitHub stars~474 tokensUpdated 9 days ago
    Auto-check passed
  • Codebase Design

    vinvcn/mattpocock-skills-zh-CN

    用于设计深模块的共享词汇。适用于用户想设计或改进模块接口、寻找深化机会、决定 seam 放在哪里、让代码更容易测试或更适合 AI 导航,或其他技能需要深模块词汇时。

    4.7k GitHub stars~1.1k tokensUpdated 9 days ago
    Auto-check passed
  • Diagnosing Bugs

    vinvcn/mattpocock-skills-zh-CN

    面向棘手缺陷和性能回退的诊断循环。适用于用户说 “diagnose” / “debug this”,或报告某些东西 broken、throwing、failing、slow 时。

    4.7k GitHub stars~1.4k tokensUpdated 9 days ago
    Auto-check passed
  • Domain Modeling

    vinvcn/mattpocock-skills-zh-CN

    构建并打磨项目的领域模型。适用于讨论 codebase 术语、编写或编辑 CONTEXT.md,或记录或编辑 ADR. An agent skill from vinvcn/mattpocock-skills-zh-CN.

    4.7k GitHub stars~505 tokensUpdated 9 days ago
    Auto-check passed
  • Migrate To Shoehorn

    vinvcn/mattpocock-skills-zh-CN

    将测试文件从 as 类型断言迁移到 @total-typescript/shoehorn。适用于用户提到 shoehorn、想替换测试中的 as,或需要局部测试数据时。

    4.7k GitHub stars~619 tokensUpdated 9 days ago
    Auto-check passed
  • PR

    vinvcn/mattpocock-skills-zh-CN

    用于撰写 PR 正文。适用于用户要求起草、改写或改进 PR 正文,或希望 PR 更便于审阅时. An agent skill from vinvcn/mattpocock-skills-zh-CN.

    4.7k GitHub stars~737 tokensUpdated 9 days ago
    Auto-check passed

Works with

Categories

Questions about Code Review

What does Code Review do?

从固定点(commit、branch、tag 或 merge-base)开始,按 Standards(代码是否符合本仓库记录的编码标准?)和 Spec(代码是否符合来源 issue/spec 的要求?)两个轴线审查变更。两个审查会在并行子代理中运行,并并排报告。适用于用户想审查 branch、PR、进行中的变更,或要求“review since X”时。. Code Review is an agent skill from vinvcn/mattpocock-skills-zh-CN.

When should I use Code Review?

Code Review fits situations like: tasks that involve Pull requests; tasks that involve Code review; tasks that involve Subagents.

How do I install Code Review in Claude Code?

Run `npx skills add vinvcn/mattpocock-skills-zh-CN --skill code-review -a claude-code`. Or copy the skill folder (skills/engineering/code-review in vinvcn/mattpocock-skills-zh-CN) into .claude/skills/code-review in your project. Claude Code loads it when a task matches its description.

How do I install Code Review in Codex?

Run `npx skills add vinvcn/mattpocock-skills-zh-CN --skill code-review -a codex`. Or copy the skill folder (skills/engineering/code-review in vinvcn/mattpocock-skills-zh-CN) into .agents/skills/code-review in your project. Codex loads it when a task matches its description.

Can I use Code Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vinvcn/mattpocock-skills-zh-CN --skill code-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-review, .gemini/skills/code-review, .github/skills/code-review and .opencode/skills/code-review in your project.

What does Code Review need to run?

Going by SKILL.md and its folder, Code Review needs the command-line tools its instructions call (git).

Does Code Review access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Review use?

Code Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Review use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Review?

Skills that share tags, products or a category with Code Review: Parallel Specialist PR Review (poshan0126/dotclaude, 871 stars), Aif Review (unxed/f4, 241 stars), Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars) and Open Code Review CLI (alibaba/open-code-review, 44k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Review?

vinvcn (a GitHub user) maintains it in vinvcn/mattpocock-skills-zh-CN, which has 4,657 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on September 28, 2026.

Source: vinvcn/mattpocock-skills-zh-CN on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.