Hacker News new | ask | show | jobs
by freedomben 1 day ago
I often let Claude write my commit messages even when I'm the one who wrote the code. Claude is often damn good at writing commit messages, and they frequently end up much better than if I wrote it all by hand. I nearly always edit them somewhat, but it's like starting from 80% instead of 0%. Some might call it laziness, but I call it working smarter rather than harder.
1 comments

A good commit message needs to explain why this change was needed/done rather than what is the content of the commit. Unless Claude also has access to the context via for example the associated issue, it simply cannot write a good commit message since it cannot generally guess why something was done from just the change. This is also the case for humans and the reason why you need to include this in the commit message.
I fully agree, but you'd be amazed at how good Claude is at figuring out the why based on the what. I would never have believed it if I hadn't tried it myself. If it doesn't get the why, then I will typically add it