pr-verify
Verification phase of the PR review pipeline. Reads .claude/pr-{number}-execute.json, re-checks mergeability as a hard gate, spot-checks each claimed fix…
от CERTCC★ 22 звезды на GitHub
Установить pr-verify в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Skill: PR Verify
Purpose
Verify closes the loop. It checks what execute claimed to do against what
actually exists at HEAD, posts a verdict, and cleans up the session artifacts.
It does not fix anything — if gaps are found, they are flagged for the user to
re-run /pr-execute or fix manually.
Verify is also the last and authoritative mergeability check. Because it runs
after every mutation in the pipeline, its merge-state reading is the only one
that can be trusted at verdict time. READY-TO-MERGE is impossible without a
live MERGEABLE result — a PR that cannot merge is never ready to merge,
regardless of how many findings were confirmed.
Quick Start
# Verify the current branch's open PR
/pr-verify
# Verify a specific PR
/pr-verify 1234
Prerequisites
.claude/pr-{number}-execute.json must exist. If absent, stop immediately:
❌ No execute artifact found for PR #N.
Run /pr-execute first (or /pr-ship to run the full pipeline).
Also requires .claude/pr-{number}-triage.json for finding descriptions. If
the triage artifact is missing but the execute artifact exists, proceed using
only the execute artifact data — but note the missing triage artifact in the
comment.
Workflow
Phase 1 — Load Artifacts
Detect PR number (current branch or explicit argument).
Check
.claude/pr-{number}-execute.jsonagainst its schema,pr-execute/REFERENCE.md§ "Execute Artifact Schema". This skill reads the artifact by that section and does not restate it:PYTHONPATH= uv run execute-artifact check .claude/pr-<number>-execute.jsonOn exit
1, flagMALFORMED-EXECUTEand quote the fields the check names. The artifact cannot be read, so do not read any value from it. Skip every step that reads it: steps 4 and 5 below, Phase 3b steps 2 and 3, Phases 4–5, and Phase 6 steps 1 and 4. Run Phase 2 with--check-markers, the strict choice. Run Phase 3 without--integration, and say in the comment that whether integration tests were owed is unknown: with the flag, a green PR that ran no integration workflow reads as failing. In the comment, the check's error list takes the place of the per-finding table. The overall verdict isGAPS-FOUND. The remedy is a re-run of/pr-execute, which writes a new artifact. Do not re-derive what the artifact should have said: execute owns that record.Exit
2means the file cannot be read: stop as for an absent artifact (§ "Prerequisites").Read
.claude/pr-{number}-triage.jsonif present.Integrity check: verify
len(execute.results) == len(triage.findings). If counts diverge, flagINCOMPLETE-EXECUTEand continue to Phase 2 (merge state and CI must still be checked). After Phase 3, skip Phases 4–5 and go directly to Phase 6 with an overall verdict ofGAPS-FOUND.Merge-state block check: flag
UNSYNCED-EXECUTEifmerge_state.conflict_freeis nottrue, or ifmerge_state.merge_requiredistruewith a nullsync_commit_ref(PAD-18-004 called for a merge that never happened). A valid artifact always carries the block (step 2), so the flag is about what execute recorded, never about a missing block.merge_reason: "deferred"withmerge_required: falseand a nullsync_commit_refis not that: execute found an overlap and, by design, left it to the merger'sgh pr update-branch(PAD-18-019, ADR-0221). Do not flag it. Continue to Phase 2 — the live check there is what decides the verdict — but this flag alone blocksREADY-TO-MERGE, because it means execute never established the branch was conflict-free.This check reads the artifact and nothing else. Do not compare the branch to the base tip (
git merge-base --is-ancestor,rev-listcounts, or similar): a branch behind its base that does not conflict is conflict-free, overlapping files or not, and execute was right not to merge (PAD-18-005). Whether being behind blocks the merge is GitHub's call, read in Phase 2 asBEHIND, which execute clears withgh pr update-branch.
Phase 2 — Merge State Gate
This is a hard gate and runs before the per-finding spot checks: a conflicted PR cannot be ready to merge no matter what those checks find.
Re-check merge state live — never reuse the value from either artifact. Add
--check-markerswhenexecute.merge_state.conflicts_resolvedis non-empty: a resolved-then-recommitted marker passes CI lint on some file types and would otherwise ship.bash .agents/skills/shared/verify-merge-gate.sh <number> [--check-markers]The script runs
merge-state.shonce and applies the flag table in its header.CONFLICTING,DIRTYor a surviving<<<<<<</>>>>>>>marker raisesMERGE-CONFLICT, even ifmergeablesaysMERGEABLE.UNKNOWNraisesMERGE-STATE-UNKNOWN,BEHINDraisesBRANCH-BEHIND, and `is_draft:
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- REFERENCE.md
FAQ
Что делает скилл pr-verify?
Verification phase of the PR review pipeline. Reads .claude/pr-{number}-execute.json, re-checks mergeability as a hard gate, spot-checks each claimed fix against HEAD (not just the commit diff), validates CI and test suite, and posts a per-finding verdict comment on the PR. Cleans up both artifact files as its final step. Makes NO code changes. Use after /pr-execute, or as the third step of /pr-ship.
Как установить скилл pr-verify?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-verify запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…