kata-stacked-pr-rebase

Rebase stacked pull requests bottom-to-top with lease-based force pushes.

Updated Sep 3, 2025
One-click install
npx skills add https://github.com/guardiatechnology/design-system --skill kata-stacked-pr-rebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kata-stacked-pr-rebase
Source: https://github.com/guardiatechnology/design-system/tree/main/.claude/skills/kata-stacked-pr-rebase
Command: npx skills add https://github.com/guardiatechnology/design-system --skill kata-stacked-pr-rebase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you propagate changes made in a lower stack layer up through all upper layers in a stacked PR workflow without breaking the intended linear history.

Core Features & Use Cases

  • Layer identification & correct cascade order: Determines which stack branch changed and which upper layers must be rebased afterward (bottom-to-top).
  • Safe retargeting via rebase + lease-based force pushes: Rebases each upper layer on top of the updated previous layer and pushes updates using --force-with-lease to avoid overwriting others’ work.
  • Conflict handling and verification: Guides manual conflict resolution, continuation/abort, and checks that the final history matches expectations (and that main is not rebased in the cascade flow).

Quick Start

Ask the AI to generate a step-by-step cascade rebase plan for your stacked PRs that pushes the modified layer and then rebases and re-pushes all upper layers using git rebase plus git push --force-with-lease.

Frequently Asked Questions about kata-stacked-pr-rebase

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

FAQPage Schema
How do I rebase stacked PRs when a lower layer changes?

To rebase stacked PRs, you must propagate changes from the modified lower layer up through all upper layers in a bottom-to-top order, rebasing each branch on the updated previous layer and using lease-based force pushes to maintain linear history.

What is the correct cascade order for rebasing stacked pull requests?

The correct cascade order for stacked pull requests is strictly bottom-to-top, ensuring each upper layer is rebased on top of the updated previous layer to preserve intended history without skipping intermediate changes.

How do I handle conflict resolution during a stacked PR rebase cascade?

During a stacked PR rebase cascade, conflict resolution requires manual intervention to resolve discrepancies, followed by continuation or abort commands, and final verification checks to ensure the history matches expectations.

Does stacked PR rebase work with squash-merged upstream divergence?

Yes, stacked PR rebase addresses the special case of upstream squash-merged divergence by applying cascading updates to multi-layer feature branch stacks in git worktrees while preserving the intended linear history.

Why use force-with-lease when pushing rebased stacked PR branches?

You use force-with-lease when pushing rebased stacked PR branches to safely update remote references and avoid overwriting others' work, providing a guardrail against accidental data loss during the cascade rebase process.

What should I avoid when cascading rebase across git worktree branches?

When cascading rebase across git worktree branches, you should avoid rebasing main within the cascade flow and ensure final verification checks are performed to confirm the resulting history matches your expectations.