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★ 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
- Detect PR number (current branch or explicit argument).
- Read
.claude/pr-{number}-triage.json. - Validate
schema_version == "1.0". If mismatch, stop and report. - Extract
pr_metadata.domainsand load the same domain context that triage used. RunPYTHONPATH= uv run build-context checkfirst (.agents/skills/shared/build-context.md§ "Reading it"). On exit 0, load what the file lists, then invokedeepen-contextonly for the domains that nohint=line covers. On any other exit, invokedeepen-contextwith all of them, as with no file. - Note
pr_metadata.needs_integration_tests. It is informational: Phase 5's gate does not read it:targeted-testsgates those paths by their importers, integration-marked ones included, and CI runs the rest (PAD-18-012, ADR-0221). - Note
pr_metadata.base_ref— Phase 5 syncs against this branch, not necessarilymain.
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-ISSUEare handled exclusively in Phase 3, regardless of theirdecision_outcome. Do not process them here. Phase 9 docs-currency findings are handled in Phase 3b.
Apply the fix (edit files as needed).
Do not commit yet — batch all fixes, then commit once at the end of this phase.
After all fixes are applied:
uv run ruff formatthen commit:fix(pr-execute): address <N> findings from triage <bullet per finding: phase-name — short description>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):
- File a GitHub issue via
create-issuecapturing the finding, with reasonopened-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. - Fix it in this PR (fold into the Phase 2 batch). Add
- Closes #Nto the PR body and a one-line "why" in the Changes section (seepr-body-guide.md). - Record
outcome: fixedwith theissue_number.
defer-ask (Gate 1 — second-order work genuinely too big to finish now):
- File a GitHub issue via
create-issuewith reasonopened-as deferred. - 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.
- On explicit approval: record
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- 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), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…