/mattpocock-skills:code-reviewfrom mattpocock-skills
Reviews code changes from a fixed point (commit, branch, tag, or merge-base) against two axes: coding standards and spec compliance. Runs parallel sub-agents for each axis and aggregates findings.
Ships in mattpocock-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
对用户提供的 fixed point 与 HEAD 之间的 diff 做双轴 review:
两个轴线都作为并行 sub-agents运行,避免互相污染 context;然后这个 skill 聚合它们的 findings。每个 sub-agent 都要使用全新的 context window 启动。
Issue tracker 应该已经提供给你;如果没有,请让用户运行 /setup-matt-pocock-skills。
用户说的任何内容都是 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 后才失败。
按以下顺序寻找来源 spec:
#123、Closes #45、GitLab !67 等),按 tracker doc 中的 workflow 获取。docs/、specs/ 或 .scratch/ 下与 branch name 或 feature 匹配的 spec 文件。搜索 repo 中所有记录代码应该如何写的文件。当 CODING_STANDARDS.md 或 CONTRIBUTING.md 存在时,必须列入清单。
在 repo 自己记录的 standards 之外,Standards 轴线始终带有下面的 smell baseline:一组固定的 Fowler code smells(Refactoring 第 3 章),即使 repo 没有任何约定也适用。有两条规则:
每个 smell 按 what it is -> how to fix 读取,并对照 diff:
switch/if cascade 在改动中重复。-> 换成 polymorphism,或共享一个 map。a.b().c().d()。-> 把这段导航藏到第一个 object 的一个 method 后面。把两个 sub-agent 调用一起发出,在前台运行,并聚合它们返回的报告。
Standards sub-agent prompt 包含:
Spec sub-agent prompt 包含:
如果缺少 spec,跳过 Spec sub-agent,并在最终报告中说明。
在 ## Standards 和 ## Spec headings 下展示两个 reports,可原样或轻微清理。不要合并或重新排序 findings;这两个轴线刻意保持分离(见 为什么是两条轴线)。
最后用一行总结:每个轴线的 findings 总数,以及每个轴线内最严重的问题(如果有)。不要跨轴线选一个总冠军;分离就是为了避免这种 reranking。
一个变更可能通过其中一个轴线,但失败在另一个轴线:
分开报告能避免一个轴线掩盖另一个轴线。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub vinvcn/mattpocock-skills-zh-cn --plugin mattpocock-skills38 skills in this plugin
/ask-matt询问当前情境适合哪个技能或流程;它是本仓库所有 skills 的路由器。/chief-of-staff在单个 session 中通过协调 subagents 来推进一个长期目标。/claude-handoff把当前对话交接给一个全新的 background agent,让它立即接手工作。/codebase-design用于设计深模块的共享词汇。适用于用户想设计或改进模块接口、寻找深化机会、决定 seam 放在哪里、让代码更容易测试或更适合 AI 导航,或其他技能需要深模块词汇时。/diagnosing-bugs面向棘手缺陷和性能回退的诊断循环。适用于用户说 “diagnose” / “debug this”,或报告某些东西 broken、throwing、failing、slow 时。/domain-modeling构建并打磨项目的领域模型。适用于讨论 codebase 术语、编写或编辑 GLOSSARY.md,或记录或编辑 ADR。Other plugins' skills for the same job