Git · plan by default

/git-split

Divide a mixed change into understandable commits

Use to separate a change into coherent commits; git-commit handles one selected unit.

Make it your own.

In Claude Code, use the slash command and add your context. In Codex, select git-split from the just-vibe skill picker, then send the same brief.

Version 0.11.0 also supports /jv git-split, /just-vibe git-split and /jv:git-split in Claude. See shortcut setup and context examples.

Example · plan
/just-vibe:git-split Plan separate formatting and checkout-fix commits without changing shared history.
edge · apply
/just-vibe:git-split Split a refactor and fix that overlap in one function.
blocked · inspect
/just-vibe:git-split Propose a split without permission to rewrite shared history.

What the agent does

  1. Snapshot the current state, preserving the original patch and index.
  2. Map hunks to behaviors and dependencies and propose a commit ordering; validate each proposed intermediate tree in isolation when feasible.
  3. In apply mode, create the grouped commits and verify the final content matches the original.
  4. All changes are owned by the user. Add no agent/model self-attribution, AI-generated signature, badge, or agent Co-authored-by trailer to commits, PRs, comments, release notes or messages. Use the existing user Git identity; preserve legitimate human attribution and required third-party notices.

Inputs

  • mixed changes or commits and desired grouping.

Optional context: scope, references, constraints, successCriteria, environment, mode, budget.

Scope

Reads
Separate coherent changes while preserving content; rewriting published history is a distinct action.
Writes
Inspect/plan: propose the grouping; save requested artifacts only. Apply: create the new commits only on the current, unpublished branch after preserving the original patch and index. Rewriting pushed or shared history, force-pushing and other remote actions require their exact action and target in session authorization.
Mode
Plan; mixed changes or commits and desired grouping. Applying a split uses apply mode and creates new commits only on the current unpublished branch.
Prerequisites
Git, exact repository/worktree, and readable refs/index. Record branch, HEAD, staged/unstaged/untracked state before mutation. Preserve unrelated edits and never default to broad staging, hard reset, clean, force push, or history rewriting.

Expected output

  • Ordered commit groups with dependency rationale, or the resulting commits, plus evidence the final content is preserved.

How the work is checked

  • Formatting and functional edits separate cleanly; overlapping hunks retain both intended behaviors.
  • Review newly prepared commit/PR/message text, including template or hook additions, for agent self-attribution before submission; verify the resulting artifact when available. Do not silently rewrite existing history or remove human credits.

When to stop or clarify

  • Do not rewrite shared history implicitly or lose pre-existing index state. Stop if grouping cannot preserve a buildable dependency order.

Handling missing context

Infer
Read repository root, HEAD, branch, refs and staged/unstaged/untracked distinctions; use the configured human identity.
Assume
Limit an ambiguous inspection to the current repository and report that scope; preserve all existing changes.
Ask
Before mutation, resolve uncertain commit membership, destination ref or history-rewrite intent; do not ask again about already authorized exact actions.

Technical guidance

Evidence
Inspect overlapping hunks, generated files, dependency order and pre-existing staged content.
Method
Build an ordered series whose intermediate trees are coherent; regenerate derived artifacts from the matching source change.
Pitfall
Splitting by filename alone can leave a commit importing an API that appears only in the next commit.
Check
Check each candidate tree independently where required, then verify the union matches only the intended changes and preserves unrelated work.

Situational decisions

When inseparable hunks cross proposed commits: Adjust boundaries or keep them together rather than producing a broken intermediate commit.

The coding agent follows this workflow using its available tools. Installation does not grant service access or guarantee an outcome. Read the compatibility notes.

Keep exploring