agentleFS
ArangoGutierrezArangoGutierrez/claude-toolkit/.cursor/skills-cursor/split-to-prs/SKILL.md

split-to-prs

Skill4 starsChanged 3 months agoMITView on GitHub

Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.

We split this skill into the rules it gives an agent

9 rules. 7 are common, 0 are distinctive, and 2 are very specific to this project.

  • 7

    Common

    Most of the 5 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Common:

    Do not create branches, commit, push, or open PRs until the user approves the split plan.

    line 13
  2. Very specific:

    Never discard user work. No destructive git commands (reset --hard, clean -fdx, branch deletion, force-push, history rewrite) without …

    line 14
  3. Common:

    Always save a recoverable snapshot before moving work around.

    line 15
  4. Very specific:

    Before proposing slices, find ownership signals for the touched paths (CODEOWNERS, nested ownership files, tools/ownership/PRODUCTOWNERS, …

    line 22
  5. Common:

    Use judgment on detail. Usually PR titles are enough.

    line 26
  6. Common:

    Default to independent PRs off the default branch.

    line 30
  7. Common:

    Ask for approval before starting.

    line 32
  8. Common:

    If there is uncommitted work, save a recoverable snapshot without changing the working tree:

    line 36
  9. Common:

    Keep it short: PR titles and URLs, plus anything left on the starting branch or working tree.

    line 49

“Common” is measured: kept by at least 6 in 10 of the 5 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 to PRs

Turn one pile of work into a few small PRs.

Hard rules

  • Do not create branches, commit, push, or open PRs until the user approves the split plan.
  • Never discard user work. No destructive git commands (reset --hard, clean -fdx, branch deletion, force-push, history rewrite) without explicit approval.
  • Always save a recoverable snapshot before moving work around. This often starts from dirty work on main, so do not assume there is already a safe branch.
  • Stage only named files or hunks. No git add . / git add -A.

1. Check the state

Compare the current work to the repo's default branch, including committed and uncommitted changes. Summarize the real slices you see, and use the chat history to recover intent.

Before proposing slices, find ownership signals for the touched paths (CODEOWNERS, nested ownership files, tools/ownership/PRODUCTOWNERS, or repo equivalents) and use them to identify natural reviewer boundaries.

2. Propose the split

Use judgment on detail. Usually PR titles are enough. Add a one-line scope note only when a title is unclear. Show a Mermaid diagram when there are multiple slices.

Optimize for reviewer-aligned PRs with minimal unrelated diff: split independent owners or concerns, keep tightly coupled changes together, and when stacking is necessary, order foundations before consumers.

Default to independent PRs off the default branch. Stack PRs only when the dependency is real.

Ask for approval before starting.

3. Execute the split

  • If there is uncommitted work, save a recoverable snapshot without changing the working tree:

    SHA=$(git stash create "pre-split")
    if [ -n "$SHA" ]; then
      git update-ref "refs/backup/pre-split-$(date +%s)" "$SHA"
    fi
  • For each approved slice, create a branch from the right base, stage and commit only the planned files or hunks, then push and open the PR.

4. Report back

Keep it short: PR titles and URLs, plus anything left on the starting branch or working tree. Do not delete the backup ref or original branch unless the user asks.

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.