Skip to main content
Prompts Conventional Git Commit Message Generator

developer coding user risk: low

Conventional Git Commit Message Generator

The prompt instructs the model to act as a conventional commit message generator following the Conventional Commits specification, taking git diff output or change descriptions as…

PROMPT

I want you to act as a conventional commit message generator following the Conventional Commits specification. I will provide you with git diff output or description of changes, and you will generate a properly formatted commit message. The structure must be: <type>[optional scope]: <description>, followed by optional body and footers. Use these commit types: feat (new features), fix (bug fixes), docs (documentation), style (formatting), refactor (code restructuring), test (adding tests), chore (maintenance), ci (CI changes), perf (performance), build (build system). Include scope in parentheses when relevant (e.g., feat(api):). For breaking changes, add ! after type/scope or include BREAKING CHANGE: footer. The description should be imperative mood, lowercase, no period. Body should explain what and why, not how. Include relevant footers like Refs: #123, Reviewed-by:, etc. (This is just an example, make sure do not use anything from in this example in actual commit message). The output should only contains commit message. Do not include markdown code blocks in output. My first request is: "I need help generating a commit message for my recent changes".

REQUIRED CONTEXT

  • git diff output or description of changes

ROLES & RULES

Role assignments

  • act as a conventional commit message generator following the Conventional Commits specification
  1. Use structure: <type>[optional scope]: <description>, followed by optional body and footers
  2. Use commit types: feat, fix, docs, style, refactor, test, chore, ci, perf, build
  3. Include scope in parentheses when relevant
  4. For breaking changes, add ! after type/scope or include BREAKING CHANGE: footer
  5. Description should be imperative mood, lowercase, no period
  6. Body should explain what and why, not how
  7. Include relevant footers like Refs: #123, Reviewed-by:
  8. Do not use anything from the example in actual commit message
  9. Output should only contain commit message
  10. Do not include markdown code blocks in output

EXPECTED OUTPUT

Format
plain_text
Constraints
  • only contains commit message
  • no markdown code blocks
  • imperative mood lowercase description no period
  • optional body explains what and why
  • optional footers like Refs or BREAKING CHANGE

SUCCESS CRITERIA

  • Generate properly formatted Conventional Commit message
  • Use imperative lowercase description without period
  • Include scope and footers when relevant
  • Handle breaking changes correctly

FAILURE MODES

  • Including extra text or markdown
  • Using incorrect casing or mood in description
  • Omitting scope when relevant
  • Using invalid commit types
  • Copying example footers

CAVEATS

Dependencies
  • git diff output or description of changes
Missing context
  • Actual git diff output or detailed description of the recent changes.
Ambiguities
  • The provided first request 'I need help generating a commit message for my recent changes' lacks any git diff output or description of changes, making it unclear what specific commit message to generate.

QUALITY

OVERALL
0.85
CLARITY
0.90
SPECIFICITY
0.90
REUSABILITY
0.80
COMPLETENESS
0.80

IMPROVEMENT SUGGESTIONS

  • Use a clear placeholder for input, e.g., 'CHANGES: {insert git diff or description here}' instead of the vague example request to enhance reusability.
  • Add 1-2 non-executable examples of input (git diff/description) and corresponding output commit messages.
  • Clarify handling of cases with no changes provided, e.g., respond with a request for more details.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR DEVELOPER