split-pr

Split pull requests into ordered draft PRs minimizing CODEOWNERS reviewer groups.

17.4k|4.3k|Updated Mar 21, 2019
One-click install
npx skills add https://github.com/NVIDIA/Megatron-LM --skill split-pr-nvidia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: split-pr
Source: https://github.com/NVIDIA/Megatron-LM/tree/main/skills/split-pr
Command: npx skills add https://github.com/NVIDIA/Megatron-LM --skill split-pr-nvidia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Split a large pull request into smaller ones so each resulting PR requires fewer CODEOWNERS reviewer groups, reducing review burden and speeding up merges.

Core Features & Use Cases

  • CODEOWNERS-driven analysis: Computes which CODEOWNERS groups are needed for each changed file by parsing .github/CODEOWNERS and the PR diff.
  • Reviewer-minimizing split proposal: Clusters files by the groups they trigger, selects a largest first PR, and structures remaining PRs to minimize additional reviewer groups.
  • Dependency-aware execution: Ensures follow-on PRs account for ordering when later PRs depend on symbols or refactors introduced earlier, and keeps all PRs independently mergeable.
  • Safe GitHub workflow: Creates new branches from the correct base, generates draft PRs on the user’s fork, and avoids force-pushing without confirmation.

Quick Start

Ask the assistant: Split this PR into multiple draft PRs based on .github/CODEOWNERS to minimize the number of required reviewer groups, and wait for my approval before creating any PRs.

Frequently Asked Questions about split-pr

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

FAQPage Schema
How do I split a pull request to reduce the number of required CODEOWNERS reviewer groups?

To split a pull request and reduce CODEOWNERS reviewer groups, the Skill parses your repository's .github/CODEOWNERS file and the PR diff. It clusters changed files by the reviewer groups they trigger, proposing an ordered split that minimizes the review scope for each resulting PR.

What is the best way to break down a large GitHub PR that touches multiple owned paths?

The best way to break down a large GitHub PR touching multiple owned paths is clustering files by their CODEOWNERS groups. The Skill selects a largest first PR and structures remaining PRs to minimize additional reviewer groups, ensuring each resulting PR requires fewer distinct reviewers to merge.

How do you handle code dependencies when splitting a git diff into multiple draft PRs?

When splitting a git diff into multiple draft PRs, the Skill ensures dependency-aware execution. It accounts for branch ordering when later PRs depend on symbols or refactors introduced earlier, keeping all resulting PRs independently mergeable without breaking your codebase.

Can I automatically create draft PRs on my fork after splitting a pull request?

Yes, you can create draft PRs on your fork after splitting a pull request. The Skill generates new branches from the correct base and executes draft PR creation on the user's fork, strictly waiting for your explicit approval before creating any pull requests and avoiding force-pushes.

Does splitting a pull request by CODEOWNERS groups keep the resulting branches independently mergeable?

Splitting a pull request by CODEOWNERS groups keeps resulting branches independently mergeable. The Skill applies dependency-aware execution to ensure follow-on PRs account for ordering when later PRs depend on symbols or refactors introduced earlier, preventing merge conflicts and build failures.