generating-commit-messages
Generates clear commit messages from git diffs. Use when writing commit messages or reviewing staged changes.
When & Why to Use This Skill
This Claude skill automates the generation of professional and standardized git commit messages by analyzing staged code changes (git diffs). It streamlines the development workflow by ensuring every commit follows best practices and conventional commit standards, significantly improving repository maintainability, team collaboration, and project history clarity.
Use Cases
- Streamlining Daily Development: Automatically generate concise and accurate commit messages after staging changes, reducing the cognitive load and time spent on manual documentation.
- Standardizing Team Repositories: Enforce consistent commit formats (such as feat, fix, and refactor) across a development team to ensure a readable, searchable, and professional project history.
- Enhancing Code Reviews: Provide detailed descriptions and context for staged changes, making it easier for reviewers to understand the 'what' and 'why' behind a pull request.
- Automated Changelog Generation: Maintain a high-quality commit log that can be easily parsed by automated tools to generate accurate release notes and changelogs.
| name | generating-commit-messages |
|---|---|
| description | Generates clear commit messages from git diffs. Use when writing commit messages or reviewing staged changes. |
Generating Commit Messages
Instructions
- Run
git diff --stagedto see changes - I'll suggest a commit message with:
- Summary under 50 characters
- Detailed description
- Affected components
- Use prefix. type:
- feat: new feature
- fix: bug fix
- docs: docs only
- style: formatting (no behavior change)
- refactor: refactor (no feature/bugfix)
- perf: performance improvement
- test: add/update tests
- build: build/deps changes
- ci: CI config/scripts
Best practices
- Use present tense
- Explain what and why, not how