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.
npx skills add gongyijie85/mattpocock-skills-dsh-zh --skill code-review-zhgit clone --depth 1 https://github.com/gongyijie85/mattpocock-skills-dsh-zhWrote 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.
[](https://agentmods.dev/skills/gongyijie85/mattpocock-skills-dsh-zh/code-review-zh)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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、main、HEAD~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:
- commit message 中的 issue 引用(
#123、Closes #45、GitLab!67等) — 通过docs/agents/issue-tracker.md中的工作流获取。 - 用户作为参数传入的路径。
docs/、specs/或.scratch/下与分支名或 feature 匹配的 spec 文件。- 如果什么都没找到,问用户 spec 在哪里。如果他们说没有,Spec sub-agent 将跳过并报告 "no spec available"。
3. 确定 standards 来源
仓库中任何记录了代码应该如何编写的文件,例如 CODING_STANDARDS.md 或 CONTRIBUTING.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(被拒的遗产) — 一个忽略或重写大部分继承内容的子类或实现者。→ 放弃继承,改用组合。
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.
- yesterday First seen · 88 lines · 109 tokens per session scan A 222c4f4a2f85
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.
Other skills, from other repositories
github-publish-changes
Publish intentional local changes by confirming scope, creating a branch when needed, staging selected files, committing, pushing, and creating a Draft Pull Request through the connected GitHub service.
commit-message
Guidance for writing Git commit messages using Conventional Commits, a common format such as fix, feat, or docs followed by a short description. It focuses on explaining why a change was made.
dsh-git-commit
A Git commit guide for writing standardised commit messages and performing basic checks before committing code. Git commits are saved checkpoints in a project’s history.
market-pre-push-checks
Use before pushing, merging, or claiming a green tree in dsh-agent-plugins-market, to select the smallest checks that cover the outgoing diff instead of reflexively running the full suite.
git-workflow
Git workflow patterns including branching strategies, commit conventions, merge vs rebase, conflict resolution, and collaborative development best practices for teams of all sizes. Use when choosing a branching strategy, writing commit conventions, deciding merge versus rebase, or resolving conflicts.
commit
Use when starting implementation work on a task, or when the user asks you to commit changes to the repository.