What problem does it solve?
Code reviews and change analysis often diff against the wrong base, especially in fork checkouts, squash-merge workflows, or shallow clones, producing misleading diffs. This Skill deterministically resolves the PR target branch or the canonical microsoft/FluidFramework upstream, selects the correct merge-base commit, and detects substantial divergence before any diff is read.
Core Features & Use Cases
- PR Target Resolution: Locates the open pull request for a review branch via editor PR metadata, branch queries, or the GitHub commit-to-PR API, with fork-safe explicit repository handling.
- Merge-Base Selection: Computes all best common ancestors with
git merge-base --all, handles shallow repositories by deepening history, and asks the user when multiple ancestors exist.
- Divergence Detection: Counts commits on both sides of the base and warns when either side exceeds 50 commits, offering options such as merging the target branch first.
- Use Case: A reviewer checks out a contributor's branch in the FluidFramework repo and needs the exact commit to diff against; this Skill fetches the target branch into a dedicated ref and returns a verified
$BASE_COMMIT for the caller's review workflow.
Quick Start
Ask the AI to resolve the comparison base for the current branch review, optionally passing a review ref such as a branch name or commit.