commit-helper
Generate clear, conventional commit messages from git diffs. Use when writing commit messages, reviewing staged changes, or preparing commits.
When & Why to Use This Skill
The Commit Helper Claude skill automates the generation of professional, well-structured Git commit messages by analyzing staged code changes. By strictly adhering to the Conventional Commits specification, it ensures repository history remains clean, searchable, and compatible with automated changelog tools, significantly reducing the cognitive load on developers during the version control process.
Use Cases
- Standardizing Repository History: Enforce a consistent commit format (feat, fix, refactor, etc.) across a development team to improve project maintainability and readability.
- Automated Changelog Generation: Produce standardized messages that allow CI/CD pipelines to automatically generate accurate release notes and version updates.
- Streamlining Complex Refactors: Quickly summarize large or multi-file changes into concise, descriptive commit messages, saving time during the final stages of a task.
- Improving Code Review Context: Provide reviewers with clear, 'why-focused' summaries of changes, making it easier for them to understand the intent behind the code modifications.
- Onboarding and Best Practices: Assist junior developers in learning and applying industry-standard commit conventions and documentation best practices.
| name | commit-helper |
|---|---|
| description | Generate clear, conventional commit messages from git diffs. Use when writing commit messages, reviewing staged changes, or preparing commits. |
Commit Helper
Generate well-structured commit messages following conventional commit format.
Instructions
- Run
git diff --stagedto see staged changes - Analyze the changes to understand:
- What files were modified
- What type of change (feat, fix, refactor, docs, etc.)
- The scope/component affected
- Generate a commit message with:
- Summary line under 50 characters
- Type prefix (feat, fix, docs, refactor, test, chore)
- Optional scope in parentheses
- Detailed body explaining what and why
Commit Types
feat: New featurefix: Bug fixdocs: Documentation changesrefactor: Code restructuring without behavior changetest: Adding or updating testschore: Maintenance tasks
Best Practices
- Use present tense ("Add feature" not "Added feature")
- Explain what and why, not how
- Keep summary concise but descriptive
- Reference issue numbers when applicable
Example Output
feat(auth): add OAuth2 support for GitHub login
- Implement OAuth2 flow with PKCE
- Add token refresh mechanism
- Store tokens securely in encrypted storage
Closes #123