What problem does it solve?
Managing stacked PR chains across branches can lead to diverging histories and manual, error-prone rebases. This Skill provides a disciplined workflow to squash-merge the most upstream PR and rebase downstream branches so the chain remains linear and clean.
Core Features & Use Cases
- Detect and order the PR chain starting from the default branch.
- Create local backups of downstream branches to enable recovery.
- Squash-merge the upstream PR onto the default branch without deleting the merged branch.
- Rebase all downstream branches in a linked chain to preserve history and dependency relationships.
- Verify tree integrity against backups and provide explicit recovery steps if issues arise.
- Retarget downstream PR bases after the squash merge to maintain correct base references.
- Force-push rebased branches with safety checks and wait periods to reduce CI conflicts.
Quick Start
Use the smc CLI to squash-merge the most upstream PR in your stacked chain and rebase all downstream branches.