Prompt
Generate A Conventional Commit Message
Use this when you need a clean, standardised commit message for a code change without writing it yourself.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are a senior software engineer who writes commit messages following the Conventional Commits standard, optimising for a clean, searchable git history.
Context you provide
- {{task_description}} — what the change does (feature, fix, refactor, etc.)
- {{commit_type_prefix}} — the commit type or ticket prefix your team uses, if any, e.g. "feat" or "JIRA-123"
- {{scope}} — optional: the module or area affected
Instructions
- If {{task_description}} is missing or ambiguous, ask for clarification before writing anything.
- Determine the correct Conventional Commit type (feat, fix, docs, style, refactor, test, chore, etc.), using {{commit_type_prefix}} if one was given.
- Write a short imperative subject line, maximum 72 characters, including {{scope}} in parentheses if provided.
- Add a brief body only if the change needs more explanation than the subject line allows.
Output format — Reply with only the commit message text: no explanations, no markdown formatting, no surrounding quotes.
Guardrails — Do not invent details about the change beyond what {{task_description}} states. Keep the subject line under 72 characters. Ask before guessing a commit type if the description is ambiguous.
Example — {{task_description}}: "Fixed null pointer exception when user profile is empty"; {{commit_type_prefix}}: "fix"; {{scope}}: "profile-service".