split

A command that divides a large set of code changes into smaller, dependency-aware pull requests, which are proposed code changes for review. It can analyze an existing GitHub pull request or a local branch that has not been pushed.

In plain words
What is it for?
Use it to create a suggested split plan, make local branches for each group, or open stacked GitHub pull requests in dependency order. It supports analysis-only, draft, and execute modes.
Why use it?
Smaller, ordered changes are easier to review and reduce the risk of merging unrelated work together.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/shiyas1331/devkit/split
Clone the repo
git clone --depth 1 https://github.com/shiyas1331/devkit
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 12,427 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00040 $0.12427
Opus 5 $0.00020 $0.06214
Sonnet 5 $0.00008 $0.02485
Haiku 4.5 $0.00004 $0.01243

Measured yesterday against content hash 58a0317d463c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

split scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

blob = subprocess.run(
commands/split.md · 1,338 lines

How it starts

The opening of the file, as written. The whole thing — 1,338 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Split a large set of changes into smaller dependency-aware PRs

Large changesets are slow to review and easy to merge with bugs. This command analyzes either an open PR OR a local branch, identifies logical groupings, computes import-based dependencies between them, and produces a concrete split plan.

Two input sources:

  • PR mode — point at an open GitHub PR (URL, number, or its branch name). Files come from gh api.
  • Local mode (--local / --branch=<name>) — point at a local branch that hasn't been pushed yet. Files come from `git diff

Three execution modes:

  • SUGGEST (default) — analysis only. Outputs a split plan, a reviewable shell script, and draft PR descriptions. No side effects.
  • DRAFT (--draft) — runs SUGGEST first, then creates the actual git branches locally (one per bucket). Does NOT open PRs.
  • EXECUTE (--execute) — runs SUGGEST + DRAFT, then opens GitHub PRs for each branch in dependency tier order. Each PR uses the draft description from Phase F. Stacked PRs get the right --base. In local mode, EXECUTE requires the original branch to be pushed first (refuses with a clear message if not).

Response format: one short sentence on what was done, the next concrete action, terse.

Mode picker (front door for empty invocations)

Front door A — picker fires by default

Trigger:

  • $ARGUMENTS is empty, OR
  • $ARGUMENTS contains only a PR identifier with no --* flag

Step 1 — choose the source. Use AskUserQuestion:

question: "What are you splitting?"
header: "Source"
multiSelect: false
options:
  - label: "An open GitHub PR"
    description: "Point at an existing PR — by URL, number, or its
                  branch name. Files are fetched via `gh api`. Use
                  this when the PR is already open and you want to
                  break it down."
  - label: "A local branch (not yet pushed / no PR yet)"
    description: "Split your current branch (or a named branch) BEFORE
                  opening a single mega-PR. Files come from `git diff
                  <base>...HEAD`. The best time to split — analyze
                  your work before review surface exists."

Read the full file on GitHub · 1,338 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 1,338 lines · 40 tokens per session scan A 58a0317d463c

Subscribe to this mod's changes

split is a command published in the GitHub repository shiyas1331/devkit (4 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 12,427 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.