用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tenfyzhong/skills-hub --skill pr-review命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | pr-review |
| description | Review a GitHub or GitLab pull request from a PR URL or number. |
Review a Pull Request comprehensively by analyzing the diff against the upstream merge base.
Before proceeding, verify:
# 1. Check if in a git repository
git rev-parse --is-inside-work-tree
# 2. Check if gh CLI is available and authenticated
gh auth status
If either check fails, STOP and inform the user:
gh auth login first."The user provides a PR link in one of these formats:
https://github.com/owner/repo/pull/123#123 or 123# Get comprehensive PR metadata
gh pr view <PR_URL> --json number,title,body,state,author,baseRefName,baseRefOid,headRefName,headRefOid,additions,deletions,changedFiles,files,commits,reviewDecision,reviews,labels,milestone,createdAt,updatedAt
# Get the diff
gh pr diff <PR_URL>
# Get list of changed files
gh pr diff <PR_URL> --name-only
# Get detailed file changes with additions/deletions
gh api repos/{owner}/{repo}/pulls/{number}/files
# Get base and head commits
BASE_REF=$(gh pr view <PR_URL> --json baseRefOid -q .baseRefOid)
HEAD_REF=$(gh pr view <PR_URL> --json headRefOid -q .headRefOid)
# Find merge base (requires local clone)
git fetch origin $BASE_REF $HEAD_REF 2>/dev/null || true
git merge-base $BASE_REF $HEAD_REF 2>/dev/null || echo $BASE_REF
For each changed file, analyze:
gh api or local files to understand the code being modifiedYour review MUST include ALL of the following sections in this exact order:
Title: [PR Title] Author: [Author] Branch: [head] → [base] Files Changed: [N] | Additions: +[N] | Deletions: -[N]
[2-5 sentences explaining the purpose and scope of this PR. Be specific about what functionality is added/changed/removed.]
Based on the type of changes in this PR, reviewers should focus on:
| Area | Priority | What to Check |
|---|---|---|
| [Area 1] | 🔴 High | [Specific guidance] |
| [Area 2] | 🟡 Medium | [Specific guidance] |
| [Area 3] | 🟢 Low | [Specific guidance] |
Issues are sorted by severity (Critical → High → Medium → Low → Nitpick).
[Issues that will cause bugs, security vulnerabilities, or data loss]
[Issue Title]
path/to/file.ts:L123[Issues that may cause problems or violate important patterns]
[Code quality issues, minor bugs, or pattern violations]
[Style issues, minor improvements]
[Purely stylistic suggestions, optional improvements]
| Test File | Type | Coverage |
|---|---|---|
| [file] | [unit/integration/e2e] | [what it tests] |
Things I'm not certain about and would like clarification on:
[Question about design decision]
[Question about edge case]
| Aspect | Status | Notes |
|---|---|---|
| Code Quality | 🟢/🟡/🔴 | [Brief note] |
| Security | 🟢/🟡/🔴 | [Brief note] |
| Performance | 🟢/🟡/🔴 | [Brief note] |
| Test Coverage | 🟢/🟡/🔴 | [Brief note] |
| Documentation | 🟢/🟡/🔴 | [Brief note] |
Overall: [APPROVE / REQUEST CHANGES / NEEDS DISCUSSION]