projectb-split-to-prs

Split uncommitted or committed git work into small reviewable pull requests.

Updated May 28, 2023
One-click install
npx skills add https://github.com/steveulrich/ProjectB --skill projectb-split-to-prs-steveulrich
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: projectb-split-to-prs
Source: https://github.com/steveulrich/ProjectB/tree/main/.agents/skills/projectb-split-to-prs
Command: npx skills add https://github.com/steveulrich/ProjectB --skill projectb-split-to-prs-steveulrich

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large piles of mixed changes on a branch or working tree are hard to review and risky to merge. This Skill turns one set of changes into several small, reviewer-aligned pull requests without losing any work. ## Core Features & Use Cases - Safe snapshots: Creates a recoverable backup ref with git stash create before moving any work, and never runs destructive git commands without explicit approval. - Ownership-aware slicing: Reads CODEOWNERS and similar ownership files to propose PR boundaries that match natural reviewer responsibilities. - Controlled execution: Stages only named files or hunks, builds isolated branches from the right base, validates each diff, and pushes only after publication approval. - Use Case: You have a dirty working tree on main touching three teams' code. Ask to split it, and get three independent PRs with clean diffs, each routed to the right reviewers. ## Quick Start Split my current uncommitted changes into small reviewable PRs grouped by code ownership.

Frequently Asked Questions about projectb-split-to-prs

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

FAQPage Schema
How do I split a large branch into multiple pull requests?▼

Compare the work against the default branch, group changes by ownership or concern, then create an isolated branch per slice and commit only the planned files. Push and open each PR once publication is approved.

How to split uncommitted git changes into separate PRs safely?▼

Save a recoverable snapshot first using git stash create and update-ref, which preserves the working tree. Then stage only named files or hunks per slice, never git add -A, so unrelated work stays untouched.

Should stacked PRs or independent PRs be used when splitting work?▼

Independent PRs off the default branch are the default because they review and merge in any order. Stack PRs only when a real dependency exists, ordering foundational changes before their consumers.

Can git splitting lose my uncommitted work?▼

Not with this workflow. A backup ref is created before any changes are moved, destructive commands like reset --hard or force-push require explicit approval, and the backup ref is kept unless you ask to delete it.

How does CODEOWNERS help when splitting a pull request?▼

CODEOWNERS and similar ownership files reveal which teams own the touched paths. Splitting along those boundaries gives each PR a natural reviewer set and minimizes unrelated diff in every review.