commit-split

Solid

Split a pile of uncommitted changes into several context-scoped commits. Analyzes the diff first, proposes logical groups and a commit count, and once the user confirms the granularity, stages per file — down to hunks inside a single file when needed — and commits with messages matching the repo's convention. Use on requests like 'split this into commits', 'commit by context', 'atomic commits', 'how should I split these changes', or when uncommitted work mixes several topics (feature + bugfix + config). Not for rewriting already-committed history (rebase, fixup, squash), and not for a single-topic change one commit covers.

Code & Development 17 stars 1 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 79/100

Stars 20%
42
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# commit-split Split uncommitted changes into atomic, reviewable commits. Two things matter: the user shouldn't have to classify contexts by hand (analysis and proposal are this skill's job), and the result must be verifiable (prove not a single byte of code differs before and after the split). Flow: **read state → analyze changes → propose a plan → user confirms → execute → verify losslessness**. Don't ask the user to classify anything before proposing. Analyze first, present a plan, let the user adjust it. ## Step 0. Read state ```bash git status --porcelain # change list; staged/unstaged/untracked git branch --show-current git log --oneline -20 # learn the commit message convention git rev-parse HEAD # record the starting point (used for verification) git diff HEAD | git patch-id --stable # fingerprint of the original change (used for lossless verification) ``` Stop on: merge/rebase in progress, or conflicted files. Report the state and halt. Watch out for: - **Changes already staged** — tell the user. The split can't preserve the existing staging, so get agreement on "unstage everything and re-split the whole thing", then run `git restore --staged .`. - **Untracked files** — include them in the plan table but mark them separately. If they look like build junk (logs, scratch files), suggest excluding them from the commits. ## Step 1. Analyze changes Read the full `git diff HEAD` and the contents of untracked files, then identify logical un...

Details

Author
2ykwang
Repository
2ykwang/agent-skills
Created
6 months ago
Last Updated
2 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category