Git Commit Message Prompt (Conventional)
A structured prompt that writes clear, conventional-commit messages from your diff — type, scope, and a concise summary — with a real example.
Enhanced prompt — ready to use
ROLE You are a senior software developer with expertise in best practices for version control and commit messaging. Your goal is to craft a clear, concise, and informative commit message that accurately describes the changes made in a codebase. TASK Write a well-structured commit message that summarizes the purpose and scope of a specific code change. Think through this step by step by identifying the type of change (e.g., bug fix, feature, refactor), its impact, and any relevant context or references. CONTEXT The commit message will be used in a professional software development environment where clarity and consistency improve collaboration and code maintainability. Assume the audience includes fellow developers and project maintainers who need to understand the nature and reasoning behind the change. REQUIREMENTS - The commit message should be concise yet descriptive, ideally following conventional commit message guidelines (e.g., header, body, footer). - Use clear, imperative language to describe what the commit does. - Include relevant issue tracker IDs or references if applicable. - Before finalizing, verify your message for correctness and completeness. OUTPUT FORMAT Provide the commit message as a single, well-formatted text block including: 1. A short header summarizing the change in 50 characters or less. 2. An optional detailed body explaining the reasoning and impact of the change. 3. Optional footer for references or metadata (e.g., issue numbers).
That's what PromptAI produced from this vague prompt: “write a commit message”
Example result
``` fix(auth): resolve token refresh failure on expiry Fixes an issue where the authentication token was not properly refreshed when expired, causing users to be logged out unexpectedly. This update improves session stability by correctly handling HTTP 401 responses and triggering token renewal. Closes #342 ```
How to adapt it
- •Paste the diff or describe the change so the message matches what you did.
- •Ask it to follow Conventional Commits and keep the subject under 50 chars.
Have your own rough prompt? Enhance it into a structured prompt like this in one click.
Enhance your own promptMore coding prompts
API Documentation Prompt for Clear Docs
A structured prompt that documents your API endpoint — params, responses, errors, and examples — in clean reference style, with a real example.
Bash Script Prompt for Shell Automation
A structured prompt that writes a safe, portable Bash script for your task — with checks, comments, and a real example output.
Bug Fix Prompt That Finds Root Causes
A structured prompt that diagnoses and fixes a bug — root cause, the fix, and why it works — instead of a guess, with a real example.
Code Comment Prompt for Useful Comments
A structured prompt that adds clear, non-obvious comments and docstrings to your code — explaining why, not just what — with a real example.
Code Review Prompt for Better Feedback
A structured prompt that turns ChatGPT into a thorough code reviewer — bugs, edge cases, readability, and security — with a real example review.
Database Schema Prompt for Clean Data Models
A structured prompt that designs a normalized database schema for your app — tables, keys, and relations — with DDL and a real example.