Atomic Commit

Analyze git changes, detect mixed concerns, and group files into atomic commits.

82|9|Updated May 5, 2025
One-click install
npx skills add https://github.com/chanwit/tdg --skill atomic-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Atomic Commit
Source: https://github.com/chanwit/tdg/tree/main/skills/atomic
Command: npx skills add https://github.com/chanwit/tdg --skill atomic-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you create clean, atomic commits by analyzing changes, detecting mixed concerns, and ensuring each commit is a complete unit of work. It minimizes risk by ensuring each commit contains a single purpose and can be reverted independently.

Core Features & Use Cases

  • One-thing commits: Ensure each commit introduces only a single feature, fix, or refactor.
  • Detect mixed concerns: Identify changes that span multiple, unrelated goals.
  • Group & review: Group related files and present them for user confirmation before committing.
  • Independent commits: Create commits that can be reverted without affecting others.
  • Issue integration (optional): Attach commits to an issue when provided.

Quick Start

Start by checking the current changes: git status && git diff && git diff --staged Then, group files by purpose and stage each group, review with git diff --staged, run tests/build as applicable, and commit using a conventional message such as "feat: describe change". Finally, verify with git log -1 --oneline.

Frequently Asked Questions about Atomic Commit

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

FAQPage Schema
How do I create atomic commits that can be reverted independently?

Atomic commits are single-purpose units that group related changes and can be reverted without affecting others. This Skill analyzes your changes, detects mixed concerns across files, groups related modifications by shared purpose, and proposes clean commit boundaries so each commit represents one logical change with a conventional message.

How do I detect mixed concerns in my git changes?

Mixed concerns occur when a single commit spans unrelated goals. This Skill automatically analyzes your staged and unstaged changes to identify files serving different purposes, surfacing concerns that should be split into separate commits for cleaner history and safer reverts.

What's the best way to organize files before committing in git?

Group related files by shared purpose before staging and committing. This Skill groups your changes by intent, presents them for confirmation, and guides you to stage each group separately, run tests, and commit with conventional messages like 'feat:' or 'fix:' so each commit is logically isolated.

Can I use atomic commits with non-TDD workflows?

Yes. Atomic commits work in any workflow. This Skill is applicable to non-TDD development; it focuses on detecting mixed concerns and proposing commit boundaries that keep the codebase building and tests passing while maintaining independent revertability regardless of your development approach.

How do atomic commits help with code reviews and history?

Each atomic commit tells a single story and can be reviewed, reverted, or bisected independently. This Skill ensures your git history remains clean and navigable by preventing unrelated changes from mixing, making blame, cherry-picks, and rollbacks safer and faster.

Can I attach commits to issues when creating atomic commits?

Yes, this Skill supports optional issue integration. When you provide an issue identifier, commits can be automatically associated with that issue, linking your atomic changes directly to the work they address while maintaining conventional commit message formatting.