Goal PR
Drive a pull request to a clean state and merge it: run the `review-pr` skill, fix...
Install
npx skills add dyoshikawa/rulesync --skill goal-pr -g -a claude-code -y- Repository
- dyoshikawa/rulesync1.6k
- Category
- Git and review
- Updated
- 3d ago
- License
- MIT
- Context cost
- Lightabout 1,335 tokens
- Runs scripts
- No, instructions only
What it does
Drive a pull request to a clean state and merge it: run the `review-pr` skill, fix every mid-or-above finding, and repeat until no mid-or-above findings remain, then merge. Use when the user wants to finish a PR by reviewing, fixing, and merging it, or triggers on "the `goal-pr` skill".
Goal PR
target_pr = the user's request
This skill drives a pull request all the way to merge. It repeatedly runs
the review-pr skill, fixes every finding of severity mid or above, and merges the PR
once a review round reports no mid-or-above findings.
0. Determine and Prepare the Target PR
-
If
target_pris provided (e.g.123,#123, or a PR URL), use it. -
Otherwise, look for the PR of the current branch:
gh pr view --json number,title,state,headRefName 2>/dev/null -
If no PR exists yet, create one (this satisfies the "PR is the goal" intent):
- Use the
commit-push-prskill to commit the current changes, push the branch, and open a PR. - Then resolve
target_prto the freshly created PR number.
- Use the
Confirm that the current local branch is the PR's head branch, because the fix phase below must commit and push fixes onto that branch. If they differ, ask the user how to proceed and stop.
1. Exit Condition
The loop exits when a single review round satisfies both of:
- 0 findings of severity
mid,high, orcritical(onlylowfindings, or none at all, may remain). - The PR's GitHub Actions checks are green, no check is
failorpending.
Set a hard safety cap of 10 iterations. If the exit condition is still not met at the cap:
- If CI is green and every remaining finding is
mid(nohighorcritical), merge anyway: record the remaining findings with thecreate-scrap-issueskill so they are tracked, then go to Section 3.midfindings are not merge blockers. - Otherwise (a
high/criticalfinding remains, or CI is red), stop the loop and report the remaining findings and failing CI instead of merging.
2. Iteration Loop
Repeat the following until the exit condition is satisfied or the cap is hit.

