К основному содержанию
скилл CX Codex

goal-pr — скилл для Claude Code: что делает и как установить

Автоматически доводит пулреквест до слияния: запускает ревью, исправляет замечания средней и высокой важности, ждёт зелёных проверок CI и делает мерж.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add dyoshikawa/rulesync --skill goal-pr -a claude-code
Открыть на GitHub

Что делает goal-pr

Скилл берёт текущий или указанный пулреквест и запускает цикл правок. Если ветка ещё не опубликована, он сначала создаёт PR через вспомогательный скилл commit-push-pr. На каждом шаге агент вызывает review-pr, оценивает статус проверок GitHub Actions и классифицирует найденные проблемы по уровням важности.

Для каждого замечания уровня mid и выше агент правит файлы на локальной ветке, прогоняет pnpm cicheck, коммитит изменения и пушит их в репозиторий. Лимит цикла составляет 10 итераций. Если лимит достигнут, но проверки пройдены и остались только замечания уровня mid, скилл фиксирует их через create-scrap-issue и всё равно выполняет слияние.

Без чистого CI слияние заблокировано: команда gh pr merge --admin не запустится на красных тестах. Скилл также остановится и запросит ручное подтверждение, если в PR меняются пайплайны в .github/** или добавляются новые рантайм-зависимости.

Какие задачи решает

  • довести пулреквест до слияния без ручного исправления замечаний
  • устранить критические и средние замечания после автоматического код-ревью
  • проверить локальные тесты командой pnpm cicheck перед отправкой коммита
  • создать issue в репозитории для некритичных замечаний при достижении лимита итераций

Примеры запросов агенту

  • Доведи PR #42 до чистого состояния и сделай мерж с помощью goal-pr
  • Запусти скилл goal-pr для текущей ветки
  • Проверь и исправь замечания в этом пулреквесте через goal-pr

Как установить goal-pr

1Через Skills CLI (Vercel)

npx skills add dyoshikawa/rulesync --skill goal-pr -a claude-code

2Вручную: положить файлы

~/.claude/skills/goal-pr/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/goal-pr/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о goal-pr

Как установить goal-pr в Claude Code?

Выполните команду npx skills add dyoshikawa/rulesync --skill goal-pr -a claude-code.

Что делает скилл goal-pr?

Он запускает цикл код-ревью через review-pr, вносит исправления для всех замечаний уровня mid и выше, прогоняет тесты и автоматически вливает PR после успешных проверок в GitHub Actions.

В каких случаях goal-pr откажется от автоматического мержа?

Скилл остановится и запросит подтверждение разработчика, если в пулреквесте добавлены новые рантайм-зависимости, изменены рабочие процессы в .github/** или если проверки CI завершились ошибкой.

Исходный текст

SKILL.md · MIT
---
name: goal-pr
description: >-
  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".
targets:
  - "*"
---

# 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

1. If `target_pr` is provided (e.g. `123`, `#123`, or a PR URL), use it.
2. Otherwise, look for the PR of the current branch:

   ```bash
   gh pr view --json number,title,state,headRefName 2>/dev/null
   ```

3. If no PR exists yet, create one (this satisfies the "PR is the goal" intent):
   - Use the `commit-push-pr` skill to commit the current changes, push the
     branch, and open a PR.
   - Then resolve `target_pr` to the freshly created PR number.

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`, or `critical` (only `low` findings,
  or none at all, may remain).
- The PR's GitHub Actions checks are **green** — no check is `fail` or
  `pending`.

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` (no `high` or
  `critical`), merge anyway: record the remaining findings with the
  `create-scrap-issue` skill so they are tracked, then go to **Section 3**.
  `mid` findings are not merge blockers.
- Otherwise (a `high` / `critical` finding 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 == 0` **and** CI is green (no `fail` / `pending`
  check): 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 with `gh 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:

1. 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.
2. Run `pnpm cicheck` (or the narrower `pnpm cicheck:code` / `cicheck:content`
   when appropriate) and fix any failures before continuing.
3. Stage only the files you changed for the fix (review `git status` first so
   unrelated or generated files are not swept in), commit with a descriptive
   message, and push to the PR's head branch:

   ```bash
   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 `fail` or `pending`.** `gh pr merge --admin`
  bypasses 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
  editing `package.json` scripts 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`
  (only `mid` findings left at the cap; merged with a scrap issue), or `Capped`
  (a `high` / `critical` finding or red CI left at the cap; not merged).
- **Iterations**: how many review/fix rounds were executed.
- **Final severity summary**: the counts per severity from the last review
  round.
- **Result**: the merged PR number and title (plus the scrap issue link when
  merged at the cap), or — when capped — the list of remaining findings for
  the user to decide on.

© dyoshikawa · MIT · dyoshikawa/rulesync

Похожие скиллы

Все скиллы по теме «Git и GitHub» →
triage Matt Pocock Скилл проводит issue и внешние PR через роли триажа, проверку и подготовку брифа для агента. Подойдёт мейнтейнеру, который разбирает очередь задач. 990 453установок code-review Matt Pocock Проверяет изменения от выбранной точки по стандартам репозитория и требованиям задачи. Нужен для ревью ветки, PR или незавершённой работы. 789 521установок implement Matt Pocock Выполняет задачу по спецификации или тикетам, ведёт работу через тесты и завершает её ревью с коммитом. Подходит для задач, где нужен дисциплинированный цикл разработки. 774 700установок git-guardrails-claude-code Matt Pocock Скилл ставит хук Claude Code, который останавливает опасные Git-команды до их запуска. Нужен, если агент не должен делать push или удалять изменения. 499 069установок setup-pre-commit Matt Pocock Скилл настраивает pre-commit для JavaScript-репозитория: Husky запускает форматирование, проверку типов и тесты перед коммитом. 489 289установок scaffold-exercises Matt Pocock Скилл создаёт структуру учебных упражнений с секциями, задачами, решениями и пояснениями. Пригодится при запуске нового раздела курса. 480 196установок

Из того же набора36

porting-another-repository Разбирает фичу в текущем репозитории и правила целевого, а потом пишет план переноса в tmp/ — файлами, которые вы применяете руками. CX Codex +1 ★ 1 557звёзд репо merge-pr Скилл закрывает пулл-реквесты в GitHub через команду gh pr merge с флагом --admin, ждёт тесты CI и удаляет локальную ветку. CX Codex +1 ★ 1 557звёзд репо merge-contributor-pr Скилл разрешает конфликты в чужих pull request и помогает слить изменения, сохранив исходные коммиты и их авторство. Пригодится, когда ветка автора расходится с main. CX Codex +1 ★ 1 557звёзд репо goal-release Ведёт релиз целиком: открывает PR, ждёт зелёный CI, мержит и обновляет формулу Homebrew. Пригодится, когда версию надо выпустить одной командой. CX Codex +1 ★ 1 557звёзд репо goal-issues-and-release Скилл последовательно разбирает открытые issues, затем запускает процесс релиза. Решения по обычным вопросам он принимает сам, а ограничения безопасности соблюдает. CX Codex +1 ★ 1 557звёзд репо git-worktree-runner Скилл учит агента управлять git worktree через CLI-обёртку gtr: создавать, открывать в редакторе, запускать команды и удалять. CX Codex +1 ★ 1 557звёзд репо explain-pr Разбирает пулреквест: забирает описание и диф через GitHub CLI, а затем объясняет исходную проблему и суть предложенного решения. CX Codex +1 ★ 1 557звёзд репо explain-issue Скилл объясняет, какую проблему описывает GitHub issue и какое решение предлагают. Пригодится, чтобы быстро разобраться в обсуждении задачи. CX Codex +1 ★ 1 557звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой