📝

Commit Message Generator

Featured

Generate clear, conventional commit messages that describe changes accurately and follow best practices.

by Claude Hub
Updated about 7 hours ago

Commit Message Generator

Generate clear, conventional commit messages following best practices.

The Prompt

Generate a commit message for the following changes:

## Files Changed
[List modified files]

## Changes Made
[Describe what was changed]

## Why
[Explain the reason for the change]

---

Follow these guidelines:
- Use conventional commits format (type: description)
- Keep subject line under 50 characters
- Use imperative mood ("Add" not "Added")
- Include body for complex changes
- Reference issues if applicable

Conventional Commits Types

Type Description
feat New feature
fix Bug fix
docs Documentation only
style Formatting, no code change
refactor Code change that neither fixes nor adds
perf Performance improvement
test Adding or fixing tests
chore Maintenance tasks

Examples

Simple Feature

feat: add user avatar upload

Allow users to upload custom profile pictures.
Supports PNG and JPG formats up to 5MB.

Bug Fix with Issue Reference

fix: prevent duplicate form submissions

Add disabled state to submit button after click.
Clear loading state on error response.

Fixes #234

Breaking Change

feat!: change authentication to JWT

BREAKING CHANGE: Session-based auth is removed.
All clients must update to use Bearer tokens.

Migration guide: docs/auth-migration.md

Best Practices

  1. One logical change per commit
  2. Write for future developers
  3. Explain "why" not just "what"
  4. Link to issues/PRs when relevant
  5. Use present tense ("fix" not "fixed")

Raw Content

# Commit Message Generator

Generate clear, conventional commit messages following best practices.

## The Prompt

```markdown
Generate a commit message for the following changes:

## Files Changed
[List modified files]

## Changes Made
[Describe what was changed]

## Why
[Explain the reason for the change]

---

Follow these guidelines:
- Use conventional commits format (type: description)
- Keep subject line under 50 characters
- Use imperative mood ("Add" not "Added")
- Include body for complex changes
- Reference issues if applicable
```

## Conventional Commits Types

| Type | Description |
|------|-------------|
| `feat` | New feature |
| `fix` | Bug fix |
| `docs` | Documentation only |
| `style` | Formatting, no code change |
| `refactor` | Code change that neither fixes nor adds |
| `perf` | Performance improvement |
| `test` | Adding or fixing tests |
| `chore` | Maintenance tasks |

## Examples

### Simple Feature
```
feat: add user avatar upload

Allow users to upload custom profile pictures.
Supports PNG and JPG formats up to 5MB.
```

### Bug Fix with Issue Reference
```
fix: prevent duplicate form submissions

Add disabled state to submit button after click.
Clear loading state on error response.

Fixes #234
```

### Breaking Change
```
feat!: change authentication to JWT

BREAKING CHANGE: Session-based auth is removed.
All clients must update to use Bearer tokens.

Migration guide: docs/auth-migration.md
```

## Best Practices

1. One logical change per commit
2. Write for future developers
3. Explain "why" not just "what"
4. Link to issues/PRs when relevant
5. Use present tense ("fix" not "fixed")