prepare-pr

Rebase a GitHub PR onto main, fix review findings, run gates, and push to the head branch.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Preparing a pull request for merge involves many error-prone manual steps: rebasing onto the latest main, addressing review feedback, running build and test gates, and pushing safely without touching protected branches. This Skill automates that entire workflow with strict safety guardrails. ## Core Features & Use Cases - Safe Rebase and Push: Rebases PR commits onto origin/main in an isolated git worktree and pushes with force-with-lease only to the PR head branch, never to main. - Review Fix Enforcement: Loads .local/review.md and requires all BLOCKER and IMPORTANT findings to be fixed before proceeding. - Gate Verification: Runs pnpm build, check, and test before pushing, with a documented skip path for docs-only changes. - Use Case: After running /review-pr on a contributor's pull request, invoke this Skill to apply the fixes, verify all gates pass, and produce merge handoff artifacts (.local/prep.md and .local/prep.env) for the /mergepr step. ## Quick Start Use the prepare-pr skill to prep PR number 123 for merge by rebasing it, fixing the review findings, running the gates, and pushing to the head branch.

Frequently Asked Questions about prepare-pr

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

FAQPage Schema
How do I prepare a GitHub PR for merge after a code review?

Run this Skill after generating review artifacts with /review-pr. It rebases the PR onto origin/main in an isolated worktree, fixes all BLOCKER and IMPORTANT findings, runs pnpm build, check, and test, then pushes to the PR head branch.

How to safely force-push to a pull request head branch?

The Skill uses git push --force-with-lease pinned to the previously fetched head SHA, so the push fails if the remote branch moved unexpectedly. It validates the remote SHA before pushing and retries once with a fresh rebase if the lease fails.

Can this Skill push to or merge into the main branch?

No. It explicitly refuses to push to main or master, never runs gh pr merge, and aborts if the PR head branch resolves to main. All pushes go only to the contributor's PR head branch.

When can pnpm test be skipped during PR preparation?

Tests can be skipped only for high-confidence docs-only changes, where every changed file is documentation and no code, config, or dependency files changed. The skip must be explicitly recorded in .local/prep.md.

What happens if the rebase onto main has conflicts?

You resolve each conflicted file, stage it with git add, and run git rebase --continue. If conflicts require three or more resolution rounds, the Skill stops and reports instead of risking a bad rebase.