code-review
Qué hace
Compara los cambios desde un punto elegido del historial de código con dos preguntas: si el código sigue las reglas de codificación y si cumple lo que se pidió. Es para desarrolladores que revisan trabajo antes de fusionarlo.
Cuándo usarla
- ✓Cuando quieres revisar una rama, un pull request o un trabajo en curso antes de fusionar.
- ✓Cuando necesitas saber si el código cumple la incidencia o la especificación original.
- ✓Cuando quieres confirmar que los cambios siguen las normas documentadas de tu repositorio.
Link de la skill
https://github.com/mattpocock/skills/blob/main/skills/engineering/code-review/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Revisa los cambios de mi rama desde main frente a nuestras normas de código y el ticket original.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente elige un punto de partida en el historial del código y ejecuta dos revisiones separadas a la vez, una de normas y otra de especificación. Después informa de ambos resultados juntos.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Qué tengo que darle antes de empezar?
Un punto fijo con el que comparar, como un commit, una rama o una etiqueta. Si no lo das, el agente lo pide.
¿Dónde encuentra la especificación?
Busca números de incidencia en los mensajes de commit, una ruta que le indiques o archivos de especificación en carpetas como docs o specs.
¿La revisión se hace en una sola pasada?
No. Las dos comprobaciones se ejecutan en subagentes separados para que no se influyan entre sí.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 310 mil
- Posición en el ranking
- #101
- Licencia
- MIT
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
ask-matt
310 milPermite que tu agente actúe como guía de un conjunto de skills de programación, señalándote la adecuada para tu situación, desde la idea hasta el código entregado.
domain-modeling
310 milCrea un glosario compartido del proyecto y registra las decisiones de diseño clave, para que tu código use las mismas palabras que tu equipo.
implement-spec
310 milConvierte una especificación terminada y sus tickets en código funcional, gestionando los tickets en orden y reuniéndolos en una sola rama.
implement
310 milConstruye una tarea a partir de una especificación o un ticket, probándola por el camino, y después revisa el resultado y lo confirma en tu rama actual.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.