Git commit message generator prompt

Turn a code diff into a clear, conventional-commits style message with subject line and optional body.

بواسطة ‪Ahmed Eid‬‏0 نسخة

متى تستخدم هذا البرومبت

  • 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}} تُستبدل تلقائياً بما نسخته قبل الضغط على «نسخ».

كيف تستخدمه

  1. انسخ البرومبت بالزر أو املأ المتغيرات أولاً.
  2. الصقه في ChatGPT أو Claude أو Gemini.
  3. عدّل النتيجة أو أعد الطلب بتغيير المتغيرات.

مثال على النتيجة

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.

برومبتات ذات صلة

Generate a GraphQL Schema from a Description

Describe your data and operations in plain English and get a complete, documented GraphQL schema.

Design a GraphQL schema (types, queries, mutations) for: {{focus}}. Use {{language}} conventions and include field-level descriptions. {{CLIPBOARD}}

{{focus}}{{language}}{{CLIPBOARD}}

Generate Realistic Mock Data for Testing

Get realistic, varied mock data, including edge cases, matched to your schema, ready to seed a test database.

Generate {{focus}} realistic mock/test data records in {{language}} format for this schema or type, with varied and edge-case values. {{CLIPBOARD}}

{{focus}}{{language}}{{CLIPBOARD}}

Explain What This Legacy Code Actually Does

Paste unfamiliar or legacy code and get a plain-language walkthrough, with dead code and possible bugs flagged.

Walk through this {{language}} code line by line and explain what it does, in plain language. Flag anything that looks like dead code, a workaround, or a potential bug. {{CLIPBOARD}}

{{language}}{{CLIPBOARD}}

Generate a Dockerfile for Your App

Get a secure, optimized Dockerfile tailored to your language and framework, ready to build and run.

Write a production-ready Dockerfile for a {{language}} app using {{framework}}. Use multi-stage builds where useful, minimize image size, and run as a non-root user. Notes: {{focus}}. {{CLIPBOARD}}

{{language}}{{framework}}{{focus}}{{CLIPBOARD}}
المزيد في برمجة