Git commit message generator prompt
Turn a code diff into a clear, conventional-commits style message with subject line and optional body.
متى تستخدم هذا البرومبت
- Right before committing, when you're not sure how to phrase it.
- When enforcing conventional commits across a team.
- When squashing several commits into one clean message.
نص البرومبت
Write a concise, conventional-commits style git commit message for the following change. Focus: {{focus}}. Include a short body only if the change needs more context than the subject line.
{{CLIPBOARD}}{{focus}}{{CLIPBOARD}}الكتلة {{CLIPBOARD}} تُستبدل تلقائياً بما نسخته قبل الضغط على «نسخ».
كيف تستخدمه
- انسخ البرومبت بالزر أو املأ المتغيرات أولاً.
- الصقه في ChatGPT أو Claude أو Gemini.
- عدّل النتيجة أو أعد الطلب بتغيير المتغيرات.
مثال على النتيجة
fix(auth): prevent session token leak in error logs Error handler was logging the full request object, including the Authorization header. Redact sensitive headers before logging.
نصائح للاستخدام
- Paste the actual git diff output, not just a description, for the most accurate subject line.
- Specify your commit convention (Conventional Commits, gitmoji, plain) if it differs from the default.
- Keep the subject line under 72 characters; ask it to trim if it runs long.
أسئلة شائعة
- What if I don't use conventional commits?
- Say so in the focus field and it will match a plain imperative style instead, e.g. 'Fix session token leak in logs'.
- Can it summarize multiple unrelated changes?
- It works best on one focused diff; for mixed changes, split the diff or list each change separately.