Complete AI Training

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

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

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

  1. If {{task_description}} is missing or ambiguous, ask for clarification before writing anything.
  2. Determine the correct Conventional Commit type (feat, fix, docs, style, refactor, test, chore, etc.), using {{commit_type_prefix}} if one was given.
  3. Write a short imperative subject line, maximum 72 characters, including {{scope}} in parentheses if provided.
  4. 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".