원클릭으로
fix-pr
Use when a PR has review comments to address, CI failures to fix, or codecov coverage gaps to resolve
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when a PR has review comments to address, CI failures to fix, or codecov coverage gaps to resolve
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Use when preparing a new yao-rs release, bumping the version, or tagging a release
Use when you have a GitHub issue and want to create a PR with an implementation plan that triggers automated execution
Use after implementing a model, rule, or any code change to verify completeness and correctness before committing
SOC 직업 분류 기준
| name | fix-pr |
| description | Use when a PR has review comments to address, CI failures to fix, or codecov coverage gaps to resolve |
Resolve PR review comments, fix CI failures, and address codecov coverage gaps for the current branch's PR.
IMPORTANT: Do NOT use gh api --jq for extracting data — it uses a built-in jq that
chokes on response bodies containing backslashes (common in Copilot code suggestions).
Always pipe to python3 -c instead. (gh pr view --jq is fine — only gh api --jq is affected.)
# Get repo identifiers
REPO=$(gh repo view --json nameWithOwner --jq .nameWithOwner) # e.g., "owner/repo"
# Get PR number
PR=$(gh pr view --json number --jq .number)
# Get PR head SHA (on remote)
HEAD_SHA=$(gh api repos/$REPO/pulls/$PR | python3 -c "import sys,json; print(json.load(sys.stdin)['head']['sha'])")
Three sources of feedback to check:
# Copilot and user inline review comments (on code lines)
gh api repos/$REPO/pulls/$PR/comments | python3 -c "
import sys,json
for c in json.load(sys.stdin):
line = c.get('line') or c.get('original_line') or '?'
print(f'[{c[\"user\"][\"login\"]}] {c[\"path\"]}:{line} — {c[\"body\"]}')
"
# Review-level comments (top-level review body)
gh api repos/$REPO/pulls/$PR/reviews | python3 -c "
import sys,json
for r in json.load(sys.stdin):
if r.get('body'):
print(f'[{r[\"user\"][\"login\"]}] {r[\"state\"]}: {r[\"body\"]}')
"
# Issue-level comments (general discussion, excluding bots)
gh api repos/$REPO/issues/$PR/comments | python3 -c "
import sys,json
for c in json.load(sys.stdin):
login = c['user']['login']
if 'codecov' not in login and 'copilot' not in login:
print(f'[{login}] {c[\"body\"]}')
"
# All check runs on the PR head
gh api repos/$REPO/commits/$HEAD_SHA/check-runs | python3 -c "
import sys,json
for cr in json.load(sys.stdin)['check_runs']:
print(f'{cr[\"name\"]}: {cr.get(\"conclusion\") or cr[\"status\"]}')
"
# Codecov bot comment with coverage diff
gh api repos/$REPO/issues/$PR/comments | python3 -c "
import sys,json
for c in json.load(sys.stdin):
if c['user']['login'] == 'codecov[bot]':
print(c['body'])
"
Categorize all findings:
| Priority | Type | Action |
|---|---|---|
| 1 | CI failures (test/clippy/build) | Fix immediately -- blocks merge |
| 2 | User review comments | Address each one -- respond on PR |
| 3 | Copilot review comments | Evaluate validity, fix if correct |
| 4 | Codecov coverage gaps | Add tests for uncovered lines |
For each failing check:
make clippy locally, fix warningsmake test locally, fix failuresmake build locally, fix errorsFor each review comment:
Do NOT respond on the PR -- just fix and commit. The user will push and respond.
Copilot suggestions with suggestion blocks contain exact code. Evaluate each:
IMPORTANT: Do NOT run cargo-llvm-cov locally. Use the gh api to read the codecov report instead.
From the codecov bot comment (fetched in Step 1c), extract:
For detailed line-by-line coverage, use the Codecov API:
# Get file-level coverage for the PR
gh api repos/$REPO/issues/$PR/comments | python3 -c "
import sys,json,re
for c in json.load(sys.stdin):
if c['user']['login'] == 'codecov[bot]':
for m in re.findall(r'filepath=([^&\"]+)', c['body']):
print(m)
"
Then read the source files and identify which new/changed lines lack test coverage.
make test to verify tests passAfter pushing, CI will re-run coverage. Check the updated codecov comment on the PR.
After all fixes:
# Verify everything passes locally
make check # fmt + clippy + test
Commit with a descriptive message referencing the PR:
git commit -m "fix: address PR #$PR review comments
- [summary of fixes applied]
"
Report to user:
Run /review-implementation first to catch issues before push. Then /fix-pr after push to address CI and reviewer feedback.
After creating a PR and running make copilot-review, use /fix-pr to address the resulting feedback.