Command Palette

Search for a command to run...

Назад к скиллам
скилл № 36141

pr-execute

Execution phase of the PR review pipeline. Reads .claude/pr-{number}-triage.json, applies all FAIL/IMPROVE fixes inline, remediates CI failures, syncs the…

БесплатноБез исполняемых скриптов
CERTCCот CERTCC★ 22 звезды на GitHub

Установить pr-execute в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Skill: PR Execute

Purpose

Execute consumes the closed finding list from pr-triage and processes it in one batch pass. No new discovery happens here. The finding set is fixed at the start; execute either resolves each item or records why it was skipped.

Execute's exit criterion is CI green: it does not hand off to pr-verify until the branch is conflict-free against its base, the local gate passes, and all CI checks have completed successfully (or the cap of four counted iterations is reached; CI's first run on a draft is not counted, PAD-18-030).

After a PR's first push, CI is the full-suite authority (ADR-0221). Execute therefore merges the base only when the PR conflicts with it (PAD-18-004, ADR-0221), gates a conflict merge with the tests for the conflicted files, and gates each fix push with the linters plus the targeted test set for the branch diff, not the full suite (PAD-18-002). A PR GitHub reports BEHIND is refreshed on GitHub with gh pr update-branch, which needs no local run (PAD-18-014). A PR that merely shares files with the base is left alone: whoever merges it refreshes it the same way first (PAD-18-019).

One exception to "no new discovery": the CI loop (Phase 5) re-reads CI state and merge state from live sources rather than trusting triage's snapshots. CI failures and conflicts are moving targets — execute's own fixes can create them, and other PRs can land on the base branch mid-run.

Quick Start

# Execute against the current branch's open PR
/pr-execute

# Execute against a specific PR number
/pr-execute 1234

Prerequisites

.claude/pr-{number}-triage.json must exist. If absent, stop immediately:

❌ No triage artifact found for PR #N.
Run /pr-triage first (or /pr-ship to run the full pipeline).

Workflow

Phase 1 — Load Triage Artifact

  1. Detect PR number (current branch or explicit argument).
  2. Read .claude/pr-{number}-triage.json.
  3. Validate schema_version == "1.0". If mismatch, stop and report.
  4. Extract pr_metadata.domains and load the same domain context that triage used. Run PYTHONPATH= uv run build-context check first (.agents/skills/shared/build-context.md § "Reading it"). On exit 0, load what the file lists, then invoke deepen-context only for the domains that no hint= line covers. On any other exit, invoke deepen-context with all of them, as with no file.
  5. Note pr_metadata.needs_integration_tests. It is informational: Phase 5's gate does not read it: targeted-tests gates those paths by their importers, integration-marked ones included, and CI runs the rest (PAD-18-012, ADR-0221).
  6. Note pr_metadata.base_ref — Phase 5 syncs against this branch, not necessarily main.

Phase 2 — Apply fix-now Fixes

For each finding where decision_outcome is fix-now and severity is FAIL or IMPROVE:

Note: findings with severity: NEW-ISSUE are handled exclusively in Phase 3, regardless of their decision_outcome. Do not process them here. Phase 9 docs-currency findings are handled in Phase 3b.

  1. Apply the fix (edit files as needed).

  2. Do not commit yet — batch all fixes, then commit once at the end of this phase.

  3. After all fixes are applied: uv run ruff format then commit:

    fix(pr-execute): address <N> findings from triage
    
    <bullet per finding: phase-name — short description>
    
  4. Record commit_ref (short SHA) for each finding addressed in this commit.

Do not push yet. All pushes happen inside the CI loop (Phase 5) so that every push includes any merge the base called for and passes the local gate first.

Phase 3 — Handle NEW-ISSUE Findings

For each finding with severity: NEW-ISSUE. Filing a record is not the same as deferring the work — the default is to fix now and let the PR close the issue. See .claude/skills/shared/completeness-doctrine.md § "Filing Is Not Deferring" and "The Two Gates".

fix-now-file (an "also" excursion you fix now):

  1. File a GitHub issue via create-issue capturing the finding, with reason opened-as excursion. Tell it this PR also closes the issue, and suggest the worked issue's Epic as parent: PAD-02-041 exempts it from the Focus and Now drop. It picks the theme, routes the issue to a same-theme Epic, and adds it to Project #24.
  2. Fix it in this PR (fold into the Phase 2 batch). Add - Closes #N to the PR body and a one-line "why" in the Changes section (see pr-body-guide.md).
  3. Record outcome: fixed with the issue_number.

defer-ask (Gate 1 — second-order work genuinely too big to finish now):

  1. File a GitHub issue via create-issue with reason opened-as deferred.
  2. Post the deferral-ask (see "User Prompts: The Two Gates and a Decision" below): describe the remainder in plain language with a measured remainder (what you did, what concretely remains, the ratio) — not an attempt count.
  3. On explicit approval: record
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • REFERENCE.md

FAQ

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

Execution phase of the PR review pipeline. Reads .claude/pr-{number}-triage.json, applies all FAIL/IMPROVE fixes inline, remediates CI failures, syncs the branch with its base and resolves merge conflicts, files GitHub issues for out-of-scope findings, resolves review thread comments, and writes .claude/pr-{number}-execute.json. Use after /pr-triage, or as the second step of /pr-ship.

Как установить скилл pr-execute?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pr-execute запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить pr-execute с