- Home
- Skills
- Code Quality & Review
- Atomic Commit Writer for Git™: Clean Up a Messy Diff
Works with the AI Agents you already use
Atomic Commit Writer for Git™: Clean Up a Messy Diff
Plans a tangled working copy as a short series of focused Conventional Commits at hunk level, without touching your files, and checks unpushed commits for leaked keys and stray files before you push.
$5
Atomic Commit Writer for Git™: Clean Up a Messy Diff
Example session with this skill installed
I changed a bunch of things in my shop service today. Split it into atomic commits with conventional messages.
- Read your context and instructions
- Compiled the atomic commit writer
Summary
Branch main: 5 commits planned. This is the real script output on the bundled demo capture: a small shop service with a validation fix, a new endpoint, a dependency, a CI file, a README change and one leftover debug print.
| # | draft header | files | +/- | how it is staged |
|---|---|---|---|---|
| 1 | build(deps): update requirements | 1 | +1 / -0 | patch |
| 2 | ci: add test | 1 | +8 / -0 | git add |
| 3 | feat(api): update api | 2 | +3 / -1 | patch + git add |
| 4 | feat(cart): update cart | 3 | +15 / -2 | patch |
| 5 | docs: update README | 1 | +2 / -0 | patch |
Commit 1: build(deps): update requirements
requirements.txt— 1 hunk
cd "$(git rev-parse --show-toplevel)" &&
test -f "$PLAN" &&
test -s "$CAPTURE" &&
python3 "$PLAN" --emit 1 < "$CAPTURE" | git apply --cached --unidiff-zero --whitespace=nowarn --check - &&
python3 "$PLAN" --emit 1 < "$CAPTURE" | git apply --cached --unidiff-zero --whitespace=nowarn - &&
git diff --cached --stat &&
git commit -m 'build(deps): update requirements'
Suspected debug lines
1 added line looks like leftover debugging. It is planned like any other change. To keep it out of every commit and in the working files, run the plan again with --leave-out-debug.
src/cart/cart.py: 1 line
Final check
After the last commit, git diff HEAD --stat -- must list nothing. Anything else means a patch landed wrong: undo every planned commit with one git reset (the plan's commands do not touch working files).
The draft headers are the agent's starting point; it finishes each description from the diff before committing.
Connects securely to your tools. The creator never sees your data.
About this skill
Use when a day of mixed changes needs to become reviewable history, or before you push a batch of local commits.
A standard-library Python script reads git's own status and diff and plans the commits: dependency and build files first, then configuration and CI, whitespace-only hunks as a separate style commit, code grouped by area with its tests, documentation last. Each commit gets a draft header for the agent to finish and the exact commands that stage it through git's index, with every patch checked before it is applied and a final check against your working files. The plan's commands do not modify your files (your own commit hooks aside), so a plan that goes wrong is undone with one reset.
Lines that look like leftover debug prints or credentials are flagged before anything is committed, and a debug line that stands on its own can be kept out of the commits.
A second script reviews the current branch's commits that are on no remote-tracking branch yet: credentials (type and length only, never the value), .env and key files, conflict markers, fixup and WIP commits, and messages outside Conventional Commits form. Nothing is pushed, and commits your last fetch saw on a remote-tracking branch are left out of the review, and before any rewrite the branches and tags on each remote are compared with the reviewed commits.
Do not use when you need a branch split into pull requests, a code review, or help with a merge conflict.
Example prompts
- "I changed a dozen things today. Split it into atomic commits with conventional messages."
- "Commit my changes properly, but keep the debug prints out of the commits."
- "Check my unpushed commits before I push: anything that shouldn't go up?"
Limits
Grouping follows file kinds, folders and test names, not meaning: two unrelated fixes in one file stay in one commit unless you split them by hand. Whether a commit is a feat or a fix, and its description, are the agent's judgement from the diff. Credential and debug-line detection are pattern-based and cover common cases only.
Independent
Not affiliated with or endorsed by the Git project, Software Freedom Conservancy, Anthropic, OpenAI, Cursor or Google. Git and the Git logo are either registered trademarks or trademarks of Software Freedom Conservancy, Inc., corporate home of the Git Project, in the United States and/or other countries. Other product names are used only to describe compatibility.
Grouping follows file kinds, folders and test names, not meaning: two unrelated fixes in one file stay in one commit unless you split them by hand. Whether a commit is a feat or a fix, and its description, are the agent's judgement from the diff. Credential and debug-line detection are pattern-based and cover common cases only.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 9 days ago
Requires