review-github-pr
하는 일
이 스킬은 AI가 풀 리퀘스트나 브랜치의 변경 내용을 요약하고 중요한 설계 결정을 짚도록 합니다. 모든 줄을 읽기 전에 변경 사항을 이해하고 싶은 리뷰어를 위한 스킬입니다.
사용하는 경우
- ✓풀 리퀘스트가 무엇을 바꾸는지 명확한 요약을 보고 싶을 때.
- ✓검토하거나 병합하기 전에 브랜치의 변경 사항을 이해해야 할 때.
- ✓풀 리퀘스트의 주요 설계 결정을 설명받고 싶을 때.
스킬 링크
https://github.com/NVIDIA/OpenShell/blob/main/.agents/skills/review-github-pr/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“풀 리퀘스트 123번을 요약하고 주요 설계 결정을 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 풀 리퀘스트 제목, 설명, 연결된 이슈를 읽은 다음 코드 변경을 읽습니다. 중요한 부분에 대한 요약을 작성합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
사용하려면 무엇이 필요한가요?
gh 명령줄 도구에 로그인되어 있어야 하며, GitHub 저장소와 연결된 폴더에 있어야 합니다.
번호 대신 브랜치 이름을 줄 수 있나요?
네. 그 브랜치의 열린 풀 리퀘스트를 찾고, 여러 개면 어느 것을 쓸지 묻습니다.
풀 리퀘스트를 승인하거나 병합하나요?
아닙니다. 이 스킬은 변경을 읽고 요약하기 위한 것이며, 승인이나 병합은 하지 않습니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 21k
- 순위
- #10362
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-github-issue
21k에이전트가 gh 명령줄 도구와 프로젝트 템플릿을 써서 버그, 기능 요청, 작업에 대한 GitHub 이슈를 만들도록 돕습니다.
create-github-pr
21k에이전트가 작업이 검토 준비가 되었는지 확인한 뒤, gh 도구로 브랜치의 GitHub 풀 리퀘스트를 열도록 돕습니다.
watch-github-actions
21k에이전트가 GitHub Actions 실행 상태를 확인하고, 끝날 때까지 지켜보며, 실패한 작업의 로그를 읽도록 돕습니다.
openshell-policy-advisor
21k샌드박스가 네트워크 요청을 막았을 때, 필요한 가장 좁은 권한을 요청하고 승인 후 다시 시도하도록 에이전트를 돕습니다.