What problem does it solve?
This Skill automates the tedious and error-prone process of preparing a GitHub pull request for merge by rebasing onto main, applying required review fixes, running project gates, and producing deterministic handoff artifacts so maintainers can merge confidently.
Core Features & Use Cases
- Isolated worktree workflow: Performs all edits in a separate git worktree to avoid contaminating local branches.
- Rebase and conflict handling: Fetches PR head, rebases onto origin/main, and guides conflict resolution with safeguards.
- Review-driven fixes and commits: Applies BLOCKER and IMPORTANT review fixes, enforces commit subject format, and records changes in .local/prep.md.
- Gate execution and verification: Bootstraps dependencies, runs build/check/test gates with a documented docs-only bypass, and allows limited retry logic on push failures.
- Safe push and verification: Pushes only to the PR head with force-with-lease, validates remote SHAs, and writes .local/prep.env for merge handoff.
- Use Case: A maintainer or release engineer uses this Skill to take a reviewed contributor branch, bring it up to date with main, ensure CI passes, and hand it off for final merge.
Quick Start
Use prepare-pr to rebase PR #<PR>, fix BLOCKER and IMPORTANT review items, run the required gates, and push the prepared head branch back to the PR head for merge handoff.