一键导入
pr-autofix
After creating a PR, poll for AI review comments and auto-fix issues (max 3 iterations)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
After creating a PR, poll for AI review comments and auto-fix issues (max 3 iterations)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | pr-autofix |
| description | After creating a PR, poll for AI review comments and auto-fix issues (max 3 iterations) |
After you create a PR (via gh pr create), automatically wait for the AI Code Review CI to complete, then read review feedback and fix issues. Repeat up to 3 times until the review passes.
Invoke this skill immediately after creating a PR. It replaces the manual cycle of:
PR created → poll for review comment → FAIL? → read issues → fix code → commit & push → repeat
→ PASS? → done
→ 3 iterations? → stop, notify user
Get the PR number from the most recent gh pr create output, or from the current branch:
PR_NUMBER=$(gh pr list --head "$(git branch --show-current)" --json number --jq '.[0].number')
The AI Code Review workflow (pr-review.yml) posts a comment containing <!-- bedrock-pr-review -->. Poll until it appears or is updated (check the updated_at timestamp is after the last push).
gh api "repos/{owner}/{repo}/issues/${PR_NUMBER}/comments" \
--jq '.[] | select(.body | contains("<!-- bedrock-pr-review -->"))'
Poll every 60 seconds. If no review comment appears within 10 minutes, stop and inform the user.
Extract the verdict from the review comment body:
**Status: PASSED** → done, inform user**Status: BLOCKED** → proceed to fixRead the review comment and the current diff. Fix ONLY the issues mentioned:
git add <changed-files>
git commit -m "fix: address AI review feedback (iteration N/3)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
git push
fix: address AI review feedback