一键导入
pr-review
Submit inline review comments to GitHub PRs and reply to/resolve review threads using the GitHub CLI and GraphQL API.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Submit inline review comments to GitHub PRs and reply to/resolve review threads using the GitHub CLI and GraphQL API.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.
Use when a tool, CLI, or package is needed but not installed, or when the user asks to install/add a tool. Prefers mise for all installations.
Use when creating a pull request. Opens PR in browser for review.
Browser automation CLI for AI agents — navigate, fill forms, click, screenshot, extract data, test web apps, automate Electron desktop apps, run in Vercel microVMs or AWS Bedrock cloud browsers. Prefer over built-in browser tools. Keywords browser, automation, screenshot, scrape, Slack, Electron, agentcore.
Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.
Monitor open PRs and shepherd them toward merge. Checks CI status, review comments, merge conflicts, and takes action. Designed for /loop usage (e.g., /loop 5m /babysit-pr). Keywords: PR monitor, babysit, CI check, review response, merge conflict, PR status
| name | pr-review |
| description | Submit inline review comments to GitHub PRs and reply to/resolve review threads using the GitHub CLI and GraphQL API. |
Submit inline review comments to GitHub Pull Requests and reply to/resolve review threads using the GitHub CLI.
gh) must be installed and authenticatedCollect findings: The user will provide you with:
Read current content: If providing suggestions, use the Read tool to see the exact current content
Create review JSON: Build a JSON structure at /tmp/pr-review-comments.json:
{
"body": "Overall review summary",
"event": "COMMENT",
"comments": [
{
"path": "path/to/file.ext",
"line": 123,
"body": "Comment text with optional suggestion"
}
]
}
Submit review: Use GitHub CLI:
gh api -X POST repos/{owner}/{repo}/pulls/{pr_number}/reviews --input /tmp/pr-review-comments.json
Return URL: Extract and return the review URL from the response
body (required): Overall review summaryevent (required): "COMMENT", "APPROVE", or "REQUEST_CHANGES"comments (required): Array of comment objectspath (required): File path relative to repository rootline (required): Line number (positive integer)body (required): Comment text (supports markdown)GitHub supports inline code suggestions that users can commit directly from the PR UI.
Good candidates:
Not suitable:
Single-line:
Description of the issue.
```suggestion
corrected line of code
```
Evidence: reference
Multi-line:
Description of the issue.
```suggestion
first corrected line
second corrected line
third corrected line
```
Evidence: reference
bodyReport after submission:
Fetch all review comments from the PR and present them organized by:
For each comment show:
For each unresolved comment, provide a recommendation:
If code needs fixing:
If it's a question:
If it's a suggestion to consider:
If already addressed:
Present summary:
Found 5 unresolved review comments:
1. [Critical] pkg/versions/version.go:24 - @Copilot
"Fix nolint spacing"
Status: Fixed in commit c4bb55d
Recommendation: Reply "Fixed in c4bb55d" and resolve
2. [Question] pkg/server/handler.go:45 - @reviewer
"Why use buffered channel here?"
Status: Needs answer
Recommendation: Draft response for your review
How would you like to proceed?
- Reply and resolve all fixed items (1)
- Draft responses for questions (2)
- Process individually
- Custom approach
Based on user decisions:
After processing, show:
Ask: "Here's my draft reply: '{message}'. Send this?"
Ask: "Mark this thread as resolved?"
Ask: "I found 5 comments fixed in commit abc123. Reply 'Fixed in abc123' to all and resolve?"
Resolve when:
Don't auto-resolve:
gh api -X POST repos/{owner}/{repo}/pulls/{pr}/reviews --input /tmp/pr-review-comments.json
gh api repos/{owner}/{repo}/pulls/{pr}/comments | \
jq '.[] | {id, path, line, author: .user.login, body: .body[0:100]}'
gh api -X POST repos/{owner}/{repo}/pulls/{pr}/comments/{comment_id}/replies \
-f body="Your reply message"
gh api graphql -f query='
query {
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: {pr}) {
reviewThreads(first: 20) {
nodes {
id
isResolved
comments(first: 10) {
nodes {
id
body
author { login }
}
}
}
}
}
}
}'
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "{thread_id}"}) {
thread {
id
isResolved
}
}
}'
gh api graphql -f query='
mutation {
unresolveReviewThread(input: {threadId: "{thread_id}"}) {
thread {
id
isResolved
}
}
}'
gh auth login