git-commit-message
Formulate a git commit message. Use this skill whenever asked to create a commit message.
When & Why to Use This Skill
This Claude skill automates the creation of professional, standardized Git commit messages by analyzing staged changes. It strictly adheres to industry-standard conventions, such as the 'Seven Rules of a Great Git Commit Message,' ensuring that your project's version control history remains clean, readable, and informative for all collaborators.
Use Cases
- Automated Documentation: Quickly generate descriptive commit messages that explain the 'why' and 'what' of your changes without manual drafting.
- Team Standardization: Ensure every team member follows the same commit message format and rules, improving repository maintainability and searchability.
- Contextual Summarization: Use the skill to scan staged diffs and produce a concise subject line and a detailed body that wraps at the appropriate character limit.
- Code Review Preparation: Create high-quality commit messages that provide reviewers with immediate context regarding the scope and intent of the code changes.
| name | git-commit-message |
|---|---|
| description | Formulate a git commit message. Use this skill whenever asked to create a commit message. |
Create a commit message summarizing the changes just made. Only take staged changes into account.
Follow The seven rules of a great Git commit message (https://cbea.ms/git-commit/#seven-rules) to the letter.Scan for what is staged
Use the context to construct a good message but make sure to only address the scope that is currently staged in git.
List files that are staged (in the index): git diff --cached --name-only
Show the full diff of staged changes: git diff --cached
Rules
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how