commit-message-generator
Generate clear, concise commit messages from git diffs. Use when writing commit messages, reviewing staged changes, or formatting git history.
When & Why to Use This Skill
This Claude skill automates the generation of professional, standardized Git commit messages by analyzing staged code changes (git diffs). It streamlines the version control workflow by ensuring every commit follows industry best practices, including a concise 50-character summary, a detailed body explaining the reasoning behind changes, and proper issue referencing for better project traceability.
Use Cases
- Streamlining Development Workflow: Automatically generate high-quality commit messages from staged changes, reducing the cognitive load on developers and saving time during frequent updates.
- Standardizing Team Git History: Maintain a clean, professional, and consistent git log across collaborative projects by enforcing standardized formatting and present-tense summaries.
- Enhancing Code Review Clarity: Provide reviewers with clear context and detailed explanations of 'why' changes were made, rather than just 'what' was changed, directly within the commit history.
- Automated Documentation and Tracking: Improve project management by automatically linking commits to specific issue numbers (e.g., 'Fixes #123') and creating a searchable history of architectural decisions.
| name | Commit Message Generator |
|---|---|
| description | Generate clear, concise commit messages from git diffs. Use when writing commit messages, reviewing staged changes, or formatting git history. |
Commit Message Generator
Instructions
Run
git diff --stagedto view staged changesReview the diff and identify:
- What changed
- Why it changed
- Any breaking changes or important side effects
Generate a commit message that follows these conventions:
- Summary (max 50 characters): Start with a verb (Add, Fix, Update, Remove, Refactor, etc.)
- Blank line (always)
- Body (wrapped at 72 characters): Explain what and why, not how
- Footer (optional): Reference issues with "Fixes #123" or "Refs #456"
Best Practices
- Use present tense: "Add feature" not "Added feature"
- Be specific and descriptive
- Explain the reasoning behind changes
- Keep summary concise for readability
- Break related changes into separate commits
- Use emoji sparingly (only if team convention)
Example
Add support for Skills in Claude provider
Previously, the plugin collection only supported linking commands. Now that
Claude Code includes Skills, we need to support linking both
commands and skills from the canonical source.
The implementation adds:
- Skills directory structure (plugins/skills/)
- Skill-specific provider configuration
- Dedicated skills linking module
- Support for both project and global skills
Fixes #42
Tips
- Use
git diff --cachedto see what will be committed - Reference related issues or tickets in the footer
- If your commit message needs explanation, the change might be too complex
- Consider atomic commits: one logical change per commit