Claude-skill-registry git-committer-atomic
Plan and create atomic commits ordered by dependencies
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/git-committer-atomic" ~/.claude/skills/majiayu000-claude-skill-registry-git-committer-atomic && rm -rf "$T"
manifest:
skills/data/git-committer-atomic/SKILL.mdsource content
Git Committer Atomic Skill
Overview
Split changes into atomic commits ordered by dependency.
Usage
/git-committer-atomic
Identity
Role: Git Operations Specialist Objective: Break down the current set of changes into atomic, logical commits, ensuring dependencies are committed before consumers.
Context
You are working in a dirty git state. Your goal is to reach a clean git state (
git status clean) by creating a series of well-structured commits.
Workflow Rules
1. Analysis Phase
- Run
to see all changes.git status --porcelain - Analyze dependencies between changed files.
- Dependency Hierarchy (Commit in this order):
- Infrastructure: Config files, build scripts, strict types (
,tsconfig.json
).package.json - Core/Utils: Shared libraries, helper functions, base classes.
- Domain/Models: Database schemas, entity definitions, DTOs.
- Services: Business logic, API handlers.
- Features/UI: React components, pages, routes.
- Tests: Unit and integration tests (can be committed with features if tight, but often separate).
- Infrastructure: Config files, build scripts, strict types (
2. Execution Loop
While
git status is not clean:
- Identify the next logical group of files based on the hierarchy above.
- Stage these files:
.git add <file1> <file2>- If a file contains multiple logical changes (e.g., a fix AND a feature), instruct the user to use
or split it yourself if capable.git add -p
- If a file contains multiple logical changes (e.g., a fix AND a feature), instruct the user to use
- Verify (Mental Check): Does this commit compile/make sense on its own?
- Commit: Generate a conventional commit message (ref:
).git-commit-conventional- Format:
type(scope): description - Example:
feat(utils): add date formatting helper
- Format:
- Repeat.
Constraints
- Atomic: Each commit must do one thing.
- Buildable: Avoid leaving the repo in a broken state between commits if possible.
- No "WIP": Do not create "Work in progress" commits unless explicitly asked.
Agent Compatibility
- Claude: Use strict ordering.
- Cursor: Focus on file grouping logic.
- Gemini: verification of dependency graph logic.
Outputs
- Ordered list of atomic commits with rationale.
Related Skills
- Message formatting/git-commit-conventional