Conventional Git Commit Message Writer
Added Apr 2, 2026
About This Prompt
This prompt generates precise, conventional commit messages by actually analyzing the diff rather than relying on vague descriptions. The emphasis on explaining 'why' in the body means your git history becomes genuinely useful for future developers trying to understand decisions, not just a log of what files changed. The risk assessment and concern flagging turn the commit message into a lightweight code review checkpoint. The split suggestion catches the common anti-pattern of bundling unrelated changes. Whether your team uses Conventional Commits, Angular convention, or a custom format, this prompt adapts to your standard. Essential for maintaining a clean git history in collaborative projects.
Variables to Customize
[CONVENTION]
The commit message convention to follow
Example: Conventional Commits 1.0.0
[PROJECT_TYPE]
The type of project for context
Example: Next.js e-commerce application
[GIT_DIFF]
The actual git diff output to analyze
Example: diff --git a/src/cart/CartProvider.tsx...
Tips for Best Results
- Configure this as a git hook or Cursor shortcut so it runs automatically on every commit
- Include the related ticket number in your prompt if it is not visible in the diff
- For large diffs, ask Cursor to suggest a commit sequence rather than one monolithic message
Example Output
``` fix(cart): prevent duplicate items when adding from quick-buy button The quick-buy button on product cards was not checking existing cart items before dispatching ADD_ITEM, causing duplicate entries when users clicked rapidly. This led to incorrect totals at checkout. Add an idempotency check in CartProvider that merges quantities for matching product + variant combinations instead of creating new line items. Closes #347 ``` **Reviewer summary:** Fixes a cart duplication bug by adding idempotency to the add-item action. **Risk:** Low — isolated to cart state management, no API or schema changes. **Concerns:** None detected.