处理 Review 意见
review-feedback 拉取当前 PR 上 Copilot 或人工 Reviewer 的意见,按严重程度分类后修复、推送,并说明哪些意见被跳过及原因。
| 调用 | 触发 | 来源 |
|---|---|---|
/ai-coding:review-feedback [pr-number] | 仅手动 | ai-coding 插件 |
适用场景
- PR 收到一批 Review 意见,希望统一处理并逐条回复;
- 同时处理 Copilot 和人工 Reviewer 的意见。
安装
bash
# 作为插件安装(包含 Issue → PR 与代码审查全部 Skills)
claude plugin install ai-coding@yunyoujun
# 或单独安装
npx skills add YunYouJun/ai --skill=review-feedback使用示例
text
# 自动识别当前分支的 PR
/ai-coding:review-feedback
# 指定 PR
/ai-coding:review-feedback 128流程
- 取 PR 编号:使用参数,或从当前分支识别;
- 拉取 Review、评论和行内评论;
- 分为必须修复、建议修复和可选三类;
- 修复前两类,然后运行 lint 和类型检查;
- 以
fix: address review feedback提交并推送; - 在 PR 上回复已处理的意见,汇报修改内容和跳过原因。
注意
这个 Skill 会直接推送并在 PR 上发表评论,请在确认可以发布的分支上使用。只处理 Copilot 意见、需要更严格的授权边界时,改用 address-copilot-review。
完整指令
SKILL.md
md
---
name: review-feedback
description: Fetch and address PR review feedback from Copilot or human reviewers - analyze, fix, push, and report.
disable-model-invocation: true
---
Fetch and address PR review feedback (from Copilot or human reviewers).
## Instructions
1. Get the current PR number. If $ARGUMENTS is provided, use it as the PR number. Otherwise, detect from the current branch: `gh pr view --json number -q .number`
2. Fetch all review comments: `gh pr view <number> --json reviews,comments,reviewRequests`
3. Also fetch inline review comments: `gh api repos/{owner}/{repo}/pulls/<number>/comments --jq '.[] | {path, line: .original_line, body, diff_hunk}'`
4. Analyze each review comment and categorize:
- **Must fix**: bugs, security issues, correctness problems
- **Should fix**: style, readability, best practices
- **Optional**: nitpicks, suggestions
5. For each "must fix" and "should fix" item, implement the changes
6. Run lint/typecheck after changes
7. Commit with message: `fix: address review feedback`
8. Push the changes: `git push`
9. Reply to each addressed comment on the PR: `gh pr comment <number> --body "Addressed review feedback: <summary>"`
10. Report what was changed and what was intentionally skipped (with reasoning)