review-github-pr
O que ela faz
Esta skill faz a IA resumir um pull request ou o diff de uma branch e destacar decisões importantes de design. É para revisores que querem entender uma mudança antes de ler cada linha.
Quando usar
- ✓Quando você quiser um resumo claro do que um pull request altera.
- ✓Quando precisar entender as alterações de uma branch antes de revisá-la ou mesclá-la.
- ✓Quando quiser que as principais decisões de design de um pull request sejam explicadas.
Link da skill
https://github.com/NVIDIA/OpenShell/blob/main/.agents/skills/review-github-pr/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
“Resuma o pull request 123 e me diga as principais decisões de design.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A IA lê o título, a descrição e as issues vinculadas do pull request e depois lê as alterações de código. Escreve um resumo das partes importantes.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Review GitHub Pull Request
Summarize a GitHub pull request diff, highlighting key design decisions and notable code snippets.
Prerequisites
- The
ghCLI must be authenticated (gh auth status) - You must be in a git repository with a GitHub remote
Step 1: Resolve the PR
The user will provide either a PR number (e.g., #123 or 123) or a branch name. Determine which input was given and resolve it to a PR.
If a PR number is provided
Strip any leading # and use the numeric ID directly. Proceed to Step 2.
If a branch name is provided
Look up the open PR whose head branch matches:
gh pr list --head "<branch>" --state open
- If exactly one PR is found, extract its number and proceed to Step 2.
- If multiple PRs are found, list them and ask the user which one to review.
- If no PR is found, skip Step 2 (no PR description to fetch) and go directly to Step 3 using the local git diff fallback.
Step 2: Fetch PR Description
Retrieve the PR metadata:
gh pr view <number> --json title,body,state,headRefName,baseRefName,labels,author,closingIssuesReferences
Record the title, body, headRefName, and baseRefName for use in later steps.
Check Issue Acceptance
Inspect every closing issue reference (paginate as needed) and fetch its current repository and labels. Verify the PR author's permission in the target repository:
gh api repos/OWNER/REPO/collaborators/AUTHOR/permission --jq .permission
Call out each linked issue missing state:accepted, with an issue link. Verified
write, maintain, or admin access permits the exception; report it as context,
not a blocking concern. Other authors need at least one target-repository issue,
and every linked issue must be accepted; report violations under Potential
Concerns. PR body text such as No issue required does not bypass this gate.
Report failed lookups as unverified and continue the code review. For a branch
without a PR, note that issue acceptance was not verified.
Step 3: Generate the Diff
Primary: gh pr diff
Fetch the diff via the GitHub CLI:
gh pr diff <number>
If this succeeds, use this diff and proceed to Step 4.
Fallback: local git diff
If no PR exists (branch-only case) or the gh diff command fails, fall back to a local diff:
# Ensure both branches are available locally
git fetch origin <target-branch> <source-branch>
# Generate the diff
git diff origin/<target-branch>...origin/<source-branch>
If the user provided a branch name and no PR was found, diff against main:
git fetch origin main <branch>
git diff origin/main...origin/<branch>
Handling large diffs
If the diff output is very large (thousands of lines), use the Task tool to process it in chunks. Summarize each chunk independently, then merge the summaries. Do not skip or truncate parts of the diff — accuracy depends on reading all of it.
Step 4: Analyze and Summarize
Read through the full diff (and the PR description if available). Produce a summary with the following sections. Keep every section as concise as possible — brevity is a priority.
Summary format
## PR Review: <title>
**PR:** [#<number>](<url>) <- only if a PR exists
**Author:** <author>
**Branch:** `<source>` -> `<target>`
### Overview
<1-3 sentences describing what this PR does and why>
### Key Design Decisions
- <decision 1 with file:line reference>
- <decision 2 with file:line reference>
- ...
### Notable Code
<short fenced code snippets that illustrate the most important changes -- max 3 snippets>
### Potential Concerns <- omit if none
- **<concise user-visible behavior>** — Before this PR, <affected persona>
experienced <previous behavior>. With this PR, <new concerning behavior>, so
<user-visible impact>. Details: `<file>:<line>`.
Guidelines for the summary:
- Overview: State what changed and why. Pull context from the PR description if available.
- Key Design Decisions: Focus on why something was done a particular way, not what changed. Include
file_path:line_numberreferences. Examples: choice of algorithm, new abstraction introduced, API contract change, migration strategy. - Notable Code: Include only the most instructive or surprising snippets. Keep each snippet under 15 lines. Always include the file path above the code block.
- Potential Concerns: Only include genuine risks that warrant a change or a delibera
Perguntas frequentes
Do que preciso para usar?
A ferramenta gh precisa estar conectada, e você precisa estar em uma pasta vinculada ao repositório do GitHub.
Posso dar o nome de uma branch em vez de um número?
Sim. Ela procura o pull request aberto para essa branch e pergunta qual usar se houver vários.
Ela aprova ou mescla pull requests?
Não. A skill serve para ler e resumir alterações, não para aprová-las ou mesclá-las.
Detalhes
Descrição original do autor
Review a GitHub pull request by summarizing its diff and key design decisions. Use when the user wants to review a PR, understand changes in a branch, or get a code review summary. Trigger keywords - review PR, review pull request, summarize PR, summarize diff, code review, review branch, PR summary, diff summary.
repo: NVIDIA/OpenShell
Popularidade
- Estrelas no GitHub
- 21 mil
- Posição no ranking
- #10362
- Licença
- Apache-2.0
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
create-github-issue
21 milAjuda seu agente a criar uma issue no GitHub para um bug, pedido de funcionalidade ou tarefa, usando a ferramenta de linha de comando gh e o template do projeto.
create-github-pr
21 milPermite que seu agente abra um pull request no GitHub para a sua branch com a ferramenta gh, depois de verificar se o trabalho está pronto para revisão.
watch-github-actions
21 milPermite que seu agente verifique execuções do GitHub Actions, acompanhe-as até o fim e leia os logs de qualquer job que tenha falhado.
openshell-policy-advisor
21 milAjuda seu agente a se recuperar quando um sandbox bloqueia uma requisição de rede, pedindo uma permissão restrita e tentando de novo após a aprovação.
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.