Code Review skill (Matt Pocock)
Review a branch on two separate axes, your repo's coding standards and the original spec, with one sub-agent each, reported side by side.
Community · Matt Pocock| Author | Matt Pocock |
|---|---|
| Licence | MIT |
| Source | mattpocock/skills · SKILL.md on GitHub |
| Project website | www.aihero.dev/skills-code-review |
| Works in | Claude Code · Codex, Gemini CLI, Cursor, Copilot |
| Read from the source on |
The code-review skill reviews everything that changed since a point you name, such as main, a tag or a commit, along two axes kept apart on purpose: does the code follow this repo's standards, and does it do what the issue or spec asked.
Each axis runs in its own sub-agent with a fresh context, and the two reports come back under separate headings without being merged or re-ranked. It is part of Matt Pocock's engineering skills.
From the skill's SKILL.md: Reporting them separately stops one axis from masking the other.
What it does
- Pin the fixed point, check that it exists and that the diff is not empty.
- Find the spec from issue numbers in the commits, a path you give, or a file under docs or specs, and ask you if there is none.
- Collect the repo's coding standards, always including CODING_STANDARDS.md or CONTRIBUTING.md when present.
- Run a Standards sub-agent and a Spec sub-agent in parallel, each limited to a short report.
- Show both reports with a one-line summary of the worst issue in each.
What you get
- A Standards report: broken documented rules, with the rule cited, and possible code smells marked as judgement calls.
- A Spec report: missing or partial requirements, unrequested behaviour and requirements that look wrongly implemented, each with the spec line quoted.
When to use it
- Review a branch or pull request before merging, against the issue it closes.
- Check work in progress since a commit, with your own house rules taking priority.
When not to use it
- A diff with no spec and no written standards, where only the generic smell list would apply.
What it needs
- A git repository and an agent that can run sub-agents in parallel, such as Claude Code.
- Access to your issue tracker if specs live there: the skill expects setup-matt-pocock-skills to have configured it.
Files in the skill
| File or folder | What it is for |
|---|---|
SKILL.md | The five-step process, both sub-agent briefs and the twelve-smell baseline. |
Licence as found in the repository on 2026-11-22: MIT.
Example prompts
Type one of these after installing; naming the skill makes sure it is used.
- Review everything on this branch since main.
- Review since v2.3.0 against issue #142.
- Review my uncommitted changes against docs/specs/export.md.
How to install code-review
Run the setup skill first
The skill reads specs from your issue tracker through a workflow that setup-matt-pocock-skills writes into the repository. Install that skill too and run it once per repo; the plugin includes both. Review the files it creates.
The plugin installs all 27 of the author's skills. If you copy folders instead, copy setup-matt-pocock-skills next to this one. Use one route per agent, or every skill appears twice.
A skill is a folder with a SKILL.md file. You install it once; the agent reads its short description at the start of each session and loads the full instructions only when a request matches. Pick the place you use:
Claude Code: from the plugin marketplace
- Start Claude Code in a terminal with
claude. - This plugin is in Anthropic's official marketplace, which Claude Code adds for you the first time you start it.
- Install the plugin. Claude Code opens its details first: check what it will add (skills, hooks, MCP servers), then choose whether it is for you, for everyone on this repository, or for you in this repository only.
/plugin install mattpocock-skills@claude-plugins-official - Type / and look for
/mattpocock-skills:code-review, or simply ask for the task.
From your shell instead of a session:
claude plugin install mattpocock-skills@claude-plugins-officialThe plugin installs as a whole, so other skills come with it, including ask-matt, diagnosing-bugs, grill-with-docs, triage, improve-codebase-architecture, setup-matt-pocock-skills, tdd, to-spec, to-tickets, wayfinder, implement, implement-spec, prototype, research, domain-modeling, codebase-design, pr, retro, wizard, grill-me, grilling, handoff, teach, to-questionnaire, wait-what, writing-for-agents.
Claude Code: copy the folder into your skills folder
Put the skill's folder in ~/.claude/skills/ to use it in every project on this computer, or in .claude/skills/ inside a repository to share it with everyone who works there (commit it).
git clone --depth 1 https://github.com/mattpocock/skills.git
mkdir -p ~/.claude/skills
cp -R skills/skills/engineering/code-review ~/.claude/skills/
cp -R skills/skills/engineering/setup-matt-pocock-skills ~/.claude/skills/Claude Code notices new or changed skills in these folders during the session. If the skills folder did not exist when the session started, run /reload-skills once. Then type /code-review or just describe the task.
On Windows, run the commands in Git Bash or WSL, or copy the folder into the same place with File Explorer.
Codex, Gemini CLI, Cursor and GitHub Copilot
These agents read the same SKILL.md folders. The one folder all four accept inside a project is .agents/skills/, so this copies the skill there:
git clone --depth 1 https://github.com/mattpocock/skills.git
mkdir -p .agents/skills
cp -R skills/skills/engineering/code-review .agents/skills/
cp -R skills/skills/engineering/setup-matt-pocock-skills .agents/skills/| Agent | Project folder | Your user folder | Notes |
|---|---|---|---|
| OpenAI Codex | .agents/skills/ | ~/.agents/skills/ | Type $ or run /skills to pick a skill; Codex also chooses one when your task matches. |
| Gemini CLI | .agents/skills/.gemini/skills/ | ~/.agents/skills/~/.gemini/skills/ | Or install from Git with gemini skills install <git URL> --path <folder> --consent. Google replaced Gemini CLI with Antigravity CLI for free-tier and Google One users on 18 June 2026; Antigravity uses .agents/skills/ in a project and ~/.gemini/config/skills/ for you. |
| Cursor | .agents/skills/.cursor/skills/ | ~/.agents/skills/~/.cursor/skills/ | Type / in Agent chat to pick a skill. Cursor also reads Claude Code's .claude/skills/ folders. |
| GitHub Copilot | .github/skills/.agents/skills/.claude/skills/ | ~/.copilot/skills/~/.agents/skills/ | Works in Copilot CLI, the cloud agent, and agent mode in VS Code, Visual Studio and JetBrains (IDE support depends on the version). Or run gh skill install OWNER/REPOSITORY SKILL (public preview, GitHub CLI 2.90.0 or later). |
Sources for these steps
Checked against each vendor's documentation on 2026-11-14:
How the fixed point works
The diff is taken with three dots, git diff <point>...HEAD, so the comparison is against the merge base and unrelated changes on main do not appear. The commit list comes from git log over the same range.
A bad ref or an empty diff stops the review at this step, before two sub-agents are started.
What the two sub-agents are told
The Standards sub-agent gets the diff, the standards files and the full smell baseline, and reports per file where a rule is broken. Anything tooling already enforces is skipped.
The Spec sub-agent gets the diff and the spec, and reports missing requirements, scope creep and doubtful implementations with the spec line quoted. Both reports are capped at about 400 words.
Questions about code-review
Why two separate reviews instead of one?
Code can follow every standard and still build the wrong thing, or do exactly what the issue asked while breaking the project's conventions. Keeping the axes apart stops a pass on one from hiding a failure on the other.
What if my repo has no written coding standards?
The Standards axis always carries a baseline of twelve code smells from Martin Fowler's Refactoring, such as Feature Envy and Shotgun Surgery. They are always labelled as judgement calls, and any documented repo rule overrides them.
What happens without a spec?
The skill asks where the spec is. If you say there is none, it skips the Spec sub-agent and the report says no spec was available.
Does it post comments on GitHub?
No. It returns the two reports in the conversation. Posting them is up to you.
More AI skills
Related skills
Diagnosing Bugs skill
Community · Matt PocockA six-phase debugging loop: build a test that fails on the bug, shrink it, rank hypotheses, probe one at a time, then fix and lock it with a test.To-Spec skill
Community · Matt PocockRecord agreed decisions as a project specification and publish it to the configured tracker.To-Tickets skill
Community · Matt PocockSplit a specification into demonstrable vertical slices with explicit blocking dependencies.Antfu skill
Community · Anthony FuApply Anthony Fu's JavaScript and TypeScript tooling preferences to a compatible project.Antfu Create PR skill
Community · Anthony FuPrepare an evidence-backed GitHub pull request with the correct diff range and review context.Daymade Skill Creator
Community · daymadeCreate and improve skills while preserving source ownership, capabilities and evidence boundaries.