I got tired of writing bad commit messages
Key takeaway: Let a model draft the commit message from the diff, then review it and add the why yourself.
The staged diff already has everything a good commit message needs, so I wrote git ai-commit to have an LLM write the first draft.
We all know what a good commit message looks like: conventional format, present tense, the why and not just the what. Then we finish a three-hour debugging session and type fix stuff, because our brains are fried. Discipline is hardest to keep right when you need it most.
The scripts are in my dotfiles:
git-ai-commit-msgreads your staged diff and recent commit history, sends them to Claude, and prints a conventional commit message. No side effects, so you can wire it into hooks or editors.git-ai-commitis the interactive wrapper. It shows the message and lets you accept, edit, or reject it before committing.
Put them on your $PATH and Git picks them up as subcommands.
The real win was wiring it into Emacs and magit. I hit C-c C-a and the message appears in the buffer, ready to edit. No context switch. AI tools should meet you where you already work.
It doesn’t replace thinking. You still decide what gets staged, review the message, and fix it when it’s wrong. The diff tells the model what changed, but not why. That part’s still on you.