Conventional Commit Message Generator from Your Diff
Turns a raw git diff into clean Conventional Commits messages with the right type, scope, and body — plus a changelog-ready summary.
The prompt
Act as a senior engineer who writes exemplary git history. Here is my diff: [DIFF] Repository context: [REPO_CONTEXT]. Generate commit messages from this diff: 1. ANALYZE — Read the diff and summarize what actually changed in 2-3 sentences. Separate the primary change from incidental ones (formatting, refactors, dependency bumps). 2. SPLIT CHECK — Decide whether this diff should be one commit or several. If it mixes unrelated changes, propose the split with a one-line rationale per commit, then generate messages for each. 3. MESSAGES — For each commit, write a Conventional Commits message: type(scope): subject, where type is feat, fix, refactor, docs, test, chore, or perf. Subject line under 50 chars, imperative mood, no trailing period. Add a body only when the 'why' is not obvious from the subject. 4. VALIDATE — Check each message against [STRICTNESS] (lenient or strict): flag vague subjects, wrong types, or missing scopes, and show the corrected version. 5. CHANGELOG — Provide a one-line changelog entry per commit, suitable for a release-notes draft. Rules: never invent changes that are not in [DIFF]; if the diff is ambiguous, state your assumption in one line before the messages; do not rewrite code, only messages. Begin with the 2-3 sentence analysis.
How to use it
- Run git diff (or git diff --cached) and paste the full DIFF — not a summary.
- Describe REPO_CONTEXT: project, language, and any team commit conventions.
- Set STRICTNESS to strict for shared repos or lenient for personal projects.
- Paste the prompt and review the split check — split the diff if it suggests.
- Copy the messages, commit, and compare the changelog entry against your release notes.
Customization tips
Add your team's allowed scopes (e.g. auth, billing, ui) to REPO_CONTEXT so scope suggestions match your codebase. Switch STRICTNESS to strict before team reviews and keep it lenient for personal projects.
Example use case
Developers who want clean, reviewable git history without agonizing over commit message wording.
Frequently asked questions
My diff is huge — will this handle it?
It first recommends splitting the diff into logical commits, then writes a message per commit — so large diffs get cleaner history, not longer messages.
We don't use Conventional Commits. Is this still useful?
Yes — describe your team's actual style in REPO_CONTEXT and it will adapt the type/scope format while keeping the analysis and split-check logic.
Share
Tags: coding git version-control developer-tools programming productivity code-quality
Reviewed by the PromptVault editorial team on October 10, 2026.
Source notes: Daily pipeline 20261010 batch 11