Commit Message Generator Skill
Generate conventional commit messages by analyzing repository changes following the Conventional Commits specification.
When to use this skill
- •Use this when you need to generate a commit message for staged or unstaged changes.
- •This is helpful for ensuring commit messages are standardized, descriptive, and follow best practices.
- •Triggered by user requests like:
- •"Generate a commit message"
- •"Create a commit for my changes"
- •"What should my commit message be?"
- •"Commit"
How to use it
- •
Analyze Changes: Examine staged (
git diff --cached) and unstaged (git diff) changes to understand the context. - •
Determine Commit Type: Select the appropriate type from the table below:
Type Description featNew feature fixBug fix docsDocumentation only changes styleFormatting, whitespace changes refactorCode restructuring without behavior change perfPerformance improvement testAdding or correcting tests buildBuild system or dependency changes ciCI configuration changes choreMaintenance tasks revertRevert previous commit - •
Identify Scope: (Optional) Specify the affected codebase area (e.g.,
auth,api,ui). - •
Draft Message:
- •Subject: Imperative mood, lowercase, no period (e.g.,
feat(auth): add login). - •Body: (Optional) Explain "what" and "why".
- •Footer: (Optional) Breaking changes or issue references.
- •Subject: Imperative mood, lowercase, no period (e.g.,
- •
Output Format: Present the message in a code block, followed by the git command.
code<type>(<scope>): <short description> <optional body> <optional footer>
Git Source:
bashgit add . && git commit -m "<type>(<scope>): <description>" -m "<body>"