git-commits
Create well-structured git commits. ALWAYS use this skill when committing - even for simple single-file commits. Triggers: "commit", "stage", "add and commit", or after completing any code changes.
When & Why to Use This Skill
This Claude skill automates the creation of professional, well-structured Git commits to ensure a clean and maintainable project history. By analyzing code changes through git status and diff, it generates standardized commit messages that focus on the 'what' and 'why,' helping developers maintain high-quality version control documentation with minimal manual effort.
Use Cases
- Standardizing Team Workflows: Enforces a consistent commit message format across a development team, making the repository history easier to read and audit.
- Atomic Commit Management: Automatically identifies when to split complex changes into separate, logical commits—such as separating CSS styling from PHP logic or refactoring from new features.
- Multi-Repository Coordination: Streamlines the process of committing related changes across multiple repositories (e.g., Core and Premium versions) with synchronized and descriptive messaging.
- Automated Documentation: Generates clear summaries for code changes, ensuring that even simple single-file updates follow best practices for professional version control.
| name | git-commits |
|---|---|
| description | Create well-structured git commits. ALWAYS use this skill when committing - even for simple single-file commits. Triggers: "commit", "stage", "add and commit", or after completing any code changes. |
Git Commits
Always invoke this skill for every commit. This ensures consistent, well-structured commits.
Workflow
- Run
git statusandgit diffto see changes - Run
git log --oneline -5to see recent commit style - Determine if changes should be one or multiple commits
- Stage and commit with clear message
When to Split vs Combine
Separate commits:
- CSS vs PHP logic
- Different features (even in same file)
- Refactoring vs new functionality
- Multiple bug fixes (one per fix)
Single commit:
- Related changes for one feature
- A handler + its CSS
- Tests for the feature being added
Commit Message Format
<summary line - what and why, not how>
<optional body with more context>
Examples
Input: Single file change to update details
- $title = __( 'Old title', 'simple-history' );
+ $title = __( 'New title', 'simple-history' );
Output:
Update 5.22.0 update details title
Input: Multiple related changes across files
# file1.php
+ public function new_feature() { ... }
# file2.php
+ add_filter( 'hook', [ $this, 'new_feature' ] );
Output:
Add new feature for X
Register hook and implement handler.
Multiple Repositories
When changes span core + premium:
- Commit core first, then premium
- Use related commit messages