git-commit-practices

Enforce atomic commits on feature branches in git repositories.

1|1|Updated Nov 4, 2025
One-click install
npx skills add https://github.com/dbosk/claude-skills --skill git-commit-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit-practices
Source: https://github.com/dbosk/claude-skills/tree/main/git-commit-practices
Command: npx skills add https://github.com/dbosk/claude-skills --skill git-commit-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Users struggle with messy Git history, large combined commits, and inconsistent messages, leading to difficult code reviews, debugging, and reverts. This skill automates the guidance for maintaining a clean, reviewable, and professional Git history.

Core Features & Use Cases

  • Atomic Commit Enforcement: Guides you to make small, single-purpose commits for easier review, safer reverts, and clearer project history.
  • Granularity & Frequency: Provides clear rules on when and how often to commit, ensuring no logical change is missed and promoting early, frequent commits.
  • Message Quality: Offers templates and guidelines for crafting clear, concise, and imperative commit messages that effectively communicate changes.
  • Use Case: When working on a complex feature, this skill proactively reminds you to commit after each logical step (e.g., "Add user authentication data model", "Add user authentication API endpoint") rather than one giant "Add auth feature" commit.

Quick Start

Guide me on best practices for git commits, focusing on granularity and message quality.

Frequently Asked Questions about git-commit-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write better Git commit messages?

Atomic commit messages should be clear, concise, and imperative. Use single-purpose messages that describe what changed and why (e.g., 'Add user authentication API endpoint' rather than 'Update code'). This makes code reviews and debugging easier while keeping your repository history readable.

What does atomic committing mean and why should I do it?

Atomic commits are small, logical, single-purpose changes that capture one feature, bug fix, refactor, or documentation update. Atomic commits enable safer reverts, clearer project history, and simpler code reviews by isolating each change so reviewers understand intent and impact immediately.

How often should I commit while developing a feature?

Commit frequently after each logical step—not the entire feature at once. Breaking work into incremental commits (e.g., 'Add data model', 'Add API endpoint', 'Add validation') makes changes easier to review, reverting broken logic simpler, and tracking what changed clearer.

Should I commit directly to master or use feature branches?

Always use feature branches for development work. Master or main should contain only stable, reviewed code. Feature branches keep experimental commits isolated, enable clean history when merged, and allow multiple team members to work without disruption.

How do I maintain a clean Git history in a large project?

Enforce atomic commits by making single-purpose changes frequently, write descriptive messages, and use feature branches. This prevents massive combined commits, keeps the repository navigable during code review and debugging, and enables safe, surgical reverts when needed.

Can I fix messy commits after I've already pushed them?

Yes, using interactive rebase or ammending before pushing. However, after pushing to shared branches, rewriting history disrupts teammates. Instead, adopt atomic commit practices going forward and open a new pull request with clean commits to maintain team workflow integrity.