prepare-pr

Rebase GitHub pull requests onto main and run build, check, and test gates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of preparing a GitHub Pull Request (PR) for merging, ensuring it's rebased, fixes review findings, passes all checks, and is ready for the next step without manual intervention.

Core Features & Use Cases

  • Automated Rebasing: Rebase the PR branch onto the latest main branch to resolve conflicts.
  • Review Fixes: Automatically addresses BLOCKER and IMPORTANT issues identified during code review.
  • Gate Execution: Runs necessary build and test gates to ensure code quality.
  • Safe Pushing: Pushes changes exclusively to the PR's head branch, never to main.
  • Use Case: After receiving feedback on a PR, use this Skill to automatically apply the fixes, rebase the branch, run tests, and push the updated code, making it ready for the /mergepr command.

Quick Start

Use the prepare-pr skill to get the current pull request ready for merging.

Frequently Asked Questions about prepare-pr

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

FAQPage Schema
How do I automatically rebase a GitHub PR onto the main branch?

Automated rebasing onto the main branch resolves conflicts by checking out the PR head branch and replaying commits. This ensures the pull request includes the latest upstream changes before running quality gates.

How do I automatically fix code review findings on a pull request?

Fixing code review findings involves scanning review artifacts for BLOCKER and IMPORTANT issues, applying commits to address them, and pushing the changes to the PR head branch to make it merge-ready.

What's the best way to automate CI/CD checks before merging a PR?

Automating CI/CD checks requires executing build and test gates like pnpm build, pnpm check, and pnpm test. The PR is verified against these automated gates to ensure code quality before pushing.

Does this PR preparation process handle docs-only changes differently?

Docs-only changes receive specific handling during the PR preparation process. The automated workflow adjusts its execution path to skip unnecessary build and test gates when it detects documentation-only modifications.

Can I push PR fixes directly to the main branch?

Pushing fixes directly to main is not supported; changes are pushed exclusively to the PR's head branch. This safety mechanism prevents accidental direct commits to the main branch during the automated preparation workflow.

Why does prepare-pr run automated gates before pushing commits?

Automated gates run before pushing to verify code quality and ensure the PR is merge-ready. Executing pnpm build, check, and test validates that review fixes and rebased commits do not introduce new failures.