- Home
- Skills
- Vdustr
- Vp Claude Code Marketplace
- Stacked Pr Rebase
stacked-pr-rebase_skill
- Shell
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill vdustr/vp-claude-code-marketplace --skill stacked-pr-rebase- SKILL.md21.3 KB
Overview
This skill automates rebasing stacked pull requests after their parent PR is merged. It detects the parent PR and merge type, classifies commits to exclude the parent's work, cherry-picks only your commits onto the updated base, and produces a clear, reversible plan before making any destructive changes.
How this skill works
The skill analyzes the current branch and recent merged PRs (via git and GitHub API) to identify a parent PR and compute an overlap score. It classifies commits as "parent" or "own" using SHAs, messages, and authors, creates a backup branch, cherry-picks your commits onto the updated base, handles conflicts with escalation for semantic issues, and presents a summary for confirmation before force-pushing with --force-with-lease.
When to use it
- Your PR contains commits from a merged parent PR and needs to be cleaned up
- You want to rebase a stacked PR after its parent was merged (regular, squash, or rebase merge)
- You want only your commits moved onto an updated base branch
- You need to cherry-pick your commits onto a new base after a dependency merged
- You prefer a safe, auditable process with backups and explicit confirmation
Best practices
- Always review the commit classification before proceeding—automated detection is strong but not infallible
- Create and keep the backup branch until you confirm the pushed changes are correct
- Prefer --force-with-lease for safety and require explicit confirmation for any force-push
- Resolve complex semantic conflicts manually; allow the tool to auto-resolve simple whitespace/additive conflicts
- When confidence is MEDIUM/LOW, choose manual selection of commits rather than proceeding automatically
Example use cases
- "Rebase my PR, parent was PR #456" — automatic detect + cherry-pick your commits onto updated base
- After a squash merge of parent PR, remove parent commits from your branch and keep only your work
- A parent PR was rebased before merging and your branch now contains rewritten SHAs — detect and exclude parent's commits reliably
- You want an auditable change: create a backup branch, run cherry-pick-based rebase, then force-push with a summary report
- Interactive mode: tool shows uncertain commits and lets you decide which to keep or exclude
FAQ
It presents candidate PRs with overlap metrics and asks you to pick one or manually specify which commits to keep.
Will my original commits be lost?
No. The tool always creates a timestamped backup branch before rewriting history and requires confirmation before any force-push.