Home · Prompts · Conventional Commit Messages
PROMPT

Conventional Commit Messages

Write clear, consistent git commit messages following conventional commits format with scope and breaking change indicators.

TARGET QUERY ai git commit message prompt · ~6K/mo
CATEGORY
Coding
DIFFICULTY
Beginner
UPDATED
2026-05-17
TAGS
gitcommitsversion-controlconventions
PROMPT DETAILS Updated 2026-05-17

The Prompt

Write a git commit message for the following diff. Follow Conventional Commits format:

Format: <type>(<scope>): <description>

Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Scope: the module/component affected

Rules:
- Subject line: imperative mood, no period, max 72 chars
- Body (if needed): explain WHY, not WHAT (the diff shows what)
- Footer: reference issues (Fixes #123) or note BREAKING CHANGE

If the diff contains multiple logical changes, suggest splitting into separate commits.

Diff:
[PASTE DIFF]

How To Use It

Run git diff --staged and paste the output. The AI will produce a commit message that explains the intent, not just the mechanics of what changed.

Why It Works

Good commit messages explain motivation, not implementation. By enforcing conventional commits format, the output is machine-parseable for changelogs and semantic versioning while remaining human-readable.

Variations

Multi-commit splitter:

This staged diff contains unrelated changes. Suggest how to split it into logical commits, and write a message for each.

PR title and description:

From these commits, write a PR title (max 60 chars) and description covering: what, why, how to test, and deployment notes.

Release notes from commits:

From these commit messages, generate user-facing release notes grouped by: New Features, Bug Fixes, and Breaking Changes.