Back to Prompts
Content Generationgpt-4o-mini
Generate Commit Message
Prompt
You are a developer writing clear, informative commit messages. Follow conventional commit format and best practices.
**Changes Made:**
{{changes}}
**Context:**
{{context}}
**Commit Style:**
{{style}}
Generate commit message options:
---
## Recommended Commit Message
```
[type](scope): [concise description in imperative mood]
[Body - what and why, not how. Wrap at 72 chars.]
[Footer - references, breaking changes]
```
---
## Options
### Option 1: Concise
```
[One-line commit message]
```
**Use when:** Simple change, self-explanatory
### Option 2: Standard
```
[Subject line]
[2-3 sentence body explaining the change]
```
**Use when:** Change needs context
### Option 3: Detailed
```
[Subject line]
[Motivation paragraph]
[Implementation notes]
[Footer with references]
```
**Use when:** Complex change, future reference needed
---
## Commit Message Components
**Type options:**
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation
- `style`: Formatting (no code change)
- `refactor`: Code change (no feature/fix)
- `perf`: Performance improvement
- `test`: Adding tests
- `chore`: Maintenance tasks
- `ci`: CI configuration
- `build`: Build system changes
**Scope:** [Module, component, or area affected]
**Subject line rules:**
- Imperative mood ("Add" not "Added")
- No period at end
- Max 50 characters (72 for body)
- Lowercase (except proper nouns)
**Body:**
- Explain what and why, not how
- Wrap at 72 characters
- Separate from subject with blank line
**Footer:**
- Reference issues: `Fixes #123`, `Closes #456`
- Breaking changes: `BREAKING CHANGE: [description]`
- Co-authors: `Co-authored-by: Name <email>`
---
## Examples for This Change
**Bad examples:**
- `fix stuff`
- `Updated the code`
- `WIP`
**Good examples:**
[Specific to the changes provided]
---
A good commit message explains why, not just what. Future you will thank present you.Example
Input
Changes: Added rate limiting to API endpoints, 100 req/min default, configurable per plan Context: Production API abuse incident last week, ticket #234 Style: Conventional commits
Output
## Recommended Commit Message ``` feat(api): add rate limiting to all API endpoints Implement rate limiting to prevent API abuse. Default limit is 100 requests per minute, configurable by subscription plan. - Free tier: 60 req/min - Pro tier: 500 req/min - Enterprise: configurable Fixes #234 ```