rebase-pr-chain

Rebase stacked GitHub pull requests in dependency order and verify mergeability.

9|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/paultyng/skill-issue --skill rebase-pr-chain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase-pr-chain
Source: https://github.com/paultyng/skill-issue/tree/main/skills/rebase-pr-chain
Command: npx skills add https://github.com/paultyng/skill-issue --skill rebase-pr-chain

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually rebasing a chain of dependent (stacked) pull requests is time-consuming and error-prone, especially when conflicts arise across multiple branches in the chain. This skill automates the entire process to keep all stacked PRs up-to-date and mergeable.

Core Features & Use Cases

  • Automated Chain Detection: Automatically identifies the dependency order of open PRs via the GitHub CLI, or uses user-provided PR numbers to sort the rebase sequence topologically.
  • Intelligent Conflict Handling: Resolves mechanical and semantic merge conflicts automatically during rebase, and escalates ambiguous conflicts to the user for input to avoid incorrect changes.
  • End-to-End Verification: Verifies each PR is mergeable after rebasing and provides a clear summary of the status of every PR in the chain.
  • Use Case: For teams using stacked PR workflows, this skill eliminates the manual effort of updating multiple dependent branches when the base branch changes, reducing merge friction and human error.

Quick Start

Use the rebase-pr-chain skill to rebase the open stacked PR chain starting from PR #42 and resolve any conflicts that come up.

Frequently Asked Questions about rebase-pr-chain

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

FAQPage Schema
How do I rebase stacked pull requests when the base branch changes?

To rebase stacked pull requests, you can automate the process by detecting the dependency order of open PRs via the GitHub CLI and sequentially rebasing them. This ensures all dependent branches stay up-to-date and mergeable when the base branch changes.

What is the best way to resolve merge conflicts across a chain of dependent PRs?

Resolving merge conflicts across a PR chain involves handling mechanical and semantic conflicts automatically during the rebase. Ambiguous conflicts are escalated to the user for input, preventing incorrect changes while maintaining chain integrity.

Can I use GitHub CLI to automatically sort and rebase a stacked PR chain?

Yes, you can use GitHub CLI to automatically identify the dependency order of open PRs and sort the rebase sequence topologically. Alternatively, you can provide specific PR numbers to define the rebase sequence manually.

How do I verify if all pull requests in a stacked chain are mergeable after rebasing?

To verify mergeability after rebasing a stacked PR chain, the workflow checks each PR sequentially and provides a clear status summary. This end-to-end verification ensures every PR in the chain is ready to merge.

What happens when ambiguous merge conflicts occur during a stacked PR rebase?

When ambiguous merge conflicts occur during a stacked PR rebase, the process escalates these conflicts to the user for input. This avoids incorrect automated changes while still resolving mechanical and semantic conflicts automatically.