commit-hygiene

Enforce atomic commits and small pull requests with file and line count thresholds.

705|56|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/alinaqi/claude-bootstrap --skill commit-hygiene-alinaqi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-hygiene
Source: https://github.com/alinaqi/claude-bootstrap/tree/main/skills/commit-hygiene
Command: npx skills add https://github.com/alinaqi/claude-bootstrap --skill commit-hygiene-alinaqi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enforces best practices for Git commits and Pull Requests, ensuring code history is clean, manageable, and reviewable, which speeds up development cycles and reduces bugs.

Core Features & Use Cases

  • Atomic Commits: Guides users to make small, single-purpose commits.
  • PR Size Limits: Advises on optimal file and line count for Pull Requests to ensure quick reviews.
  • Commit Thresholds: Provides clear warnings when changes become too large, prompting users to commit early and often.
  • Use Case: A developer is working on a new feature. This Skill will prompt them to commit after completing a small part of the feature, like adding a new function or fixing a bug, rather than waiting until the entire feature is done, which could result in a massive, unmanageable commit.

Quick Start

Run the check-commit-size.sh script in the scripts directory to analyze your current changes.

Frequently Asked Questions about commit-hygiene

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

FAQPage Schema
How do I keep my git commits atomic and pull requests small?

To keep git commits atomic, commit small, single-purpose changes frequently. You can enforce pull request size limits by monitoring file and line count thresholds, which ensures changes remain reviewable and speeds up code review cycles.

What is the best way to enforce commit size limits in a git workflow?

Enforcing commit size limits involves monitoring file and line count thresholds for your changes. Running a size-checking script analyzes current changes and provides warnings when modifications become too large, prompting you to commit early and often.

Does this commit hygiene approach work with pre-commit hooks and partial staging?

Yes, this approach integrates with pre-commit hooks and supports partial staging. It provides guidance on incorporating these version control practices into your git workflow to help maintain atomic commits and clean code history.

Why should I monitor file and line count thresholds for pull requests?

Monitoring file and line count thresholds for pull requests prevents massive, unmanageable commits. This practice ensures your pull requests stay small and reviewable, directly improving code quality and reducing bugs through disciplined version control.

How do I check my current git changes against commit thresholds?

You can check your current git changes by running the size-checking shell script in the scripts directory. This script analyzes your working changes and warns you if the file or line counts exceed optimal thresholds for atomic commits.

When do I need to enforce atomic commits and small pull requests?

You need to enforce atomic commits and small pull requests when working on new features or bug fixes. Applying this discipline prevents unmanageable code history, reduces bugs, and makes version control manageable throughout the development cycle.