ClaudeDeveloper workflow

كاتب رسائل Conventional Commit

مشاركة:
كاتب رسائل Conventional Commit

لماذا تهم هذه المطالبة

Good commit messages explain intent, not mechanics. This prompt trains the AI to focus on the why, making git history genuinely useful for debugging.

فيم نستخدمها

Developer workflow

المطالبة

Analyze the following git diff and write a conventional commit message. Follow the format: type(scope): description. Types: feat, fix, refactor, docs, test, chore, perf. The description should explain WHY the change was made, not WHAT changed (the diff shows what). Keep the first line under 72 characters.

النتيجة

fix(auth): prevent session fixation after password reset

The session token was not being regenerated after a successful password reset, allowing an attacker with a stolen session to maintain access even after the user changed their password.

Regenerates the session ID and invalidates all existing sessions for the user upon successful password change.

تشرح رسائل Commit الجيدة الغرض من التغيير وليس الآلية التقنية فحسب. تُدرّب هذه المطالبة الذكاء الاصطناعي على التركيز على سبب التغيير، مما يجعل سجلات git مفيدة حقاً في عمليات تصحيح الأخطاء. توضح هذه المطالبة نهجاً منظمًا لسير عمل المطورين، حيث تُنتج نتائج متسقة وعالية الجودة يمكن البناء عليها وتطويرها بشكل تكراري.
مشاركة: