code-review-zh

code-review-zh is a skill for Claude Code, Codex from gongyijie85/mattpocock-skills-dsh-zh. It costs 109 tokens per session (1,843 once invoked), scanned A, original, MIT.

A Git-based code review workflow that compares changes from a chosen commit, branch, tag, or merge point. It checks both whether the code follows the repository's written standards and whether it implements the requested specification.

In plain words
What is it for?
Use it to review a branch or pull request, find problems in the changed code, compare it with an issue or specification, and report missing standards or requirements.
Why use it?
It separates style and maintainability concerns from the question of whether the requested behaviour was delivered. It also catches invalid references, empty changes, or missing source documents before review.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to review a branch or pull request, find problems in the changed code, compare it with an issue or specification, and report missing standards or requirements.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gongyijie85/mattpocock-skills-dsh-zh/code-review-zh
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 gongyijie85/mattpocock-skills-dsh-zh --skill code-review-zh
Clone the repo
git clone --depth 1 https://github.com/gongyijie85/mattpocock-skills-dsh-zh

Made for: Claude Code, Codex.

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-zh

README.md
[![agentmods](https://agentmods.dev/badge/skills/gongyijie85/mattpocock-skills-dsh-zh/code-review-zh/github.svg)](https://agentmods.dev/skills/gongyijie85/mattpocock-skills-dsh-zh/code-review-zh)
Your own site
<a href="https://agentmods.dev/skills/gongyijie85/mattpocock-skills-dsh-zh/code-review-zh"><img src="https://agentmods.dev/badge/skills/gongyijie85/mattpocock-skills-dsh-zh/code-review-zh/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-zh

Your own site · 80×15
<a href="https://agentmods.dev/skills/gongyijie85/mattpocock-skills-dsh-zh/code-review-zh"><img src="https://agentmods.dev/badge/skills/gongyijie85/mattpocock-skills-dsh-zh/code-review-zh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,843 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.
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.00109 $0.01843
Opus 5 $0.00055 $0.00922
Sonnet 5 $0.00022 $0.00369
Haiku 4.5 $0.00011 $0.00184

Measured yesterday against content hash 222c4f4a2f85, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

code-review-zh 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 yesterday.

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/code-review-zh/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.

HEAD 与用户提供的固定点之间的 diff 进行双轴审查:

  • Standards(标准) — 代码是否符合本仓库文档化的 coding standards?
  • Spec(规格) — 代码是否忠实地实现了原始的 issue / spec?

两个轴都以并行 sub-agents 运行,这样它们不会污染彼此的上下文,然后本 skill 汇总它们的发现。

issue tracker 应该已经提供给你。如果缺少 docs/agents/issue-tracker.md,告诉用户运行 setup-matt-pocock-skills

流程

1. 固定参照点

用户所说的就是固定点 — commit SHA、分支名、tag、mainHEAD~5 等。如果他们没有指定,就问他们要。

一次性确定 diff 命令:git diff <fixed-point>...HEAD(三个点,因此比较是针对 merge-base 进行的)。另外通过 git log <fixed-point>..HEAD --oneline 记下 commit 列表。

在继续之前,确认固定点可以解析(git rev-parse <fixed-point>)且 diff 非空。错误的 ref 或空的 diff 应该在这里就失败 — 而不是在两个并行的 sub-agents 内部。

2. 确定 spec 来源

按以下顺序寻找原始 spec:

  1. commit message 中的 issue 引用(#123Closes #45、GitLab !67 等) — 通过 docs/agents/issue-tracker.md 中的工作流获取。
  2. 用户作为参数传入的路径。
  3. docs/specs/.scratch/ 下与分支名或 feature 匹配的 spec 文件。
  4. 如果什么都没找到,问用户 spec 在哪里。如果他们说没有,Spec sub-agent 将跳过并报告 "no spec available"。

3. 确定 standards 来源

仓库中任何记录了代码应该如何编写的文件,例如 CODING_STANDARDS.mdCONTRIBUTING.md

在仓库自身文档之上,Standards 轴始终携带下面的 smell baseline(坏味道基线) — 一组固定的 Fowler code smells(Refactoring 第 3 章),即使仓库没有任何文档也适用。有两条规则约束它:

  • 仓库优先(Repo overrides)。 文档化的仓库标准永远胜出;当它认可基线会标记的东西时,抑制该 smell。
  • 始终是判断问题。 每个 smell 都是一个带标签的启发式("possible Feature Envy"),绝不是硬性违规 — 而且和这里的任何标准一样,跳过工具已经强制检查的内容。

每个 smell 都按 它是什么如何修复 来阅读;把它与 diff 进行匹配:

  • Mysterious Name(神秘命名) — 函数、变量或类型的名字无法揭示它的作用或内容。→ 重命名它;如果想不出诚实的名字,说明设计本身很模糊。
  • Duplicated Code(重复代码) — 相同的逻辑形态出现在变更中的多个 hunk 或文件中。→ 提取共享形态,从两处调用它。
  • Feature Envy(依恋情结) — 方法访问另一个对象的数据多于自己的数据。→ 把方法移到它羡慕的数据所在的类上。
  • Data Clumps(数据泥团) — 同样的几个字段或参数总是结伴而行(一个等待诞生的类型)。→ 把它们打包成一个类型,传递那个类型。
  • Primitive Obsession(基本类型偏执) — 用基本类型或字符串代替本应拥有自己类型的 domain 概念。→ 给这个概念一个自己的小类型。
  • Repeated Switches(重复的 switch) — 对同一类型的相同 switch/if 级联在整个变更中反复出现。→ 用多态替换,或用两处共享的一张 map。
  • Shotgun Surgery(霰弹式修改) — 一个逻辑变更迫使 diff 中许多文件发生零散的修改。→ 把一起变化的东西集中到一个 module 中。
  • Divergent Change(发散式变化) — 一个文件或 module 因多个不相关的原因被修改。→ 拆分,让每个 module 只为一个原因变化。
  • Speculative Generality(臆测式泛化) — 为 spec 并不需要的需求添加的抽象、参数或 hooks。→ 删除它;内联回来,直到真正的需求出现。
  • Message Chains(消息链) — 长的 a.b().c().d() 导航,调用者本不应依赖它。→ 把遍历隐藏在第一个对象的一个方法后面。
  • Middle Man(中间人) — 一个主要只是向下转发的类或函数。→ 砍掉它,直接调用真正的目标。
  • Refused Bequest(被拒的遗产) — 一个忽略或重写大部分继承内容的子类或实现者。→ 放弃继承,改用组合。

Read the full file on GitHub · 88 lines

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. yesterday First seen · 88 lines · 109 tokens per session scan A 222c4f4a2f85

Subscribe to this mod's changes

code-review-zh is a skill published in the GitHub repository gongyijie85/mattpocock-skills-dsh-zh (5 stars, last pushed 2d ago), licensed MIT. It adds 109 tokens to every session and 1,843 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-09-11.

Related

Other skills, from other repositories