Pular para o conteúdo
Skillpedia
Código em geral15 mil · #10940

pr-review-canvas

O que ela faz

Permite que o assistente transforme um pull request do GitHub em uma página de revisão fácil de ler, com diffs anotados e uma lista de verificação. É para revisores que querem um roteiro guiado.

Quando usar

  • ✓Quando você cola um link de pull request do GitHub e pede uma revisão ou um resumo.
  • ✓Quando você quer separar as mudanças principais dos arquivos mecânicos ou repetitivos.
  • ✓Quando você quer um roteiro visual de um pull request grande.

Link da skill

https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/pr-review-canvas/SKILL.md

Copie 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

Use esta skill para me ajudar: https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/pr-review-canvas/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Revise este pull request do GitHub para mim e faça um roteiro interativo que eu possa ler.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O assistente busca os detalhes do pull request e os diffs dos arquivos pela linha de comando do GitHub, lê tudo e escreve uma página HTML que explica a mudança, com seções anotadas e uma lista de verificação.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

PR Review Canvas

Generate an interactive HTML review of a GitHub PR that reads like a peer walking you through what matters.

Workflow

1. Fetch PR data

Run these gh api calls in parallel:

gh api repos/{owner}/{repo}/pulls/{number} --jq '{title, body, user: .user.login, state, additions, deletions, changed_files, base: .base.ref, head: .head.ref}'
gh api repos/{owner}/{repo}/pulls/{number}/files --paginate --jq '.[] | {filename, status, additions, deletions, patch}'
gh api repos/{owner}/{repo}/pulls/{number}/comments --jq '.[] | {user: .user.login, body, path, line}'

2. Analyze the PR and write the body HTML

Read the diffs, understand the PR, and write the <body> content directly as HTML. You have full creative freedom -- the goal is to explain the PR clearly to a reviewer. Use whatever structure best fits the PR.

Typical structure (adapt as needed):

  • Header with title, PR number, author, stats
  • Summary box explaining what the PR does in plain English
  • Core file sections with annotations and diffs
  • Mechanical/boilerplate files collapsed by default
  • Review checklist at the bottom

But you can also add:

  • Pseudocode summaries for verbose code -- show the algorithm in plain English or short pseudocode, with the real diff collapsed below (use a .bp-section card labeled "Show full implementation"). Great when 150 lines of retry/backoff/error-handling code is really just "fetch with exponential backoff and circuit breaker."
  • Diagrams (inline SVG, mermaid via CDN, ASCII art in <pre>)
  • Flowcharts showing before/after control flow
  • Tables comparing old vs new behavior
  • Callout boxes for warnings, questions, or gotchas
  • Interactive widgets if they help
  • Anything else that makes the review clearer

Pseudocode pattern example:

<div class="file-card">
  <div class="file-hdr" onclick="toggle(this)">
    <span class="fname">retryClient.ts</span>
    <div class="fstats"><span class="pill add">+173</span><span class="pill del">&minus;11</span><span class="chev open">&#9654;</span></div>
  </div>
  <div class="file-body open">
    <div class="file-note">
      <strong>What this does in plain English:</strong>
      <pre style="margin-top:8px;color:var(--text);font-size:12px;line-height:1.6;">
fetch(url):
  if circuit breaker is open → fail fast
  retry up to N times:
    try fetch with timeout
    on success → close circuit breaker, return
    on retryable error → wait (exponential backoff + jitter)
    on non-retryable error → throw
  circuit breaker records failure</pre>
    </div>
    <div class="bp-section" style="margin:0;border:0;border-radius:0;">
      <div class="bp-hdr" onclick="toggleBP(this)">
        <span>Show full implementation (+173 lines)</span><span class="chev">&#9654;</span>
      </div>
      <div class="bp-body"><div data-diff="retryClient"></div></div>
    </div>
  </div>
</div>

3. Available CSS classes and JS utilities

Read styles.css and renderer.js from this skill directory. These give you a prebuilt dark-themed toolkit. Inject them into template.html verbatim.

CSS classes you can use:

Class Purpose
.header, .header h1, .header-meta Page header
.pill.add, .pill.del, .pill.files Stat badges (+N, -N, N files)
.content Centered content wrapper (max 900px)
.summary Summary/TL;DR box
.section-title Section heading with bottom border
.ic Inline code reference (mono, blue, dark bg)
.file-card, .file-hdr, .file-body Collapsible file card (use onclick="toggle(this)" on .file-hdr)
.file-note Sticky reviewer annotation inside a file card
.bp-section, .bp-hdr, .bp-body Collapsed boilerplate card (use onclick="toggleBP(this)")
.bp-note Note inside a boilerplate card
.verdict Review checklist box

JS functions available:

Function Usage
toggle(hdrElement) Toggle a .file-body open/closed
toggleBP(hdrElement) Toggle a .bp-body open/closed
renderDiff(target, diffInput) Render a unified diff. target can be a DOM element, string ID, or CSS selector. diffInput can be a raw patch string OR an array of lines -- both work. Automatically filters imports, collapses whitespace-only changes, detects moved code (blue/purple tint).
esc(string) HTML-escape a string

**Rendering diffs -- use `data-diff

Perguntas frequentes

Precisa de acesso ao GitHub?

Sim. Ele usa o comando gh para buscar os dados do pull request, então essa ferramenta precisa estar configurada.

Como os arquivos repetitivos são tratados?

Arquivos mecânicos ou repetitivos costumam ficar recolhidos por padrão, para que as mudanças principais se destaquem.

Ele publica comentários no GitHub?

A skill descreve a criação de uma página de revisão a partir dos dados. Ela não descreve a publicação de comentários no GitHub.

Detalhes

Descrição original do autor

Generate an interactive PR review walkthrough as an HTML page. Fetches PR data via gh API, categorizes files into core vs mechanical changes, adds reviewer annotations, and renders diffs with moved-code detection. Use when the user pastes a GitHub PR URL and asks for a review, walkthrough, or summary, or says "review this PR".

repo: cursor/plugins

Popularidade

Estrelas no GitHub
15 mil
Posição no ranking
#10940
Licença
—
Atualizada em
31/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas