code-review
Ce qu’il fait
Elle compare les modifications depuis un point choisi de l'historique de votre code à deux questions : le code respecte-t-il vos règles de codage, et correspond-il à ce qui a été demandé ? Elle s'adresse aux développeurs qui relisent un travail avant de le fusionner.
Quand l’utiliser
- ✓Quand vous voulez relire une branche, une pull request ou un travail en cours avant la fusion.
- ✓Quand vous devez savoir si le code correspond au ticket ou à la spécification d'origine.
- ✓Quand vous voulez confirmer que les modifications respectent les normes documentées de votre dépôt.
Lien du skill
https://github.com/mattpocock/skills/blob/main/skills/engineering/code-review/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Relis les modifications de ma branche depuis main par rapport à nos normes de codage et au ticket d'origine.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent choisit un point de départ dans l'historique du code, puis lance deux relectures distinctes en même temps, l'une sur les normes et l'autre sur la spécification. Il présente ensuite les deux résultats ensemble.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Two-axis review of the diff between HEAD and a fixed point the user supplies:
- Standards: does the code conform to this repo's documented coding standards?
- Spec: does the code faithfully implement the originating issue / spec?
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 /setup-matt-pocock-skills.
Process
1. Pin the fixed point
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.
2. Identify the spec source
Look for the originating spec, in this order:
- Issue references in the commit messages (
#123,Closes #45, GitLab!67, etc.), fetched via the workflow in the tracker doc. - A path the user passed as an argument.
- A spec file under
docs/,specs/, or.scratch/matching the branch name or feature. - If nothing is found, ask the user where the spec is. If they say there isn't one, the Spec sub-agent will skip and report "no spec available".
3. Identify the standards sources
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:
- The repo overrides. A documented repo standard always wins; where it endorses something the baseline would flag, suppress the smell.
- Always a judgement call. Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation. Like any standard here, skip anything tooling already enforces.
Each smell reads what it is → how to fix; match it against the diff:
- Mysterious Name: a function, variable, or type whose name doesn't reveal what it does or holds. → rename it; if no honest name comes, the design's murky.
- Duplicated Code: the same logic shape appears in more than one hunk or file in the change. → extract the shared shape, call it from both.
- Feature Envy: a method that reaches into another object's data more than its own. → move the method onto the data it envies.
- Data Clumps: the same few fields or params keep travelling together (a type wanting to be born). → bundle them into one type, pass that.
- Primitive Obsession: a primitive or string standing in for a domain concept that deserves its own type. → give the concept its own small type.
- Repeated Switches: the same
switch/if-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share. - Shotgun Surgery: one logical change forces scattered edits across many files in the diff. → gather what changes together into one module.
- Divergent Change: one file or module is edited for several unrelated reasons. → split so each module changes for one reason.
- Speculative Generality: abstraction, parameters, or hooks added for needs the spec doesn't have. → delete it; inline back until a real need shows.
- Message Chains: long
a.b().c().d()navigation the caller shouldn't depend on. → hide the walk behind one method on the first object. - Middle Man: a class or function that mostly just delegates onward. → cut it, call the real target direct.
- Refused Bequest: a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.
4. Spawn both sub-agents in parallel
Issue both sub-agent calls together, in the foreground, and aggregate the reports they return.
Standards sub-agent prompt should include:
- The full diff command and commit list.
- The list of standards-source files you found in step 3, plus the smell baseline from step 3 pasted in full (the sub-agent has no other access
Questions fréquentes
Que dois-je fournir à l'agent avant qu'il ne commence ?
Un point de comparaison fixe, comme un commit, une branche ou une étiquette. Si vous n'en donnez pas, l'agent le demande.
Où trouve-t-il la spécification ?
Il cherche les numéros de tickets dans les messages de commit, un chemin que vous indiquez, ou des fichiers de spécification dans des dossiers comme docs ou specs.
La relecture se fait-elle en une seule passe ?
Non. Les deux contrôles s'exécutent dans des sous-agents séparés, afin qu'ils n'influencent pas le raisonnement l'un de l'autre.
Détails
Description originale de l’auteur
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\".
repo: mattpocock/skills
Popularité
- Étoiles GitHub
- 310k
- Position au classement
- #101
- Licence
- MIT
- Mis à jour
- 01/11/2026
Commentaires
- …
Autres skills de ce dépôt
ask-matt
310kPermet à votre agent de vous guider dans un ensemble de skills de code, en vous orientant vers la bonne selon votre situation, de l'idée au code livré.
domain-modeling
310kConstruit un glossaire commun au projet et consigne les décisions de conception clés, afin que votre code emploie les mêmes mots que votre équipe.
implement-spec
310kTransforme une spécification terminée et ses tickets en code fonctionnel, en traitant les tickets dans l'ordre et en les regroupant sur une seule branche.
implement
310kConstruit une tâche à partir d'une spécification ou d'un ticket, en testant au fil de l'eau, puis relit le résultat et le valide sur votre branche actuelle.
Skills similaires
diffs
394kPermet à votre agent de produire un diff réel et partageable de vos modifications, sous forme de lien ou d'image, plutôt qu'un résumé écrit à la main.
coding-agent
394kAide votre agent à confier une tâche de programmation plus importante à Codex, Claude Code ou OpenCode comme travailleur en arrière-plan, puis à suivre sa progression.
gh-issues
394kAide votre agent à trouver des tickets GitHub, choisir ceux à traiter et ouvrir des pull requests avec des correctifs, y compris le suivi des commentaires de relecture.