I came up with a following solution for all the agents at once:
Add instruction to AGENTS.md, CLAUDE.md, GEMINI.md, or whatever else you use (you also can reference file with a rule in some common file).
Mine looks like this:
## Commit messages
At the end of any task implementation, provide the intended commit message.
It must follow `apps/web-public/docs/CONTRIBUTING.md` and pass commitlint.
Keep every commit message line at or below 100 characters. Use bullet points in
the commit body description so the changes are easy to scan and understand.
You can customize it to the style and commit rules you prefer.
Now Cursor, Codex, Claude return something like:
Intended commit message:
refactor(ui): extract collapsible preview section into its own component
- Move the preview form into a dedicated component
- Add a collapsible heading with chevron toggle
with copy button within the message box.
It doesn’t fix Cursor’s built-in Generate Commit Message function, but allows you just copy-paste and commit.
Also, it will teach Cursor to generate messages like this over time, as u/ijorb already mentioned before.
And use commitlint with preffered config, to keep it in sync and as an additional guardrail for agents and yourself ![]()