pr-lens
O que ela faz
Esta skill transforma uma mudança de código ou uma base de código em diagramas visuais que mostram como as partes se conectam e como os dados circulam. Ela é para desenvolvedores que querem explicar um pull request ou um sistema para outras pessoas.
Quando usar
- ✓Quando você quer um diagrama que explique o que uma mudança de código faz.
- ✓Quando você quer uma imagem de arquitetura ou de fluxo de dados de um sistema para um pull request.
- ✓Quando você pede à sua IA para visualizar ou explicar como uma base de código está organizada.
Link da skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/software-development/pr-lens/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Faça um diagrama de arquitetura deste pull request para que os revisores vejam como os dados circulam.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill faz sua IA escrever uma descrição em JSON das raias, nós e conexões, depois executa a ferramenta de linha de comando PR Lens para gerar diagramas SVG animados. Ela não procura bugs.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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:
Perguntas frequentes
Ela encontra bugs ou problemas de segurança?
Não. A skill diz que o PR Lens é uma ferramenta de compreensão, sem campo para bugs ou riscos.
Precisa de instalação?
A skill executa a ferramenta pelo npx, então não há uma etapa de instalação separada, mas o Node.js é necessário.
Os diagramas podem ir para um pull request?
Sim. A skill diz que a GitHub CLI pode anexar os diagramas a um PR, embora essa etapa seja opcional.
Detalhes
Descrição original do autor
Draw code changes as animated architecture/data-flow SVGs.
Popularidade
- Estrelas no GitHub
- 260 mil
- Posição no ranking
- #573
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
agent-merge-conflict-arbiter
260 milResolve um conflito de merge no git entre as branches de dois agentes como terceiro neutro, produzindo um único resultado unificado para o repositório.
antigravity-cli
260 milOrienta você na instalação, atualização e solução de problemas da ferramenta de linha de comando Antigravity, incluindo plugins, login e sandbox.
blackbox
260 milPermite que seu agente entregue uma tarefa de programação para a ferramenta de linha de comando Blackbox AI, que roda vários modelos de IA e escolhe o melhor resultado.
dynamic-workflow
260 milEnsina seu agente a rodar grandes lotes de trabalhos semelhantes como um script salvo, de modo que só resultados verificados voltem para a conversa principal.
Skills parecidas
diffs
394 milPermite que seu agente gere um diff real e compartilhável das edições, como link de visualização ou arquivo de imagem, em vez de um resumo escrito à mão.
coding-agent
394 milAjuda seu agente a passar um trabalho grande de programação para o Codex, Claude Code ou OpenCode em segundo plano e acompanhar o andamento.
gh-issues
394 milAjuda seu agente a encontrar issues do GitHub, escolher quais resolver e abrir pull requests com correções, acompanhando os comentários de revisão.