Conventional Commit Message Generator
Paste your git diff and get a proper conventional commit message: the right type (feat/fix/refactor), a clear imperative subject, and a body explaining the why. Clean git history without thinking about git history.
Turns your git diff into perfect conventional commits β typed, scoped, and changelog-ready.
You are a git hygiene enforcer. I will paste a git diff or describe my changes. Generate commit messages following Conventional Commits: 1) If the diff touches unrelated concerns, split it into multiple commits, 2) Each message: type(scope): imperative description under 72 chars, 3) Add a body only when the 'why' isn't obvious from the diff, 4) Use feat/fix/refactor/docs/test/chore precisely β never 'update' or 'misc'. Return the exact git commands to stage and commit each part. Here is my diff:
See what this prompt creates
What this prompt does
βFixed stuffβ is not a commit message. This prompt reads your diff and writes the commit message you meant to write: a conventional-commit type prefix (feat, fix, refactorβ¦), an imperative-mood subject under 72 characters, and a body that explains why β the part future-you will desperately need. Good history becomes automatic.
How to get the best result
Paste the actual diff (git diff --staged), not your description of the change β the prompt reads code better than it reads your memory. One logical change per commit: if the diff contains two unrelated changes, split them first (the prompt will tell you when it spots this). Mention breaking changes explicitly so they land in the footer where tooling expects them.
Common mistakes to avoid
Don't generate messages for diffs containing secrets β check git diff for keys and tokens before pasting anywhere. And don't blindly accept the type: the model sometimes labels a refactor as a feat. The type drives changelogs and version bumps, so verify it β that's a two-second check.
Try these variations
Generate PR descriptions from a branch diff with the same technique β reviewers love a clear summary. For release notes, feed it a range of commits and ask for a changelog. Keeping the code itself clean? The senior code reviewer prompt handles the diff before it becomes history. More in the coding prompts collection.
How to use this prompt
- Copy it β hit the copy button above to grab the raw prompt text.
- Fill the brackets β replace anything in [BRACKETS] with your own details.
- Paste into your AI tool β works with ChatGPT, Claude, Gemini for text prompts; Midjourney, DALL-E or Stable Diffusion for image prompts; Runway, Pika or Sora for video.
- Iterate β tweak one bracket at a time until the output is exactly right.
Frequently asked questions
What is a conventional commit?
A commit message format: <code>type(scope): subject</code> β e.g. <code>fix(auth): handle expired tokens on refresh</code>. Types like feat, fix, docs, refactor, test let tooling auto-generate changelogs and semantic versions from your history.
Why does the type (feat vs fix) matter?
Because tooling reads it: <code>feat</code> triggers a minor version bump, <code>fix</code> a patch, and <code>BREAKING CHANGE</code> a major β automatically. Wrong types mean wrong versions, so the prompt asks you to confirm the type on significant commits.
Can it write the commit body too, not just the subject?
Yes β and the body is the valuable part. It explains <em>why</em> the change was needed (the context that isn't in the code), which is what you'll actually need when git-blaming in six months.
How do I use this in my daily workflow?
Alias it: <code>git diff --staged | your-ai-cli</code>, or paste the diff into chat. Some devs hook it into a git prepare-commit-msg hook for fully automatic messages β with a manual review step for important commits.