About atomic-commits
atomic-commits is a skill for developers organizing a set of Git changes into independently reviewable commits. It guides change analysis, logical grouping, incremental staging, commit ordering, and verification.
Key features
- 01Inspect Git status and diffs
- 02Group changes by type
- 03Stage and commit changes incrementally
- 04Order commits by risk and purpose
- 05Verify history before pushing
Use cases
- 01Separate unrelated changes before review
- 02Prepare a readable history from a mixed diff
- 03Stage only part of a file with git add -p
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ nullswan/ atomic-commits --skill atomic-commitsAfter installing, type/atomic-commitsin Claude Code to confirm it loaded.
Bundled filesreferences/advanced.md
Details
From the project READMEAtomic Commits
Organize multiple git changes into clean, atomic commits that maintain a proper git history.
Workflow
1. Analyze Changes
git status
git diff --stat
git diff
2. Group Changes Logically
Categorize by type:
- feat: New features
- fix: Bug fixes
- refactor: Code improvements
- docs: Documentation
- test: Test changes
- chore: Maintenance
3. Commit Incrementally
Stage specific files for each logical commit:
git add path/to/related/files
git commit -m "feat: add user authentication"
git add path/to/other/files
git commit -m "fix: correct null check in validator"
4. Push
git log --oneline -10 # Verify commits
git push origin <branch>
Commit Order
- Documentation (lowest risk)
- Tests (verification setup)
- Bug fixes (independent corrections)
- Features (main changes)
- Refactoring (improvements)
Commit Message Format
<type>(<scope>): <description>
[optional body]
Types: feat, fix, docs, style, refactor, test, chore
Example
Given changes to login page, avatar fix, README update, and new tests:
git add README.md
git commit -m "docs: update README with login instructions"
git add tests/login.test.ts
git commit -m "test: add login component tests"
git add src/components/Avatar.tsx
git commit -m "fix: correct avatar display on retina screens"
git add src/pages/Login.tsx src/components/LoginForm.tsx
git commit -m "feat: add login page with validation"
git push origin feature/login
Tips
- Each commit should be independently reviewable
- Each commit should leave codebase in working state
- When in doubt, prefer more commits over fewer
- Use
git add -pfor interactive staging of partial files
See references/advanced.md for advanced patterns.
Comments
Markdown supported