pr-explainer
Qué hace
Esta skill crea una página web local que explica un pull request en lenguaje sencillo. Cubre qué cambió, por qué importa, cómo funciona y cómo se probó, sin volcar todo el diff.
Cuándo usarla
- ✓Cuando quieres que los revisores entiendan rápidamente un pull request complejo.
- ✓Cuando un cambio grande de código necesita una explicación guiada y no un diff en bruto.
- ✓Cuando quieres explicar el problema, el cambio y la prueba en un solo lugar.
Link de la skill
https://github.com/mastra-ai/mastra/blob/main/.claude/skills/pr-explainer/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
“Crea una guía de revisión en HTML para este pull request, para que mis revisores entiendan el cambio en diez minutos.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente lee la rama, los commits y los archivos modificados, y después ordena la explicación desde el problema hasta el contexto del sistema, los cambios clave y los resultados de las pruebas. Escribe una única página HTML con secciones breves, ejemplos y diagramas.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
PR Explainer
Create a local, self-contained HTML page that teaches a reviewer the PR story: what changed, why it matters, how it works, how it fits into the system, and how it was verified.
Required workflow
Understand the PR before writing HTML
- Collect PR title/number, branch, link if available, base branch, commit range, changed files, and verification already performed.
- Inspect the current state with
git status --short. - Inspect recent commits with
git log --oneline -n 10. - Inspect scope with
git diff <base>...HEAD --statandgit diff <base>...HEAD. - If one commit carries the main change, inspect it with
git show --stat <commit>andgit show <commit>.
Find the explanation path
- Do not explain files in raw diff order.
- Teach the change in this order when possible:
- problem,
- system context,
- before/after data or control flow,
- key code changes,
- proof from tests/builds/manual checks,
- reviewer takeaway.
- Classify changed files as core behavior, plumbing/integration, tests, release metadata, or incidental noise.
- Highlight only files that help explain the PR.
Write for approachability
- Use plain language, short sections, concrete before/after examples, small focused snippets, diagrams, tables, and callouts.
- Explain the problem before implementation details.
- Define acronyms or package-specific terms before using them.
- Avoid dumping the full diff or assuming the reviewer already knows internal context.
Create a local self-contained HTML file
- Put generated files in
.pr-review/. - Use one HTML file containing all CSS and content.
- Do not commit
.pr-review/by default. - Prefer repo ignore rules or
.git/info/excludeso generated review pages stay out of commits.
- Put generated files in
Recommended HTML structure
Use this structure unless the PR clearly needs a different teaching order:
Hero
- PR number/title, one-sentence summary, branch/link/status.
- Small metrics: files changed, tests added, packages affected.
Problem
- Previous behavior.
- Why it was wrong, confusing, missing, or risky.
System Context
- Where the change sits in the product or architecture.
- Upstream callers, downstream behavior, and why this is the right layer.
- Behavior intentionally not changed.
Before/After Flow
- Visual old path vs. new path when the PR changes flow, state, ownership, permissions, request handling, data transformation, or component relationships.
Code Walkthrough
- Step-by-step explanation path.
- Focused diffs for important files only.
- Explain what each snippet accomplishes and why it is necessary.
Tests / Verification
- Tests added or updated.
- Commands run for tests, build, typecheck, lint, or manual verification.
- Known unrelated warnings or failures, if any.
Reviewer Takeaway
- The shortest useful mental model of the PR.
- What the reviewer should focus on while reviewing the actual diff.
Diagrams
Add diagrams when they reduce cognitive load. Prefer simple HTML/CSS diagrams over external dependencies.
Good diagram types:
- Request flow: Client → Server → Handler → Service → Result
- Before/after path: broken path vs. fixed path
- Ownership map: package/module responsibility boundaries
- Data transformation: input → normalized form → output
- State machine: pending → running → complete/error
Each diagram must answer: “What does this help the reviewer understand faster?”
Focused diff snippets
Show snippets along the explanation path, not giant patches. Each important snippet should include:
- file path,
- relevant added/removed lines only,
- visual styling for additions/removals,
- a short explanation,
- connection back to the PR story.
Use this pattern:
<div class="diff">
<div class="diff-title">packages/example/src/file.ts</div>
<pre>
<span class="del">- old behavior</span>
<span class="add">+ new behavior</span>
</pre>
</div>
A reviewer should understand the PR without opening GitHub, but the page should not replace the final full diff review.
Verification requirements
End with proof. Include exact commands when available, for example:
pnpm --filter @scope/package test path/to/test.ts -- --run
pnpm turbo build --filter ./packages/package
If verification was not run, say so clearly and list the recommended commands
Preguntas frecuentes
¿Muestra todos los archivos modificados?
No. Destaca solo los archivos que ayudan a explicar el cambio y omite el ruido accesorio.
¿Dónde se guarda la página?
Se guarda como una página local en una carpeta de revisión dentro del proyecto.
¿Qué necesita primero?
La rama y el historial de commits del pull request, para poder ver los cambios.
Detalles
Descripción original del autor
Use when creating an approachable, self-contained HTML review aid for a pull request; explaining what changed, why it matters, how it works, and how it fits into the broader system; turning PR diffs, commits, tests, and architecture context into a local `.pr-review/` HTML page for reviewers; or helping reviewers understand complex code changes without dumping the full diff.
repo: mastra-ai/mastra
Popularidad
- Estrellas en GitHub
- 29 mil
- Posición en el ranking
- #9362
- Licencia
- —
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
debugging-difficult-bugs
29 milAyuda a tu agente a depurar un error difícil registrando lo que hace el programa real en tiempo de ejecución, en lugar de adivinar solo con las pruebas.
mastra-frontend
29 milAyuda a tu agente a crear pantallas de app con el sistema de diseño del playground de Mastra, combinando sus componentes listos en lugar de dar estilo desde cero.
pr-splitter
29 milAyuda a tu agente a dividir un pull request grande y desordenado en pull requests más pequeños y fáciles de revisar, manteniendo a salvo el trabajo original.
ralph-plan
29 milAyuda a tu agente a planificar una tarea concreta y estructurada mediante un intercambio corto de mensajes, para que el trabajo tenga pasos y comprobaciones claros.
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.