prepare-pr

Rebase GitHub pull requests onto main, fix review findings, and run build gates.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/RobbyMo81/assistantrobby --skill prepare-pr-robbymo81
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prepare-pr
Source: https://github.com/RobbyMo81/assistantrobby/tree/main/.agents/archive/prepare-pr-v1
Command: npx skills add https://github.com/RobbyMo81/assistantrobby --skill prepare-pr-robbymo81

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about prepare-pr

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

FAQPage Schema
How do I rebase a GitHub pull request onto main and fix review findings before merging?

This Skill rebases a GitHub pull request head branch onto origin/main, resolves conflicts in an isolated git worktree, and applies required review fixes to produce a clean merge handoff.

How does an isolated git worktree prevent branch contamination when preparing a PR?

An isolated git worktree performs all rebase edits and review fixes in a separate directory, preventing contamination of your local branches while preparing the pull request for merge.

What is the best way to ensure CI and build gates pass before merging a GitHub PR?

The best way to ensure gates pass is to bootstrap dependencies, run pnpm build, check, and test gates after rebasing, and use the documented docs-only bypass when applicable before merging.

Can I force push a rebased PR head branch without overwriting remote changes?

Yes, you can push the rebased PR head branch using force-with-lease, which validates remote SHAs before pushing to ensure no remote changes are overwritten during merge preparation.

What artifacts do I need for a reliable GitHub pull request merge handoff?

You need deterministic handoff artifacts like .local/prep.md and .local/prep.env files, which record applied changes and remote SHAs for maintainers to confidently merge the prepared pull request.

When should I not use an automated rebase workflow for pull request preparation?

You should avoid automated rebase workflows when dealing with unreviewed contributor branches or when complex conflict resolution requires manual intervention beyond standard git worktree safeguards.