一键导入
gh-pr-code-review
Review a GitHub Pull Request using the gh CLI and provide a comprehensive report with prioritized suggestions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review a GitHub Pull Request using the gh CLI and provide a comprehensive report with prioritized suggestions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Draft a structured commit message for all uncommitted changes, auto-detecting project type (React, Rails, or generic).
Create a comprehensive, well-structured README.md file for the project.
Generate a comprehensive .gitignore file at the project root covering common environments, frameworks, and operating systems.
Review uncommitted local code changes and provide a prioritized report with suggested fixes.
Generate comprehensive markdown documentation for a Rails controller, including actions, routes, request/response formats, and business logic.
Generate a formatted Slack standup update by summarizing entries from the last working day and today in a work log markdown file.
| name | gh-pr-code-review |
| description | Review a GitHub Pull Request using the gh CLI and provide a comprehensive report with prioritized suggestions. |
| disable-model-invocation | true |
Review a GitHub Pull Request using the gh CLI and provide a comprehensive report with suggestions.
YOU MUST follow these steps IN ORDER. DO NOT skip any step:
Use the gh CLI to gather PR information:
gh pr view <number> --json title,body,changedFiles,reviews,commentsgh pr view --json title,body,changedFiles,reviews,comments to get the current branch's PRDO NOT proceed without PR metadata.
Get the actual code changes using git:
gh pr view <number> --json baseRefName,headRefName to get the base and head branch namesgit fetch origin to ensure remote refs are up to dategit diff origin/<baseRefName>...origin/<headRefName> to get all code changesThis is your primary source of truth for the actual code changes.
Run gh pr checks <number> to get CI/CD status.
CRITICAL WARNINGS:
You MAY read relevant files in the workspace for additional context if needed.
Provide the review report directly in the chat (do NOT create files).
Review Focus Areas (in priority order):
Response Guidelines:
When suggesting code changes, use unified diff format:
Rules:
--- path/to/file and +++ path/to/file (no timestamps or prefixes)@@ line indicating line numbers- prefix+ prefix--- /dev/null to +++ path/to/new/fileExample:
--- src/example.js
+++ src/example.js
@@ -10,3 +10,3 @@
function calculate(x, y) {
- return x + y;
+ return x * y;
}
Structure your review report as follows:
PR: https://github.com//pull/
Brief description of what this PR does:
path/to/file1.jsPriority: 🔴 SHOULD FIX Lines: 15-20
Issue: [Describe the problem]
Current code:
// Quote the problematic code
Suggested fix:
--- path/to/file1.js
+++ path/to/file1.js
@@ -15,2 +15,2 @@
-// old code
+// new code
path/to/file2.rbPriority: 🟡 MEDIUM Lines: 8-10
Issue: [Describe the problem]
[Continue for each file...]
Priority: 🟠 HIGH
Multiple files need consistent error handling:
File: src/api.js
[diff here]
File: src/utils.js
[diff here]
Recommendation: [Safe to merge ✅ | Needs changes ⚠️ | Blocking issues ❌]
Summary: [Brief summary of overall assessment]
Use emoji color-coding for priorities: