git-commit
Stage meaningful diffs and create commits with WHY-focused messages. Use whenever making git commits.
When & Why to Use This Skill
This Claude skill streamlines the version control workflow by automating the creation of meaningful Git commits. It focuses on staging logical diffs and generating 'WHY-focused' commit messages that explain the intent behind changes rather than just the actions. By enforcing best practices like ensuring tests pass and resolving linter warnings before committing, it helps maintain a high-quality, readable, and professional repository history.
Use Cases
- Scenario 1: Generating high-quality commit messages for complex architectural changes where explaining the rationale (the 'why') is crucial for future code audits and team collaboration.
- Scenario 2: Maintaining a clean project history by automatically grouping related changes into small, logical units of work instead of large, monolithic commits.
- Scenario 3: Enforcing development discipline by using the skill to verify that all tests pass and linter errors are resolved before allowing a commit to proceed.
- Scenario 4: Improving the code review process by providing reviewers with clear, descriptive commit messages and focused diffs that are easier to understand and approve.
| name | git-commit |
|---|---|
| description | Stage meaningful diffs and create commits with WHY-focused messages. Use whenever making git commits. |
INSTRUCTIONS
Use /git:commit slash command to stage meaningful diffs and create commits with WHY-focused messages.
DISCIPLINE
- Only commit when:
- ALL tests are passing
- ALL compiler/linter warnings have been resolved
- The change represents a single logical unit of work
- Commit messages clearly state whether the commit contains structural or behavioral changes
- Use small, frequent commits rather than large, infrequent ones