agentleFS
tarek-zytarek-zy/anti-slopware/skills/split-pr/SKILL.md

split-pr

Skill2 starsChanged 4 days agoMITView on GitHub

Plans how to break one oversized branch or pull request into small ones a human can review - groups the changes by purpose, orders them, says what depends on what, and lists what should be dropped. Produces a plan; it does not rewrite the branch. Use when the user says a PR or branch is too big, asks how to split, break up or stack a change, or types /split-pr or /anti-slopware split.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. stacklok/toolhive★ 2.4ksame name
    2. adamkasper/skills★ 3same name
    3. jonmumm/skills★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every pull request must build and pass the tests by itself, once the ones it depends on are merged.

    line 35
  2. Distinctive:

    If the branch already has one purpose and a reasonable size, say it does not need splitting, and stop.

    line 40
  3. Distinctive:

    Every changed file appears in exactly one pull request, in the drop list, or under "Cannot be split cleanly".

    line 44
  4. Distinctive:

    If a file looks like a secret, say where it is.

    line 46
  5. Distinctive:

    Do not change the branch.

    line 48

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

split-pr

A pull request with five purposes gets one tired approval. Five pull requests with one purpose each get five real reviews. AI agents produce the first kind easily, because doing everything in one go costs them nothing.

This skill writes the plan for the split. It does not create branches, move commits or push. Carrying out the plan is a separate step the user asks for.

1. Gather

The diff against the base branch, the list of changed files with line counts, and the commit messages. Read the whole diff.

2. Find the purposes

Give every change exactly one purpose. Typical ones:

  • Mechanical: a rename, a move, formatting. Large but quick to review when it is alone, and impossible to review when mixed with logic.
  • Groundwork: settings, schema, a helper that later work needs.
  • Feature: new behaviour.
  • Fix: a bug fix.
  • Dependencies: version bumps and their lock file.
  • Does not belong: debug output, stray files, secrets.

A test belongs with the code it tests, never in a pull request of its own.

3. Build the plan

  • One purpose per pull request.
  • Every pull request must build and pass the tests by itself, once the ones it depends on are merged.
  • Order: mechanical changes first, then groundwork, then the work that depends on it. Independent pieces can be reviewed in parallel: say so.
  • State each dependency: "needs 1".
  • Aim for under about 300 changed lines each, mechanical ones excepted.
  • A file changed for two purposes is split by hunk. Name the file and say which hunks go where. If the hunks cannot be separated, say so under "Cannot be split cleanly" and put the file in the later pull request.
  • If the branch already has one purpose and a reasonable size, say it does not need splitting, and stop.

4. Rules

  • Every changed file appears in exactly one pull request, in the drop list, or under "Cannot be split cleanly". None is left out.
  • Say only what the diff shows.
  • If a file looks like a secret, say where it is. Never print its value. Dropping it from the branch does not remove it from history: say that it must be rotated.
  • 300 words at most.
  • Do not change the branch.

5. Output

Split plan: <n> files, <lines> lines -> <k> pull requests

1. <title> (<purpose>, about <lines> lines, needs: nothing)
   Files: <files>
   Review note: <one line on how to review it>
2. <title> (<purpose>, about <lines> lines, needs: 1)
   ...
Drop from the branch:
  - <file>: <why>
Cannot be split cleanly:
  - <file>: <which hunks belong where, or why they cannot be separated>
Merge order: <1, then 2 and 3 in either order, then 4>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.