goal-pr
БесплатноБез исполняемых скриптовНе проверен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…
от dyoshikawa★ 1 671 звезда на GitHubОб этом скилле
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/nullIf 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.
2-1. Review Phase
Use the review-pr skill with target_pr. It assigns each finding a
severity (low / mid / high / critical) and a sequential number, and also
reports the GitHub Actions workflow status.
Note: the review-pr skill only reads remote state and must not switch the local branch.
Keep that constraint intact during the review phase.
2-2. Evaluate the Exit Condition
Use both the findings and the GitHub Actions status from the review result.
- If
mid + high + critical == 0and CI is green (nofail/pendingcheck): exit the loop and go to Section 3. - If there are
mid-or-above findings, or any CI check is failing: proceed to the fix phase to address them. - If the findings are clean but CI is still
pending: wait for the checks to finish (re-check withgh pr checks <pr>), then re-evaluate. Do not proceed to merge while checks are pending.
2-3. Fix Phase
Fix every finding of severity mid or above on the current branch (you may also
fix low findings opportunistically). Unlike the review phase, this phase works
on the local branch directly:
Edit the relevant files to address each
mid-or-above finding. If you intentionally reject a finding, record the reason and treat it as resolved.Run
pnpm cicheck(or the narrowerpnpm cicheck:code/cicheck:contentwhen appropriate) and fix any failures before continuing.Stage only the files you changed for the fix (review
git statusfirst so unrelated or generated files are not swept in), commit with a descriptive message, and push to the PR's head branch:git status git add <changed files> git commit -m "<message>" git push origin HEAD
Emit a short status line such as
Iteration N — mid: X, high: Y, critical: Z; pushed fixes, then return to
Section 2-1 so the updated PR (and its CI) is reviewed again.
3. Merge
Only reach this step once the exit condition in Section 1 holds — clean findings
and green CI. Merge the PR by using the merge-pr skill with
target_pr. That skill verifies the PR is open, checks GitHub Actions status,
merges with gh pr merge --admin --merge, posts a thank-you comment, and cleans
up the local branch.
Safety rules for the merge:
- Never merge while any check is
failorpending.gh pr merge --adminbypasses required checks, so it must not be used to force past red or in-progress CI. If CI is failing, return to the fix phase; if it is pending, wait. - If the PR edits GitHub Actions workflows (
.github/**) or the release/publish pipeline, or adds a new runtime dependency, do not auto-merge. Stop and ask the user to confirm, since these changes carry higher risk. Bumping an existing dependency, adding a dev dependency, or editingpackage.jsonscripts and metadata does not need confirmation.
4. Final Report
After the loop ends, report to the user:
- Outcome:
Merged(exit condition met and PR merged),Merged at cap(onlymidfindings left at the cap; merged with a scrap issue), orCapped(ahigh/criticalfinding or red CI left at the
Установить goal-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл goal-pr?
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?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл goal-pr запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic