Hi DEV community đź‘‹
I’d like to share a small project I’ve been tinkering with: conventional-commit-batcher.
This is my first “skill” I built with the help of AI tools. I originally made it for myself, then a few programmer friends tried it on real work‑in‑progress branches and told me it helped them turn messy, mixed changes into a cleaner commit history—so I decided to open‑source it and invite more people to try it.
TL;DR: It helps you turn a messy, mixed working tree into a clean, reviewable commit history.
- Plan first (generate a Commit Plan by intent)
-
Commit in batches (often with
git add -p) - Validate commit messages (Conventional Commits)
What problem does it try to solve?
When a working tree mixes refactors + fixes + docs + chores, it’s easy (especially for junior devs) to end up with:
- one giant “misc” commit
- vague commit messages
- a history that’s hard to review, revert, or
git bisect
I wanted something that nudges me toward a more reviewable, traceable history—without turning it into a big ceremony.
What it does (in one line)
Plan-first commit batching + commit message validation — it helps you organize mixed diffs into logical, reviewable Conventional Commits, and validates messages before they land.
How it works (high level)
- Plan first: produce a Commit Plan that groups changes by intent (e.g., refactor vs fix vs docs).
-
Batch staging: stage changes batch‑by‑batch (often with
git add -p) instead of “add everything”. - Message validation: enforce Conventional Commits formatting with an executable validator.
- Safety gates: stop early if something looks risky (conflict markers, sensitive strings, etc.).
Example: a Commit Plan (by intent)
Here’s a tiny example of what “plan first” looks like:
1) refactor(auth): simplify token parsing
- changes:
src/auth/*
2) fix(api): handle empty response safely
- changes:
src/api/*
3) docs: update setup notes
- changes:
docs/*
Repo / quick try
Repo: https://github.com/cnkang/conventional-commit-batcher
If you use the Vercel skills ecosystem, you can try:
npx skills add cnkang/conventional-commit-batcher
Prefer no agent tooling? You can still use the validator and commit‑msg hook examples in the repo.
A tiny before/after example
Before (typical messy branch)
update stufffixeswip
After (same work, clearer history)
refactor(auth): simplify token parsingfix(api): handle empty response safelydocs: update setup notes
(You can imagine how much easier it becomes to review, revert, or bisect.)
A small favor: if you have a minute to try it…
I’d really appreciate any thoughts (especially if you can try it on a “messy branch”):
Batching by intent: does it actually help split mixed changes into logical commits?
If not, what kinds of changes are hardest to separate (tests + refactor, formatting + logic, lockfiles…)?Team conventions: what rules do you follow (types/scopes, subject length, issue references, breaking changes)?
Junior-friendly guardrails: which checks feel helpful, and which feel too strict?
Multi-language commit messages: do you write commits in languages other than English?
If yes, would you prefertype(scope)in English + localized subject/body, or fully localized messages (and how should validation adapt)?
Thank you for taking a look 🙇
If you try it and it helps (or fails), I’d love to hear what happened—either way.
Top comments (0)