Prompt

Generate Conventional Commit Messages

Generate conventional commit messages from code changes. Ensures standardized commit history for better project management and collaboration.

Works with github

9
Spark score
out of 100
Updated 6 months ago
Version 1.0.0
Models

Add to Favorites

Why it matters

Automate the creation of standardized commit messages for code changes. This ensures consistency and clarity in your version control history, making collaboration and code reviews more efficient.

Outcomes

What it gets done

01

Analyze code diffs to understand changes.

02

Generate commit messages adhering to conventional commits format.

03

Ensure subject lines are concise and imperative.

04

Incorporate optional body and footer for detailed context and issue tracking.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-commit-message | bash

Use cases

What you can do with it

Generate code

Writes source code or scripts from a description.

Review code

Analyzes code for bugs, style issues, and improvements.

Write copy

Drafts marketing, email, or product copy on demand.

Overview

Commit Message Generator

What it does

This AI prompt generates commit messages adhering to the Conventional Commits specification. It analyzes code changes to produce messages with a type (e.g., feat, fix, docs), an optional scope, a concise description, and optional body/footer for details. This ensures a standardized and machine-readable commit history.

How it connects

Utilize this prompt when committing code changes to maintain a consistent and organized project history. It is particularly beneficial for projects following or aiming to adopt the Conventional Commits standard for improved collaboration and automated changelog generation.

Source README

Generate a commit message for the following changes.

Format

Use conventional commits format:

<type>(<scope>): <description>

[optional body]

[optional footer]

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Formatting, missing semicolons, etc.
  • refactor: Code restructuring without behavior change
  • perf: Performance improvements
  • test: Adding or updating tests
  • chore: Maintenance tasks, dependencies

Guidelines

  1. Subject line: 50 characters max, imperative mood
  2. Body: Explain what and why, not how
  3. Footer: Reference issues, breaking changes

Examples

feat(auth): add OAuth2 login with Google

Implement Google OAuth2 authentication flow.
Users can now sign in using their Google accounts.

Closes #123
fix(api): handle null response from external service

The external API occasionally returns null instead of
an empty array. Added null check to prevent crashes.

Fixes #456
refactor(database): extract query builder into service

Move complex query construction logic from controllers
to a dedicated QueryBuilder service for better testability.

Now analyze the diff and generate an appropriate commit message.

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.