一键导入
bms-resolve-pr-comments
Review open review comments on a GitHub PR, agree a fix with the user, apply the change, commit, push, and mark the thread resolved.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review open review comments on a GitHub PR, agree a fix with the user, apply the change, commit, push, and mark the thread resolved.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Performs a harsh but constructive code review of a file or set of files. Use when asked to review, critique, or give feedback on code quality.
Evaluates whether a GitHub repository (tool, library, or framework) is worth adopting for the current project. Use when given a GitHub repo URL to assess as a potential dependency or tool.
Analyzes a GitHub issue by fetching its details and exploring the relevant codebase to identify the root cause and suggest solutions. Use when given a GitHub issue URL to investigate.
Creates a proof of concept implementation. Provides the smallest working solution to validate an idea, with no tests and minimal production concerns.
Proofreads a blog post for clarity, balance, and general quality. Use when asked to proofread, review, or critique a blog post or article.
Summarize diary entries for a given time period
| name | bms:resolve-pr-comments |
| description | Review open review comments on a GitHub PR, agree a fix with the user, apply the change, commit, push, and mark the thread resolved. |
Review open review comments on a GitHub PR one at a time, agree a fix with the user, apply the change to the branch, commit, push to GitHub, and mark the comment thread as resolved.
<PR-URL>: The GitHub PR URL to inspect (e.g., https://github.com/org/repo/pull/123)If no PR URL is provided, prompt the user to provide one.
gh CLI installed and authenticatedUse the gh CLI to fetch all review comments for the PR:
gh api repos/<owner>/<repo>/pulls/<number>/reviews/<review-id>/comments
Or fetch all review comments across all reviews:
gh api repos/<owner>/<repo>/pulls/<number>/comments
Only surface comments that are not yet resolved. To check resolution status, fetch the review threads via GraphQL:
gh api graphql -f query='
{
repository(owner: "<owner>", name: "<repo>") {
pullRequest(number: <number>) {
reviewThreads(first: 20) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
databaseId
body
}
}
}
}
}
}
}'
Filter to threads where isResolved: false.
If no unresolved comments are found, report "No open review comments" and exit.
Summarise each unresolved comment clearly:
Ask the user to confirm the approach before making any changes. Work through comments one at a time unless the user asks to handle multiple at once.
gh pr checkout <PR-URL>
Note: gh pr checkout may leave you in a detached HEAD state if the branch is from a fork. Check with git status and identify the correct remote and branch name for pushing later.
Make the agreed code change. Do not commit yet — let the user verify if needed.
git add <changed files>
git commit -m "<message>"
After committing, check git status for the push target. If in detached HEAD state, push explicitly:
git push <remote> HEAD:refs/heads/<branch-name>
Identify the correct remote by running git remote -v — push to the upstream org remote (not a personal fork) unless the PR originates from a fork.
Use the GraphQL resolveReviewThread mutation with the thread's node ID (obtained in step 1):
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "<thread-node-id>"}) {
thread {
isResolved
}
}
}'
Confirm the response shows "isResolved": true.
Tell the user:
Then move on to the next unresolved comment (if any), repeating from step 2.
git remote -v to identify the correct remote and push target explicitly.