/mattpocock:code-reviewfrom Matt Pocock Skills
Reviews code changes since a fixed point (commit, branch, tag) along two axes: Standards (repo coding conventions) and Spec (issue/PRD requirements). Runs parallel sub-agents for independent analysis.
Ships in Matt Pocock 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.
Two-axis review of the diff between HEAD and a fixed point the user supplies:
/mattpocock:bdd), those are the authoritative acceptance criteria.Both axes run as parallel sub-agents so they don't pollute each other's context, then this skill aggregates their findings. Start every sub-agent with a fresh context window.
The issue tracker should have been provided to you. If not, tell the user to run /mattpocock:setup-matt-pocock-skills.
Whatever the user said is the fixed point (a commit SHA, branch name, tag, main, HEAD~5, etc.). If they didn't specify one, ask for it.
Capture the diff command once: git diff <fixed-point>...HEAD (three-dot, so the comparison is against the merge-base). Also note the list of commits via git log <fixed-point>..HEAD --oneline.
Before going further, confirm the fixed point resolves (git rev-parse <fixed-point>) and the diff is non-empty. A bad ref or empty diff should fail here, not inside two parallel sub-agents.
Look for the originating spec, in this order:
#123, Closes #45, GitLab !67, etc.), fetched via the workflow in the tracker doc.docs/, specs/, or .scratch/ matching the branch name or feature.Search the repo for every file that documents how code should be written. When CODING_STANDARDS.md or CONTRIBUTING.md exists, it must be on the list.
On top of whatever the repo documents, the Standards axis always carries the smell baseline below: a fixed set of Fowler code smells (Refactoring, ch.3) that applies even when a repo documents nothing. Two rules bind it:
Each smell reads what it is → how to fix; match it against the diff:
switch/if-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share.a.b().c().d() navigation the caller shouldn't depend on. → hide the walk behind one method on the first object.Language-model-generated code tends to emit low-evidence, low-signal patterns regardless of language. The smell baseline's two binding rules apply unchanged: the repo overrides, and skip any pattern that tooling already enforces (for example, a repository running dedicated anti-slop lint rules). Each pattern reads what it is → how to fix it:
as/as unknown as, cast(Any, x), # type: ignore, unjustified @ts-ignore, unsafe blocks or .unwrap() standing in for real handling. → parse at the boundary or guard the type; require a written invariant justification for any suppression.unknown/any/object/interface{}/open dictionaries, or finite records degraded to open maps. → preserve the precise type end to end; widen only at an unparsed boundary.try/except: pass, redundant null checks in trusted codepaths, conditional empty-spread omission tricks, silent fallbacks. → delete the check; validate at the boundary once.data, info, obj, helper, manager, *Shape) instead of their domain meaning. → rename to the domain concept; no honest name means the design is murky.Match each pattern against the diff the same way as the smell baseline: labelled judgement calls, hard only when a documented standard forbids them, and skipped when repository tooling enforces the pattern.
Send a single message with two Agent tool calls, in the foreground, and aggregate the reports they return.
Standards sub-agent prompt should include:
Spec sub-agent prompt should include:
If the spec is missing, skip the Spec sub-agent and note this in the final report.
Present the two reports under ## Standards and ## Spec headings, verbatim or lightly cleaned. Do not merge or rerank findings, because the two axes are deliberately separate (see Why two axes).
End with a one-line summary: total findings per axis, and the worst issue within each axis (if any). Don't pick a single winner across axes: that's the reranking the separation exists to prevent.
Before calling a concurrency guard load-bearing, show a reachable interleaving using the actual public API: which operation replaces or deletes the entry, when each callback runs, and how the guard changes the observable result. A hypothetical future invalidation or replacement operation is not evidence about this candidate. If no such operation exists, describe the guard as redundant or a deliberate readability preference, not as a verified race fix. Apply the same standard to other causal claims: distinguish an observed failure, a source-supported possibility, and an untested hypothesis. Green tests alone do not prove the explanation.
A judgement call changes confidence, not the verdict: once the report identifies an unresolved smell, Standards is REWORK even if no lint rule prohibits it. If current evidence shows the candidate is not a smell, explain that refutation and remove it from the findings; naming it a deliberate preference or a safeguard for a hypothetical future API does not resolve it. Do not let a necessary rejection handler justify a separate redundant identity guard by association.
Before scoring, load the project's known traps: Glob docs/memory/*.md, then read every file whose frontmatter category is pitfall or convention and whose summary is topically related to this review (the diff's files, patterns, or stack). These are evaluator-verified failure modes this repo already paid for.
In step 5.5's Standards scoring, treat a read memory file as a red flag: if the diff exhibits a known pitfall, record it as a FAIL in the Standards report with evidence citing the memory file (docs/memory/pitfall_<slug>.md). If docs/memory/ does not exist, skip this step.
After presenting the two reports, emit a binary verdict per axis:
Refute-before-PASS (red-team protocol): Before assigning PASS to either axis, attempt to refute your own PASS:
A PASS without an attempted refutation is invalid — downgrade to REWORK and list the un-refuted risk.
Final verdict: REWORK if either axis is REWORK; PASS only if both axes PASS (post-refutation).
A PASS without an attempted refutation is invalid. Before assigning PASS to either axis, state the strongest reason the work might still fail, cite the evidence (diff hunk or missing scenario) that would confirm it, and hold PASS only when concrete contrary evidence refutes it. Never merge or rerank the two axes — the separation exists to stop one axis masking the other.
A change can pass one axis and fail the other:
Reporting them separately stops one axis from masking the other.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fradser/dotclaude --plugin mattpocock50 skills in this plugin
/ask-mattRecommends the skill or flow that fits the user's situation. A router over the skills in this repo. Use when the user asks which skill to use, is unsure what fits, or needs a pointer to the right workflow./batch-grill-meRuns a relentless interview that asks every frontier question at once, round by round. Use when the user wants to be grilled on a design or map a design tree./bddBehavior-driven development: Discovery → Formulation → Automation. Use when the user wants to build features or fix bugs via Gherkin scenarios and the BDD lifecycle, or mentions BDD/Gherkin/Executable Specifications. Delegates test implementation to /mattpocock:tdd./chief-of-staffPursue a long-running goal in one session by co-ordinating subagents and a durable wiki. Use when the user wants a chief-of-staff agent to own a long-running goal across subagent sessions./claude-handoffHands the current conversation to a fresh background agent that picks up the work immediately. Use when the user wants the work continued by a background agent./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.Other plugins' skills for the same job