split-commit-into-stack

Split one oversized commit or branch into a stack of independently reviewable Graphite (gt) PRs - deciding what genuinely separates, what is atomic and must stay whole, and proving each lower PR builds and passes without the ones above it. Use when asked to "split this PR", "this commit is too big", "break this into a…

Skill for Claude CodeCodex

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 skills/maximhq/bifrost/split-commit-into-stack
Any agent
npx skills add maximhq/bifrost --skill split-commit-into-stack
Clone the repo
git clone --depth 1 https://github.com/maximhq/bifrost

Made for: Claude Code, Codex.

Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,693 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00096 $0.03693
Opus 5 $0.00048 $0.01847
Sonnet 5 $0.00019 $0.00739
Haiku 4.5 $0.00010 $0.00369

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

Security

Grade A, and why

split-commit-into-stack scanned grade A with 0 findings 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 today.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/split-commit-into-stack/SKILL.md · 299 lines

How it starts

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

Split Commit Into Stack

Turn one large commit into a stack where each PR is a coherent story that compiles and passes on its own. The work is mostly analysis: the mechanics are five commands, but choosing the cut and proving it holds is where the value is.

Most of the cost of a big PR is that a reviewer cannot tell which changes belong to which decision. A split earns its keep when it separates decisions, not when it merely reduces line count.

Step 0: Measure before proposing anything

Measure the whole branch against its base, not the tip against its parent: a branch that already holds several commits is split as one diff, and HEAD~1 would silently measure, inspect and later reset only the last of them.

base="$(git merge-base "$(gt parent)" HEAD)"   # the branch's base, whatever the commit count
git --no-pager log --oneline "$base"..HEAD     # several commits that already match the concerns: see Graphite notes
git --no-pager diff --numstat "$base" HEAD | awk '{i+=$1;d+=$2; printf "+%-6d -%-6d %s\n",$1,$2,$3} END {printf "TOTAL +%d -%d\n",i,d}'
git --no-pager diff --name-status "$base" HEAD

Every later step reads "$base" from this shell, so run them in the same one or set it again.

Two numbers change the conversation before any splitting is discussed:

  • Production vs test insertions. A 3,500-line diff where 1,000 lines are one new test file is not a 3,500-line review. Report the production-only figure; sometimes it dissolves the problem and no split is warranted.
  • Per-concern totals. Group files by concern (below) and total each. If one group is 85% of the diff and is atomic, splitting the remaining 15% is the entire available win
    • say so plainly rather than proposing a heroic three-way split.
  • Whether one file serves both concerns. Two or three such files is normal and Step 4 usually dissolves them; a dozen means the concerns are not actually separable and the honest answer is to leave the commit whole.

Use --name-status and not just --numstat: added (A) and deleted (D) files change what the git add commands must look like, and a deletion left in the wrong PR breaks the build in a way that is annoying to diagnose later.

Read the full file on GitHub · 299 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. today First seen · 299 lines · 96 tokens per session scan A 81cdbe0a315e

Subscribe to this mod's changes

split-commit-into-stack is a skill published in the GitHub repository maximhq/bifrost (7,738 stars, last pushed today), licensed Apache-2.0. It adds 96 tokens to every session and 3,693 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-02.