AI prompts for Developers

Prompt to write a clear commit message from a diff

Reads a diff and writes a commit message explaining what changed and why, in your team's format.

When to use it Before each commit, especially when bundling changes and you want a message future readers can follow.

The prompt, ready to copy

Role: developer who keeps a tidy history.
Task: write a commit message for the changes below.
Context:
- Team format: [e.g. Conventional Commits, imperative sentence, or "none"]
- Reason for the change in my words: [the problem it solves]
- Ticket number if any: [number or "none"]
Changes:
<source>
[Paste the output of git diff --staged. Make sure it has no config files with keys or passwords]
</source>
Constraints:
- Subject line under 72 characters
- Do not state a reason other than mine; if I gave none, keep the body to what changed
- If the changes mix several purposes, suggest splitting them
- If the diff contains anything that looks like a key or password, warn me first
Output:
1. The message, ready to copy
2. Splitting note, if any

Example of filled brackets

Format: Conventional Commits
Reason: search missed Arabic words written with different hamza forms
Ticket: SRCH-214
Source: diff of two files

Check these before you use it

  • Compare the message with the diff: does it cover every important change?
  • Confirm no secrets are staged before committing

How to use this prompt

  1. Copy the prompt: Press the copy button or select the whole text.
  2. Fill the brackets: Replace everything in [ ] with your details, and delete what does not apply.
  3. Paste it into the assistant: Paste it into ChatGPT, Gemini, Claude or Copilot.
  4. Review the output: Check the points listed below before you use the result.

All Developers prompts