Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    PR Splitter: Break a Giant PR into Reviewable Stacks

    1

    Turns one oversized branch into an ordered stack of small pull requests, with a reason, a test point and the exact git commands for each part.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    PR Splitter: Break a Giant PR into Reviewable Stacks

    PR Splitter: Break a Giant PR into Reviewable Stacks

    Example session with this skill installed

    Split my feature/checkout branch against main into small PRs, about 30 changed lines each.

    • Read your context and instructions
    • Compiled the pr splitter

    Summary

    Branch feature/checkout against main: 11 planned files in 6 parts. This is the real script output on the bundled demo diff with --max-lines 30.

    #partfiles+/-depends onbranch
    1Dependencies, build and CI configuration2+3/-1-split/feature-checkout/01-deps-and-config
    2Schema and migrations1+2/-0-split/feature-checkout/02-schema
    3Changes in shop/cart2+12/-0-split/feature-checkout/03-shop-cart
    4Changes in shop/payments3+22/-23split/feature-checkout/04-shop-payments
    5Changes in web/src2+8/-2-split/feature-checkout/05-web-src
    6Documentation1+4/-0-split/feature-checkout/06-docs

    Part 1: Dependencies, build and CI configuration

    Why: Manifest, lockfile and CI changes go first so every later part builds against them.

    Run as one command; it stops at the first failure:

    cd "$(git rev-parse --show-toplevel)" &&
    test -z "$(git status --porcelain)" &&
    git switch -c split/feature-checkout/01-deps-and-config "$(git merge-base main feature/checkout)" &&
    git --literal-pathspecs checkout feature/checkout -- package.json requirements.txt &&
    git commit -q -m 'Dependencies, build and CI configuration'
    

    (Parts 2–6 follow the same format.)

    Check the stack

    After the last part, this must print nothing:

    git diff --stat feature/checkout split/feature-checkout/06-docs
    

    The original branch is never changed. Push each part with a plain git push -u origin <branch>; never force-push.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Use when a branch has grown too big to review comfortably.

    A standard-library Python script reads Git™ diff output (git diff -U0) and plans the stack at file level: dependency, build and CI files first, then schema and migrations, then code grouped by folder and ordered by the import lines it finds in the diff (Python, JavaScript/TypeScript, Go, PHP), with tests kept next to the code they import and documentation last.

    Every part gets a branch name, its dependencies, a test point and the commands that build it on a new branch. A final check proves the top of the stack equals your original branch for every planned file, including when you leave paths out. The original branch is never modified and nothing is force-pushed.

    Do not use when you only need a commit message, a description for a small pull request, a code review, or help with a merge conflict.

    Example prompts

    • "This PR is 2,400 lines. Split it into something reviewers will actually read."
    • "Plan a stack of pull requests for feature/checkout against main, max 300 lines each."
    • "Break my branch into smaller PRs but keep the migrations separate and leave dist/ out."

    Limits

    Splits by whole files, not by hunks. Import detection is pattern-based for four languages and only sees import lines added on the branch. Whether each part builds or passes is only known after your own test command runs on it.

    Independent

    Not affiliated with or endorsed by the Git project, any Git host, Anthropic, OpenAI, Cursor or Google. Git is a trademark of Software Freedom Conservancy; other product names are used only to describe compatibility.

    Splits by whole files, not by hunks. Import detection is pattern-based for four languages (Python, JavaScript/TypeScript, Go, PHP) and only sees import lines added on the branch. Whether each part builds or passes is only known after your own test command runs on it.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 9 days ago

    Requires

    Python 3.8+ (standard library only)
    Git 2.23 or newer
    Terminal access for your own repository (the demo runs with code execution on claude.ai)
    Python
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed10 days ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    It reads the branch diff and plans the split for you: which files go in which part, in what order, and the exact commands to build each part on a new branch. A final check shows that the top of the stack matches your original branch. Whether each part builds is confirmed by running your own test command on it.

    It needs git 2.23 or newer and Python 3.8+. Import ordering uses pattern-based detection for Python, JavaScript/TypeScript, Go and PHP. Files in other languages are still planned, grouped by folder, but without import ordering.

    No, this skill is designed for safety; it generates a new stack of branches based on your diff and provides command blocks for you to execute, leaving your original feature branch completely untouched.

    The skill operates at the file level, meaning it can group different files into separate PRs, but it currently cannot split code changes that occur within the same individual file.

    A SKILL.md with the method, one standard-library Python script (split_plan.py) that turns git diff output into the plan, a sources file, and a demo diff so the skill can show a full plan before you point it at your own branch.

    The plan ends with a stack check: `git diff --stat <your-branch> <top-of-stack>` must print nothing for the planned files. If it prints anything, a file is missing or differs, and you know before you push.