split-commit
Skill1 starsChanged 2 months agoMITView on GitHub
Turn a messy working tree or a fat WIP commit into a clean series of conventional commits — one logical change each, each one building and passing tests, subjects in the right type. Use when asked to "split this commit", "clean up before the PR", "these changes should be separate commits", or when a diff mixes a refactor with a feature.
In this repository73 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bigquery-analyticsSkill
- cache-invalidationSkill
- mongo-aggregationSkill
- mongo-modelingSkill
- postgres-aggregationSkill
- postgres-indexingSkill
- redis-coordinationSkill
- redis-patternsSkill
- review-querySkill
- code-migrationSkill
- cut-releaseSkill
- data-migrationSkill
- deploy-serviceSkill
- hotfixSkill
- rollbackSkill
- design-endpointSkill
- design-eventSkill
- design-schemaSkill
- evolve-contractSkill
- scaffold-nestjs-moduleSkill
- scaffold-projectSkill
- incident-responseSkill
- investigate-bugSkill
- on-callSkill
- postmortemSkill
- audit-skillsSkill
- distill-review-styleSkill
- write-skillSkill
- debug-with-tracesSkill
- define-alertsSkill
- instrument-serviceSkill
- evaluate-dependencySkill
- grillSkill
- handoffSkill
- orientSkill
- phased-deliverySkill
- spikeSkill
- to-questionnaireSkill
- write-adrSkill
- write-prdSkill
- devops-pr-reviewSkill
- go-backend-pr-reviewSkill
- nestjs-backend-pr-reviewSkill
- python-backend-pr-reviewSkill
- react-frontend-pr-reviewSkill
- bisectSkill
- break-couplingSkill
- dead-code-sweepSkill
- deslopifySkill
- extract-moduleSkill
- rebase-cleanSkill
- resolve-merge-conflictsSkill
- tddSkill
- wait-whatSkill
- wide-renameSkill
- bullmqSkill
- kafkaSkill
- sqs-consumerSkill
- audit-dependenciesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Never split commits that are already pushed and shared without agreeing first.
- Distinctive: line 33
Commit as the configured git user, no AI trailers.
- Distinctive: line 34
If two changes are genuinely entangled and can't be separated cleanly, one commit is fine — say so in the body.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Split into conventional commits
House rule: one logical change per commit, Conventional Commits, imperative subject, no trailing period, enforced by commitlint. Prefactoring and refactors come before the change that needed them.
From an uncommitted working tree
- Group the diff. List the hunks and bucket them: the prefactor, the feature, the test, the unrelated fix you noticed. Each bucket is a commit.
- Stage a bucket —
git add -pfor hunk-level, or by file. Order: refactor/prefactor first, then the feature, then tests, then docs. - Commit with the right type:
refactor:,feat:,fix:,test:,chore:,docs:(or whatever a repo'scommitlint.config.*defines). - Verify each commit builds —
git stashthe rest, run the build/tests,git stash pop. A commit that doesn't build breaksquality/bisectlater. - Repeat until the tree is clean.
From an existing fat commit (not yet pushed)
git reset --soft HEAD~1to put it all back in the index, then follow the working-tree flow above.- Or
git rebase -iand mark itedit, thengit reset HEAD^at the stop.
Rules
- Never split commits that are already pushed and shared without agreeing first.
- Commit as the configured git user, no AI trailers.
- If two changes are genuinely entangled and can't be separated cleanly, one commit is fine — say so in the body.
Anti-patterns
- ❌ A commit that doesn't build on its own.
- ❌ "wip", "fixes", "stuff" subjects.
- ❌ A refactor and the feature it enabled in one commit.
- ❌ Splitting shared history nobody agreed to rewrite.
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
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.

