pr-lens
Qué hace
Esta skill convierte un cambio de código o un sistema en diagramas visuales que muestran cómo se conectan las partes y cómo fluyen los datos. Es para desarrolladores que quieren explicar un pull request o un sistema a otras personas.
Cuándo usarla
- ✓Cuando quieres un diagrama que explique qué hace un cambio de código.
- ✓Cuando quieres una imagen de arquitectura o de flujo de datos de un sistema para un pull request.
- ✓Cuando pides a tu IA que visualice o explique cómo está estructurada una base de código.
Link de la skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/software-development/pr-lens/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
“Haz un diagrama de arquitectura de este pull request para que los revisores vean cómo fluyen los datos.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill hace que tu IA escriba una descripción en JSON de los carriles, nodos y conexiones, y luego ejecuta la herramienta PR Lens para generar diagramas SVG animados. No busca errores.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
PR Lens Skill
PR Lens draws code as visually rich animated diagrams: diffs, architecture, data flows. You describe the diff or codebase as one JSON document (lanes, nodes, edges, ordered flows) and the CLI renders it as animated SVGs. There is no findings lens — PR Lens is a comprehension layer, not a review bot. There is no field for a bug, risk, or security note, and a document that invents one is rejected.
When to Use
- Asked to diagram, visualise, or explain a code change or a system.
- A pull request should carry an architecture or data-flow diagram.
- Keywords: PR Lens, diagram, architecture, data flow, visualise, pull request.
Prerequisites
- Node.js with
npx(the CLI runs vianpx @coldtea/pr-lens-cli@latest; no install step). gh(GitHub CLI) — optional, only for attaching diagrams to PRs.- Optional canvas publishing calls the third-party service prlens.dev (see step 4b).
How to Run
Run all commands with the terminal tool from the repository root.
Read the diff. When representing a code change:
git diff --find-renames <base>...<head>. The base is the merge base, not the tip of the base branch. If not expressing a diff, read the code to be visualised.Write the document to
.pr-lens/graph.json, followingreferences/graph-document.md.references/example.graph.jsonis a valid reference with three lanes, all four delta states, a hero edge, a seven-step flow, a nested drill-down tree and a six-step walkthrough. Read it before writing your first document — quicker than reading the reference.Validate, and fix.
npx @coldtea/pr-lens-cli@latest validate .pr-lens/graph.jsonFix every failure and run it again. Do not render an invalid document; do not "work around" a failure by deleting the element it names.
Render.
npx @coldtea/pr-lens-cli@latest render .pr-lens/graph.json --theme lightRender light by default unless the user requests another theme. The SVGs, the manifest and
drawn.graph.jsonland in.pr-lens/, which the CLI adds to the repository's .gitignore. Do not commit any of it — these files are rebuilt from the diff on demand. Each SVG is named after its view, theme and content hash;manifest.jsonlists them by lens and view.
4b. Canvas push — OPTIONAL, opt-in. Only when the user explicitly asks for a shareable link. This publishes .pr-lens/drawn.graph.json to the third-party service prlens.dev:
npx @coldtea/pr-lens-cli@latest canvas push
It prints three links. Give the user the view link (https://prlens.dev/c/{id}): the full-screen diagram, every view on one page, no login. The edit link (ending in #w=…) lets its holder overwrite the canvas — it is a secret: leave it out of the reply unless asked, never paste it anywhere public. The embed link serves the top view as an SVG for a README. Pushing the same file again updates the same canvas, so "rename that node" is: edit, validate, render, push — the link stays the same. If the push fails, say so and tell the user where the local SVGs are and which is the top view.
Attach to a PR, when there is one. Upstream documents
gh pr create/edit/comment --attach <path>, but--attacharrived in GitHub CLI 2.99 — checkgh --versionfirst (e.g. gh 2.97 does NOT have it). With gh ≥ 2.99: write the body with a Markdown image(an HTML<img>is left as written and the file appended at the bottom instead; alt text is the one-line caption a reader without images gets), then repeat--attach <path>per referenced diagram:gh pr create --title "…" --body-file .pr-lens/body.md --attach .pr-lens/overview-light-<hash>.svgWithout
--attach, use a commit-free path:- Upload the SVGs to a gist:
gh gist create .pr-lens/<view>.svg, then reference the raw gist URL in the PR body/comment, or - Publish via the canvas link (step 4b, with user consent) and link the view URL, or
- Note the local
.pr-lens/path in the PR body so reviewers can rebuild.
Once published somewhere durable, let the CLI compose the comment markdown:
npx @coldtea/pr-lens-cli@latest comment \ --graph .pr-lens/drawn.graph.json \ --manifest .pr-lens/manifest.json \ --asset-base-url <where you published the SVGs>--graphtakesdrawn.graph.json, not the document you wrote — the CLI refuses a document its manifest does not descr- Upload the SVGs to a gist:
Preguntas frecuentes
¿Encuentra errores o problemas de seguridad?
No. La skill indica que PR Lens es una herramienta de comprensión, sin campos para errores ni riesgos.
¿Necesita instalación?
La skill ejecuta la herramienta con npx, así que no hay un paso de instalación aparte, aunque sí hace falta Node.js.
¿Los diagramas pueden ir en un pull request?
Sí. La skill indica que la CLI de GitHub puede adjuntar los diagramas a un PR, aunque ese paso es opcional.
Detalles
Descripción original del autor
Draw code changes as animated architecture/data-flow SVGs.
Popularidad
- Estrellas en GitHub
- 260 mil
- Posición en el ranking
- #573
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
agent-merge-conflict-arbiter
260 milResuelve un conflicto de fusión de git entre las ramas de dos agentes como tercera parte neutral, produciendo un único resultado fusionado para el repositorio.
antigravity-cli
260 milTe guía para instalar, actualizar y resolver problemas con la herramienta de línea de comandos Antigravity, incluidos sus plugins, el inicio de sesión y el entorno aislado.
blackbox
260 milPermite que tu agente entregue una tarea de programación a la herramienta de línea de comandos Blackbox AI, que ejecuta varios modelos de IA y elige el mejor resultado.
dynamic-workflow
260 milEnseña a tu agente a ejecutar grandes lotes de trabajo similar como un script guardado, de modo que solo los resultados verificados vuelvan a la conversación principal.
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.