Generate Conventional Commit Messages
Generate Conventional Commits-formatted messages from a diff, with correct type, imperative subject line, and body/footer.
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
Analyze code diffs to understand changes.
Generate commit messages adhering to conventional commits format.
Ensure subject lines are concise and imperative.
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 Overview
Commit Message Generator
A commit message generation prompt using the Conventional Commits format with type classification, imperative subject lines, and body/footer structure. Use it when committing code changes and you want a properly typed, conventional commit message.
What it does
This prompt analyzes a code diff and generates a commit message in Conventional Commits format (<type>(<scope>): <description> with optional body and footer). It defines the standard type taxonomy (feat, fix, docs, style, refactor, perf, test, chore) and formatting guidelines - a 50-character-max imperative-mood subject line, a body explaining what and why rather than how, and a footer referencing issues or breaking changes. It includes three worked examples covering a new feature (OAuth2 login), a bug fix (null response handling), and a refactor (extracting a query builder service).
When to use - and when NOT to
Use this prompt when committing code changes and you want a properly formatted, conventional commit message - classifying a change into the correct type (feat/fix/docs/style/refactor/perf/test/chore), writing an imperative-mood subject line within the character limit, explaining the why in the body, or linking a closed issue in the footer.
It does not generate PR descriptions or changelog entries (related but distinct artifacts) - it is focused specifically on the single commit message for a given diff.
Inputs and outputs
Inputs are the code diff to be committed. Outputs are a Conventional Commits-formatted message, for example:
feat(auth): add OAuth2 login with Google
Implement Google OAuth2 authentication flow.
Users can now sign in using their Google accounts.
Closes #123
Other outputs include equivalent fix-type and refactor-type commit messages following the same subject/body/footer structure.
Who it's for
Developers committing code who want a properly typed, conventional commit message generated from their diff rather than writing one from scratch or using a vague description.
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.