skills/pr-review/SKILL.md
查看 PR/MR 评论并给出解决建议。当用户提到"查看 PR 评论"、"PR xxx 的评论"、"帮我看 PR"、"review PR"、"MR 评论"、"merge request 评论"等关键词时触发。支持 GitHub 和 GitLab,自动检测平台,优先使用本地 CLI 工具(gh/glab),fallback 到 API。
npx skillsauth add snailuu/skill pr-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
必须直接使用 Bash 工具执行 shell 命令,绝对不要使用 Task 工具来执行命令。
从用户输入中提取信息:
git rev-parse --is-inside-work-tree 2>/dev/null
git remote -v 2>/dev/null
git remote get-url origin 2>/dev/null
| 情况 | 处理方式 |
|------|----------|
| 无 git 仓库 | 追问 repo(格式:owner/repo 或完整 URL) |
| 1 个 remote | 直接使用 |
| 多个 remote | 列出让用户选择 |
| 非 GitHub/GitLab | 提示暂不支持 |
github.com → GitHubgitlab.com → GitLab SaaS*.github.com → GitHub Enterprise(询问 API endpoint)*.gitlab.* → GitLab Self-hosted(询问实例 URL)优先:gh CLI
gh auth status 2>/dev/null
gh pr view <number> --repo <owner/repo> --json title,body,state,isDraft,comments,reviews,reviewRequests
gh api repos/<owner>/<repo>/pulls/<number>/comments
Fallback:REST API(WebFetch)
GET https://api.github.com/repos/{owner}/{repo}/pulls/{number}
GET https://api.github.com/repos/{owner}/{repo}/pulls/{number}/comments
GET https://api.github.com/repos/{owner}/{repo}/issues/{number}/comments
优先:glab CLI
glab auth status 2>/dev/null
glab mr view <number> --repo <owner/repo>
glab api projects/<url-encoded-path>/merge_requests/<iid>/notes
Fallback:REST API(WebFetch)
GET https://gitlab.com/api/v4/projects/{id}/merge_requests/{iid}
GET https://gitlab.com/api/v4/projects/{id}/merge_requests/{iid}/notes
GET https://gitlab.com/api/v4/projects/{id}/merge_requests/{iid}/discussions
若为私有仓库且无 CLI 工具,提示用户提供 PAT。
bot、[bot]、codecov、dependabot、renovate 的评论resolved: true → 已解决,resolved: false → 待处理按 PR 标题、状态、平台分组展示评论。对每条待处理评论给出问题类型和解决建议。
输出模板、评论分类和追问话术见 references/templates.md。
特殊状态处理:
documentation
Use when 需要根据 git 历史生成或更新 CHANGELOG.md,尤其在发版前整理 Unreleased、版本区间、tag diff 或 Keep a Changelog 条目时。
development
Semantic Design System Skill for Google Stitch. Generates agent-friendly DESIGN.md files that enforce premium, anti-generic UI standards — strict typography, calibrated color, asymmetric layouts, perpetual micro-motion, and hardware-accelerated performance.
development
Upgrades existing websites and apps to premium quality. Audits current design, identifies generic AI patterns, and applies high-end design standards without breaking functionality. Works with any CSS framework or vanilla CSS.
development
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.