一键导入
pr-review
Find the PR for the current branch, check review comments, and address reviewer feedback by making code changes. Uses the `gh` CLI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Find the PR for the current branch, check review comments, and address reviewer feedback by making code changes. Uses the `gh` CLI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guidance for Worktrunk, a CLI tool for managing git worktrees. Covers configuration (user config at ~/.config/worktrunk/config.toml and project hooks at .config/wt.toml), usage, and troubleshooting. Use for "setting up commit message generation", "configuring hooks", "automating tasks", or general worktrunk questions.
Interact with Linear project management — list, search, create, update issues, manage projects, cycles, and teams. Uses the Linear API via @linear/sdk. Requires LINEAR_AGENT_API_KEY environment variable.
| name | pr-review |
| description | Find the PR for the current branch, check review comments, and address reviewer feedback by making code changes. Uses the `gh` CLI. |
Address PR review feedback for the current branch.
When asked to address PR reviews, follow this sequence:
gh pr view --json number,title,state,body,reviewDecision,headRefName,baseRefName,statusCheckRollup
Only fetch unresolved threads — ignore anything already resolved:
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
isResolved
comments(first: 10) {
nodes {
databaseId
author { login }
body
path
line
createdAt
diffHunk
}
}
}
}
}
}
}
' -f owner="{owner}" -f repo="{repo}" -F pr=<number> --jq '
.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved == false)
| .comments.nodes[]
| "ID: \(.databaseId)\nFile: \(.path):\(.line // "?")\nAuthor: \(.author.login) (\(.createdAt | split("T")[0]))\n\(.diffHunk | split("\n") | .[-3:] | map(" │ \(.)") | join("\n"))\n💬 \(.body)\n"
'
gh pr view --json files --jq '.files[] | "\(.status) +\(.additions) -\(.deletions) \(.path)"'
gh pr diff # full diff
gh pr diff | awk '/^diff --git.*<file>/{show=1} /^diff --git/ && !/'"<file>"'/{show=0} show' # single file
Read the files mentioned in review comments and address the feedback.
Write a commit message that describes what actually changed, not just "address review feedback".
git add -A && git commit -m "Refactor auth middleware to validate tokens before routing" && git push
For each review comment, decide based on whether action was taken:
If code changes were made to address the comment — resolve the thread silently (no reply needed). Find the thread ID and resolve it:
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
databaseId
}
}
}
}
}
}
}
' -f owner="{owner}" -f repo="{repo}" -F pr=<number>
Then resolve the thread using its GraphQL node ID:
gh api graphql -f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread { isResolved }
}
}
' -f threadId="<thread-node-id>"
If no action was taken (e.g., disagree, out of scope, already handled, intentional) — reply explaining why:
gh api "repos/{owner}/{repo}/pulls/<number>/comments/<comment-id>/replies" -f body="<explanation of why no action was taken>"
gh pr checks
gh api "repos/{owner}/{repo}/pulls/<number>/reviews" --jq '.[] | select(.state != "COMMENTED") | "[\(.state)] \(.user.login): \(.body)"'