code-split-pr

Plans splitting an oversized PR into a stack of decision-sized reviewable PRs.

2|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/nseng-ai/ns --skill code-split-pr-nseng-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-split-pr
Source: https://github.com/nseng-ai/ns/tree/main/skills/internal/code/code-split-pr
Command: npx skills add https://github.com/nseng-ai/ns --skill code-split-pr-nseng-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Oversized pull requests are hard to review, risky to merge, and painful to revert. This Skill turns one large donor diff into an ordered plan of small PRs, each encoding a single human decision or an isolated mechanical change, so reviewers can judge one question at a time. ## Core Features & Use Cases - Decision vs. mechanical classification: Separates PRs that ask reviewers one product or architecture question from behavior-preserving code motion such as moves, renames, and dead-code deletion. - Coverage map and ordering: Assigns every changed donor file to exactly one batch and orders batches so each intermediate stack state stays green and shippable. - Rebuild strategy and executor handoff: Recommends fresh-stack-from-trunk versus in-place splitting, with diff-to-zero verification against the donor. - Use Case: You have a 3,000-line feature branch mixing refactors, renames, and one real behavior change. The Skill mines the diff for learnings, proposes a stack of reviewable PRs with reviewer questions, and iterates the plan with you before any branch is touched. ## Quick Start Ask the agent to plan how to split the current oversized branch or PR into a stack of small decision-sized PRs without modifying any branches.

Frequently Asked Questions about code-split-pr

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

FAQPage Schema
How do I split a large pull request into smaller PRs?

Provide the large PR, branch, or diff as the donor, and the Skill produces an ordered plan of small PRs, each encoding one decision or one mechanical change. It emits a coverage map, rebuild strategy, and summary, but never mutates branches itself.

What is the difference between a decision PR and a mechanical PR?

A decision PR asks reviewers exactly one product or architecture question and contains only that decision's consequences. A mechanical PR isolates behavior-preserving code motion like moves, renames, or dead-code deletion to make review and reversion safer.

Does this skill create branches or run git commands?

No. The Skill only plans and emits a proposal, iterating with the user until accepted. Branch mutation, stacking-tool selection, and submission all belong to the caller or a separate executor.

When should dead code deletion get its own PR?

Prefer a standalone deletion PR when substantial dead-code removal would otherwise be folded into a decision PR. It must delete only code a parent PR already proved unreachable, preserve behavior, and remain independently revertible.

How are the split PRs ordered in the stack?

Prerequisites come before dependents and additive phases before cutovers, so every intermediate stack state stays green and honest. Each intermediate state gets a one-sentence description of its coherent, shippable behavior.