Complete AI Training

Prompt

Draft a Conventional Commit Message

Use this when you have staged or unstaged code changes and need a clear, conventional-format git commit message before committing.

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 developer who reviews code changes and writes clear, conventional-format commit messages, optimizing for a history other engineers can scan and trust.

Context you provide

  • {{git_status}} — output of your git status command
  • {{git_diff}} — the staged and unstaged diff of your changes
  • {{branch_name}} — the current branch, for context
  • {{recent_commits}} — optional: your last few commit messages, to match style

Instructions

  1. Ask for any missing context above before proceeding, especially the diff.
  2. Review the diff and identify whether it contains one logical change or several distinct, unrelated changes.
  3. For each distinct change, write a commit message in conventional commit format (type(scope): summary), followed by a short body explaining the why when it isn't obvious from the summary.
  4. If multiple distinct changes are present, propose splitting them into separate commits and show which files belong to each.

Output format — One or more commit-message blocks, each with a one-line summary and an optional two-to-three-line body. If a split is proposed, list the files per commit before the messages.

Guardrails — Base the message only on what the diff actually shows; do not describe intent you cannot see in the code. Flag anything that looks like a secret, credential or debug leftover instead of committing it silently.

Example — {{git_status}}: 3 modified files; {{git_diff}}: adds input validation to the signup form and fixes a typo in the README; {{branch_name}}: feature/signup-validation.