atomic-commits — Claude Code rule: what it does, how to install
Enforces Git best practices: atomic commits in Conventional Commits format, mandatory feature branches, and selective file staging.
MIT ★ 2,966 updated 2026-09-29
.cursor/rules/atomic-commits.mdcWhat atomic-commits does
This rule instructs your coding assistant to record Git changes as single logical units. Every commit message must follow the Conventional Commits template <type>(<scope>): <summary> using feat, fix, refactor, test, docs, chore, perf, ci, or style.
Direct commits to the main branch are prohibited. The assistant must work inside dedicated feature branches and inspect staged modifications via git diff --stat before pushing upstream.
Bulk staging with git add . or git add -A is blocked because it risks tracking sensitive files. The agent must stage every target file individually by its path.
What it helps with
- Split mixed changes into atomic logical commits
- Standardize commit messages to Conventional Commits syntax
- Prevent accidental direct pushes to the main branch
- Avoid staging sensitive local files through indiscriminate git add
Example prompts for the agent
- Create a feature branch and commit the authentication fixes atomically
- Format the recent changes using conventional commit messages
- Stage modified files individually and verify them with git diff --stat
How to install atomic-commits
Manually: put the files in place
.cursor/rules/atomic-commits.mdcFrontmatter: description, globs, alwaysApply
1Plugin marketplace
/plugin marketplace add rohitg00/pro-workflow/plugin install pro-workflow@pro-workflow2Manually: put the files in place
.claude/rules/atomic-commits.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/atomic-commits.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/atomic-commits.mdManually: put the files in place
.clinerules/atomic-commits.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about atomic-commits
How to install atomic-commits in Claude Code?
Add the marketplace source with /plugin marketplace add rohitg00/pro-workflow, then run /plugin install pro-workflow@pro-workflow. Alternatively, place the content in .claude/rules/atomic-commits.md.
What does atomic-commits do?
It guides the agent to write standard <type>(<scope>): <summary> messages, stay off main branches, and review staged files individually.
Which commit types are supported by atomic-commits?
The rule explicitly defines feat, fix, refactor, test, docs, chore, perf, ci, and style.
Source text
atomic-commits.mdc · MIT
--- description: Git best practices - atomic commits, descriptive messages, feature branches alwaysApply: true --- Make atomic commits. Each commit should represent one logical change. Write descriptive commit messages in conventional format: `<type>(<scope>): <summary>` Types: feat, fix, refactor, test, docs, chore, perf, ci, style Always work on feature branches. Never commit directly to main. Review changes before pushing. Run `git diff --stat` to verify what's staged. Stage specific files by name. Avoid `git add -A` or `git add .` which can include sensitive files.
© Rohit Ghumare · MIT · rohitg00/pro-workflow