finalize-pr

Orchestrates pre-merge PR checks, fixes, commits, and description updates before review.

Updated Dec 25, 2021
One-click install
npx skills add https://github.com/kotahashihama/dotfiles --skill finalize-pr-kotahashihama
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finalize-pr
Source: https://github.com/kotahashihama/dotfiles/tree/main/home/.claude/skills/finalize-pr
Command: npx skills add https://github.com/kotahashihama/dotfiles --skill finalize-pr-kotahashihama

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Before a pull request goes to review, several independent checks must run in the right order: verifying the branch still integrates with an advanced base branch, running comment/convention/test reviews, applying fixes, committing, and deciding whether the PR description needs updating. Doing this manually is error-prone and easy to sequence incorrectly. ## Core Features & Use Cases - Base Integration Verification: Uses a temporary git worktree to merge the latest base branch and run builds/tests without dirtying the working tree, catching breakage that branch-only CI misses. - Sequential Review Orchestration: Invokes review-comments, review-conventions, and review-tests skills in order, then applies [must] fixes and reports skipped [imo]/[nits] suggestions with reasons. - Commit and PR Description Finalization: Delegates committing to the cp skill and conditionally calls update-pr-description only when the diff and description have diverged. - Use Case: After finishing a feature branch, ask to finalize the PR; the skill verifies base integration, runs all three reviews, fixes violations, pushes commits, and refreshes the PR description in one pass. ## Quick Start Ask the assistant to finalize the current pull request before review, optionally providing a PR number or URL.

Frequently Asked Questions about finalize-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run all pre-review checks before submitting a pull request?

Invoke the finalize-pr workflow with an optional PR number or URL. It verifies base-branch integration in a temporary worktree, runs comment, convention, and test reviews sequentially, applies required fixes, commits via the cp skill, and updates the PR description only if needed.

Why does CI pass on my branch but the merge still break?

CI only builds the branch in isolation, so if the base branch has advanced, integration conflicts or build failures can appear after merge. This workflow merges the latest base into a detached worktree and runs builds and tests to detect such breakage early.

Does finalize-pr modify my working tree when checking the base branch?

No. It creates a temporary detached git worktree to merge origin/<base> and run verification, then removes it. Actual integration into your branch only happens after explicit user instruction, especially when conflicts occur.

When does finalize-pr update the pull request description?

Only when the fixes introduce behavior changes or trade-offs, the title diverges from the diff, or the described scope and tests no longer match reality. If the description already matches the diff, it skips the update to avoid redundant rewrites.

Can the three review checks run in parallel?

No. The review skills load their procedures into the caller's context, so running them simultaneously mixes instructions. They must be invoked one at a time, though independent reads within each review are batched in parallel.