Mcore Split Pr
NVIDIAOfficialCreated by Philip PetrakianDistributed by NVIDIA
- Skill
- Workflow
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill helps developers break down large, complex pull requests into smaller, logically grouped PRs. By analyzing the repository's CODEOWNERS file, it identifies clusters of files that share the same reviewer groups, allowing the user to reduce the review burden for any single PR. The workflow ensures that each resulting PR remains independently mergeable, maintains test integrity, and handles cross-PR dependencies through backward-compatible shims or aliases.
What it does
- Analyzes existing PRs to map files to their respective CODEOWNERS reviewer groups.
- Proposes a strategic split of files into multiple PRs to minimize reviewer group overlap.
- Creates draft PRs on the user's fork based on the proposed split.
- Ensures that tests remain coupled with the production code they validate.
- Manages dependencies between split PRs by suggesting necessary code shims or aliases.
- Handles the creation of draft PRs while crediting the original author.
When to use it
- When a pull request is too large or complex for efficient review.
- When a PR triggers too many CODEOWNERS reviewer groups, causing review bottlenecks.
- When you need to break up a PR while maintaining build and test stability.
- When you want to organize changes into smaller, focused units of work.
Advantages
- Reduces the number of required reviewers per PR.
- Maintains code integrity by keeping tests with their corresponding production code.
- Automates the creation of draft PRs, saving manual effort.
- Provides a clear plan for managing dependencies between split PRs.
Usage examples
- “Split PR #123 to reduce the number of required reviewer groups.”
- The agent analyzes the PR, maps files to CODEOWNERS, proposes a split table, and waits for your approval to create the draft PRs.
- “I have a massive PR that needs too many reviewers. Can you break it up?”
- The agent identifies file clusters based on CODEOWNERS, suggests a plan to minimize reviewer groups, and prepares to execute the split into draft PRs.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/nvidia/mcore-split-pr/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip mcore-split-pr.zip -d .agents/skills
Documentation by Philip Petrakian
Split PR by CODEOWNERS Groups
Split a large pull request into multiple smaller PRs, where each PR touches
the fewest possible CODEOWNERS reviewer groups. The goal is to reduce review
burden: a PR that only touches megatron/core/ needs only the core reviewers,
while a PR that also touches examples/, tools/, and megatron/training/
pulls in many additional groups.
Answer-First Constraints
For split-planning questions, lead with these constraints before the full workflow:
Minimize CODEOWNERS reviewer groups per PR, but each resulting PR must still be independently mergeable and reviewable.
Tests travel with the production code they validate; do not split tests into a separate PR just to reduce reviewer groups.
If PR B depends on symbols renamed in PR A, call out the dependency and put backward-compatible aliases, re-exports, or shims in PR A when needed.
Wait for user approval before execution.
Execution creates draft PRs from the right base, applies file-scoped diffs with
git diff upstream/main..<source-branch> -- <paths> | git apply, pushes to the user's fork, and never pushes directly to upstream.
Workflow
1. Analyze the PR
Fetch the PR details:
gh pr view <number> --repo NVIDIA/Megatron-LM --json title,body,headRefName,authorandgh pr diff <number> --repo NVIDIA/Megatron-LM --stat. Also determine the current GitHub user withgh api user --jq .login.Parse
.github/CODEOWNERSto build a mapping from file path patterns to owner groups.For each changed file in the PR, determine which CODEOWNERS groups would be required to review it.
Build a summary table grouped by CODEOWNERS group, showing which files pull in which groups.
Count the total number of distinct reviewer groups the PR currently requires.
2. Propose a split that minimizes reviewer groups per PR
The primary optimization goal: minimize the number of CODEOWNERS reviewer groups required for each resulting PR.
Strategy:
Cluster files by their CODEOWNERS groups. Files owned by the same set of groups naturally belong together.
Identify the largest cluster — this becomes the first (and usually largest) PR.
Remaining files form one or more additional PRs, each ideally requiring only one or two reviewer groups.
If a split creates a dependency (e.g., PR B uses symbols renamed in PR A), the dependent PR must be merged after the first. Note this explicitly.
Each PR must be independently mergeable to main — no broken imports, no missing symbols. Backward-compatible aliases and re-export stubs in the first PR can make this possible.
Present the proposed split as a table:
PR name/description
Files included
CODEOWNERS groups required
Dependencies on other PRs (if any)
Wait for user approval before proceeding.
3. Execute the split (after user approval)
For each new PR:
Create a new branch from the appropriate base (
main, or a dependency PR's branch).Extract the relevant changes:
git diff upstream/main..<source-branch> -- <file paths> | git apply.Stage, commit with a clear message, and push to the user's fork.
Create the PR as a draft (per repo contributing guidelines).
If the original PR needs to be narrowed in scope, confirm with the user before force-pushing.
Report all PR URLs when done.
Important guidelines
Always create PRs as drafts and push to the user's fork, never directly to upstream.
Backward-compatible changes (aliases, re-exports, deprecation shims) should go in the first PR so subsequent PRs can depend on them.
Test files should go with the production code they test, not in a separate PR.
Prefer a single clean commit per split PR over replaying the original commit history.
If a file is hard to categorize (e.g., it touches two groups), ask the user which PR it should go in.
If the current GitHub user is not the author of the original PR, each new PR's description must explicitly credit the original author (e.g., "Original changes by @<author> in #<number>").
Files
- ATTRIBUTION.mdAdded by AutoGineer910 B
- BENCHMARK.md2.7 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md4.4 KiB
- evals/evals.json3 B
- skill-card.md2.4 KiB
- skill.oms.sig4.5 KiB
skill-card.md
Description: <br>
Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups. <br>
This skill is ready for commercial/non-commercial use. <br>
Owner
NVIDIA <br>
License/Terms of Use: <br>
Apache-2.0 <br>
Use Case: <br>
Developers and engineers who need to split large pull requests touching multiple CODEOWNERS groups into smaller, independently reviewable draft PRs that minimize required reviewer teams. <br>
Deployment Geography for Use: <br>
Global <br>
Known Risks and Mitigations: <br>
Risk: Review before execution as proposals could introduce incorrect or misleading guidance into skills. <br> Mitigation: Review and scan skill before deployment. <br>
Reference(s): <br>
SKILL.md <br>
Skill Output: <br>
Output Type(s): [Shell commands, Draft pull requests, Analysis] <br> Output Format: [Markdown with inline bash code blocks] <br> Output Parameters: [1D] <br> Other Properties Related to Output: [None] <br>
Evaluation Metrics Used: <br>
Reported benchmark dimensions: <br>
Security: Checks whether skill-assisted execution avoids unsafe behavior such as secret leakage, destructive commands, or unauthorized access. <br>
Correctness: Checks whether the agent follows the expected workflow and produces the correct final output. <br>
Discoverability: Checks whether the agent loads the skill when relevant and avoids using it when irrelevant. <br>
Effectiveness: Checks whether the agent performs measurably better with the skill than without it. <br>
Efficiency: Checks whether the agent uses fewer tokens and avoids redundant work. <br>
Skill Version(s): <br>
1325db3b5 (source: git SHA, committed 2026-05-29) <br>
Ethical Considerations: <br>
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal team to ensure this skill meets requirements for the relevant industry and use case and addresses unforeseen product misuse. <br>
(For Release on NVIDIA Platforms Only) <br> Please report quality, risk, security vulnerabilities or NVIDIA AI Concerns here. <br>
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Philip Petrakian
- Publisher
- NVIDIA (Official)
- Distributed by
- NVIDIA
- Source
- NVIDIA/skills · skills/mcore-split-pr · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Philip Petrakian or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download mcore-split-pr.zip