用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/dotnet/nuget-trends --skill address-review命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | address-review |
| description | Address all code review comments on a PR. Assesses each comment, replies, reacts, and resolves threads. |
| argument-hint | ["pr-number"] |
| allowed-tools | Bash(gh *), Bash(git add *), Bash(git commit *), Bash(git push *), Bash(dotnet build *), Read, Grep, Glob, Edit, Write, WebFetch |
You are addressing code review comments on PR #$ARGUMENTS.
Bot reviewers (Copilot, Sentry, Codex, etc.) take time to post their comments after a commit is pushed. Before processing, wait until reviews have landed:
gh pr view $ARGUMENTS --json commits --jq '.commits[-1].committedDate'
This ensures you don't start processing before all reviewers have had a chance to comment.
Fetch the PR details and all review comments:
gh pr view $ARGUMENTS --json title,body,headRefName,baseRefName
gh api repos/{owner}/{repo}/pulls/$ARGUMENTS/comments --paginate
gh api repos/{owner}/{repo}/pulls/$ARGUMENTS/reviews --paginate
Also fetch the current diff so you understand the changes being reviewed:
gh pr diff $ARGUMENTS
For every review comment (from bots or humans), evaluate it:
For each comment, do ALL of the following:
gh api repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions -f content='+1'
gh api repos/{owner}/{repo}/pulls/$ARGUMENTS/comments -f body="..." -F in_reply_to={comment_id}
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "THREAD_NODE_ID"}) { thread { isResolved } } }'
gh api repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions -f content='-1'
gh api repos/{owner}/{repo}/pulls/$ARGUMENTS/comments -f body="..." -F in_reply_to={comment_id}
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "THREAD_NODE_ID"}) { thread { isResolved } } }'
If any code changes were made:
address review: <brief summary of changes>After processing all comments, post a summary as a PR comment and also display it to the user:
gh pr comment $ARGUMENTS --body "$(cat <<'EOF'
## Review comments addressed
| # | Comment | Author | Verdict | Action |
|---|---------|--------|---------|--------|
| 1 | ... | ... | ... | ... |
EOF
)"
{owner}/{repo} from gh repo view --json nameWithOwner -q .nameWithOwner.after cursor if hasNextPage is true):
gh api graphql -f query='query { repository(owner:"{owner}", name:"{repo}") { pullRequest(number:$ARGUMENTS) { reviewThreads(first:100) { pageInfo { hasNextPage endCursor } nodes { id isResolved comments(first:1) { nodes { body databaseId } } } } } } }'
Match threads by the databaseId of the first comment in each thread. If hasNextPage is true, repeat the query with after:"{endCursor}" to fetch remaining threads.基于 SOC 职业分类