/mattpocock-skills:code-reviewfrom mattpocock-skills
Reviews code changes from a fixed base point along two axes: standards compliance and spec fidelity. Runs parallel sub-agents for each axis and reports side by side.
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.
对 HEAD 与用户提供的某个固定基点之间的 diff 做双轴审查:
两条轴都作为并行子 agent运行,这样它们不会污染彼此的上下文,然后本技能汇总它们的发现。
工单跟踪器应当已经提供给你——如果 docs/agents/issue-tracker.md 缺失,运行 /setup-matt-pocock-skills。
用户说的就是固定基点——一个 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 应该在这里失败——而不是在两个并行子 agent 内部失败。
按以下顺序寻找源头规格:
#123、Closes #45、GitLab !67 等)——通过 docs/agents/issue-tracker.md 中的工作流获取。docs/、specs/ 或 .scratch/ 下与分支名或功能匹配的规格文件。仓库里任何记录了代码应当如何编写的东西,比如 CODING_STANDARDS.md 或 CONTRIBUTING.md。
除了仓库记录的东西之外,标准轴始终携带下面这套坏味道基线——一组固定的 Fowler 代码坏味道(《重构》,第 3 章),即便一个仓库什么都没记录也适用。有两条规则约束它:
每条坏味道读作它是什么 → 如何修;把它对照 diff 来匹配:
switch/if 级联针对同一类型在这次改动中反复出现。→ 用多态替换,或用两处共享的一个映射表。a.b().c().d() 导航。→ 把这段游走藏在第一个对象上的一个方法后面。标准子 agent 提示词 — 需包含:
规格子 agent 提示词 — 需包含:
如果规格缺失,跳过规格子 agent,并在最终报告中注明这一点。
把两份报告放在 ## Standards 和 ## Spec 标题下呈现,逐字或稍作清理。不要合并或重新排序发现——两条轴是有意分开的(见「为什么分两条轴」)。
以一行摘要收尾:每条轴的发现总数,以及每条轴内最严重的问题(若有)。不要跨轴挑出一个单一的赢家——那正是这种分离所要防止的重新排序。
一个改动可以通过一条轴而在另一条上失败:
分开报告它们,可以阻止一条轴掩盖另一条。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (wenwuzhidao/mattpocock-skills-zh) — no native marketplace selected
npx claudepluginhub p/wenwuzhidao-mattpocock-skills35 skills in this plugin
/diagnosing-bugs针对疑难 bug 和性能回归的诊断循环。当用户说「诊断」/「调试这个」,或报告某个东西坏了/抛异常/失败/变慢时使用。Other plugins' skills for the same job