prepare-pr

Rebase PR commits onto origin/main and push prepared changes to the PR head.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/carlooss-pm/agents --skill prepare-pr-carlooss-pm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prepare-pr
Source: https://github.com/carlooss-pm/agents/tree/main/projects/openclaw/skills/prepare-pr
Command: npx skills add https://github.com/carlooss-pm/agents --skill prepare-pr-carlooss-pm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This workflow automates the end-to-end preparation of a GitHub PR for merge by rebasing onto main, applying review findings, running gates, and pushing updated commits to the PR head, while never touching main.

Core Features & Use Cases

  • Rebase PR commits onto origin/main to keep history clean and up-to-date.
  • Apply fixes from local review (.local/review.md), update related docs or changelog if flagged, and prepare a polished PR.
  • Run required gates (build, lint, tests) and verify the PR is not behind main.
  • Push prep changes to the PR head with a safe push strategy and generate a prep summary at .local/prep.md.

Quick Start

After opening a PR, run the prepare-pr workflow to rebase onto origin/main, fix blockers from local review, run gates, commit prep changes, and push to the PR head.

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 pull request for merge with rebase and gates?

Preparing a pull request for merge involves rebasing PR commits onto origin/main, applying local review fixes, running required gates, and pushing updated commits to the PR head. This process ensures a clean, merge-ready branch while never touching the main branch.

What is the best way to rebase commits and run gates before merging a PR?

The best way to rebase commits and run gates before merging is to automate the end-to-end PR preparation: rebase onto origin/main, apply fixes from local review, run build and lint tests, commit prep changes, and push safely to the PR head.

How does applying local review fixes work during PR preparation?

Applying local review fixes during PR preparation works by reading blockers from a .local/review.md file, updating related docs or changelogs if flagged, and committing these prep changes to the PR head to ensure the pull request is polished and merge-ready.

Can I push prep changes to the PR head without touching the main branch?

Yes, you can push prep changes to the PR head without touching the main branch. The workflow uses a safe push strategy to update the PR head and verifies the PR is not behind main, ensuring origin/main remains untouched throughout the preparation.

Why does my pull request fail gates after rebasing onto origin/main?

Your pull request may fail gates after rebasing onto origin/main if the updated commits introduce build, lint, or test conflicts. The preparation workflow runs these required gates to verify readiness and prevents signaling for merge if blockers remain unresolved.

Do I need a local review file to prepare a GitHub PR for merge?

Yes, a local review file is needed to apply fixes from local review during PR preparation. The workflow reads .local/review.md to identify blockers, apply necessary updates to docs or changelogs, and ensure all issues are resolved before running gates.