Skip to content

Chained PR Splitter

Splits oversized code changes into ordered, reviewable chained pull requests

Stars
8,181
Licence
MIT
Files
2 files

What it does

When a code change grows past about 400 changed lines, this skill tells the AI agent to break it into a sequence of smaller pull requests that depend on each other, each focused on one piece of work. The agent estimates the size, asks which chaining style to use (stacked PRs to main, or a feature branch with a draft tracker PR), and adds a dependency diagram and scope notes to every PR. It also tries one honest split and, if it cannot fit the limit, recommends a maintainer-approved exception rather than deleting or compressing code.

Great for

  • Developers working on large features who want reviewers to get smaller diffs
  • Teams that already use stacked or chained pull requests on GitHub
  • Maintainers who want consistent PR size and review-scope rules

Skip it if

  • Tiny changes under 400 lines, where the skill adds process without benefit
  • Repositories with different PR size rules, since the 400-line and 60-minute limits are hard-coded and may conflict with local policy
  • Generated, vendor, or migration diffs that cannot be split cleanly, which the skill itself says should go to a maintainer for an exception

Try asking

  • “My feature branch has grown to 900 changed lines. Split it into chained PRs that a reviewer can handle.”
  • “Plan stacked PRs for this refactor, and show me the dependency diagram for each one.”
  • “Which PR should I open first, and what does the tracker PR look like for this feature?”
  • “Review budget check: how many additions and deletions are in each slice of this change?”
Step-by-step guide: how to use Chained PR SplitterInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    chained-pr.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip chained-pr.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip chained-pr.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Tell the agent your chain strategy up front, since the skill says not to mix strategies once one is chosen.
  • Review the proposed slice boundaries before the agent creates branches or PRs.
  • Keep your repository's own PR template; the skill says to add Chain Context without replacing it.

What's inside

  • references/chaining-details.md
  • SKILL.md

Redistributed unmodified from Gentleman-Programming/gentle-ai under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.