atomic-commit
Skill1 starsChanged 3 months agoMITView on GitHub
User-invoked workflow for inspecting local Git changes, partitioning them by functional cohesion, and creating atomic commits only when explicitly requested. Use only when the user asks to make atomic commits, split commits, commit current changes, preserve exact commit messages, or generate messages that follow repository history and the user's conversation language; never invoke implicitly. Protects staged intent, avoids destructive history operations, and verifies status/log/show after each commit.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- dimastriann/odoo-erp-mcptheir own version, first seen Nov 8, 2026
- sowahq/claude-code-stacktheir own version, first seen Oct 15, 2026
- TitusKirch/skillstheir own version, first seen Oct 13, 2026
- d-oit/rust-2026-templatetheir own version, first seen Jun 16, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- d-oit/rust-2026-template★ 15same name
- dimastriann/odoo-erp-mcp★ 2same name
- TitusKirch/skills★ 2same name
- sowahq/claude-code-stack★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- code-reviewSkill
- create-project-build-promptSkill
- design-challengeSkill
- dev-docs-authoringSkill
- implementation-planningSkill
- pragmatic-tddSkill
- quality-verificationSkill
- requirements-interviewSkill
- solution-brainstormingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. 0 are common, 22 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
22
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Create small, reviewable Git commits from local changes when the user explicitly asks for commit creation.
- Distinctive: line 15
Use this skill only when the user explicitly invokes it or asks for atomic commits.
- Distinctive: line 16
Never push, pull with rebase, rebase, amend, reset, change history, create branches, create tags, open PRs, or publish anything.
- Distinctive: line 17
Never chain into another skill or workflow automatically.
- Distinctive: line 18
Stop and report when safe non-interactive grouping is not possible.
- Distinctive: line 22
Start every run with evidence:
- Very specific: line 26
Read relevant diffs, file names, binary/generated indicators, and several recent complete commit messages (subject and body).
- Distinctive: line 37
Keep implementation and its tests together.
- Distinctive: line 42
Keep a migration with required supporting code when they cannot work independently.
- Distinctive: line 43
Keep generated artifacts out unless the user explicitly expects them and they are part of the deliverable.
- Distinctive: line 45
If the same file needs hunk-level splitting and there is no safe non-interactive way to stage the right hunks, stop and report the required …
- Distinctive: line 53
If the repository has no reachable commits, use the first-commit format below.
- Distinctive: line 58
Do not rewrite, normalize, prefix, translate, rewrap, or split an exact message.
- Distinctive: line 60
Ask for additional messages only when the user explicitly requested split commits and did not provide enough exact messages.
- Distinctive: line 63
When generating a message from repository history:
- Distinctive: line 66
Follow the dominant local format for type, scope, subject punctuation, body presence, paragraph or bullet layout, and level of detail.
- Very specific: line 68
Use the user's current conversation language for generated <subject> and <body>, even when repository history uses another language.
- Very specific: line 69
Keep Conventional Commit type and scope as concise lowercase English identifiers when the local format uses them.
- Distinctive: line 70
If the conversation is multilingual, use the language of the user's latest commit request unless the user specifies another language.
- Very specific: line 80
Use one of these lowercase English types: feat, fix, refactor, perf, test, docs, build, ci, chore, style.
- Very specific: line 82
Write <subject> and <body> in the user's current conversation language.
- Distinctive: line 100
Avoid destructive index operations.
- Distinctive: line 101
Commit with the exact or selected message.
- Distinctive: line 102
If hooks fail, report the actual error.
- Distinctive: line 103
After each commit, verify with:
- Distinctive: line 113
Stop and report instead of committing when:
- Distinctive: line 141
Keep the output specific enough that the user can audit exactly what was committed and what remains.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Atomic Commit
Create small, reviewable Git commits from local changes when the user explicitly asks for commit creation. Preserve user intent, staged state, and exact user-provided messages.
Invocation Boundary
- Use this skill only when the user explicitly invokes it or asks for atomic commits.
- Never push, pull with rebase, rebase, amend, reset, change history, create branches, create tags, open PRs, or publish anything.
- Never chain into another skill or workflow automatically.
- Stop and report when safe non-interactive grouping is not possible.
Initial Inspection
Start every run with evidence:
git status --short --branch- Inspect staged, unstaged, and untracked changes separately.
- Read relevant diffs, file names, binary/generated indicators, and several recent complete commit messages (subject and body). Determine whether
HEADexists; do not infer repository style from a single one-line subject. - Identify sensitive, large, binary, generated, lockfile, vendored, or credential-like files before staging.
- Identify the language used in the user's current conversation or commit request.
- Report planned groups before committing unless the user supplied an exact grouping that is already safe.
Respect staged intent. Do not silently mix staged and unstaged changes. If staged changes form a coherent commit, keep that boundary. If they are clearly mixed, stop and ask before regrouping; never unstage them automatically.
Grouping Rules
Partition by functional cohesion:
- Keep implementation and its tests together.
- Separate unrelated behavior changes.
- Separate pure refactors from behavior changes when independently deployable.
- Separate mechanical formatting from semantic changes.
- Separate migrations when independently deployable.
- Keep a migration with required supporting code when they cannot work independently.
- Keep generated artifacts out unless the user explicitly expects them and they are part of the deliverable.
If the same file needs hunk-level splitting and there is no safe non-interactive way to stage the right hunks, stop and report the required split instead of risking the index.
Message Rules
Apply this precedence when selecting a commit message:
- An exact user-provided commit message is authoritative.
- Otherwise, use the repository's recent commit history as the primary format reference.
- If the repository has no reachable commits, use the first-commit format below.
For an exact user-provided message:
- Preserve exact messages verbatim.
- Do not rewrite, normalize, prefix, translate, rewrap, or split an exact message.
- One exact full message maps to one commit covering the currently selected changes, even if the skill would otherwise prefer more atomic grouping.
- Ask for additional messages only when the user explicitly requested split commits and did not provide enough exact messages.
- Exact user intent outranks default atomic grouping.
When generating a message from repository history:
- Inspect multiple recent full messages, favoring recent commits that affect the same subsystem or change type.
- Follow the dominant local format for type, scope, subject punctuation, body presence, paragraph or bullet layout, and level of detail.
- Borrow the format, not wording. Never copy an unrelated historical message.
- Use the user's current conversation language for generated
<subject>and<body>, even when repository history uses another language. Keep code identifiers, paths, API names, and other technical tokens unchanged when translation would reduce precision. - Keep Conventional Commit
typeandscopeas concise lowercase English identifiers when the local format uses them. - If the conversation is multilingual, use the language of the user's latest commit request unless the user specifies another language.
For a repository with no reachable commits, generate the first commit message with this exact structure:
<type>(<scope>): <subject>
<body>- Use one of these lowercase English types:
feat,fix,refactor,perf,test,docs,build,ci,chore,style. - Choose a concise lowercase English
<scope>that identifies the affected subsystem. - Write
<subject>and<body>in the user's current conversation language. - Separate the subject and body with exactly one blank line.
- Include a meaningful body. Use
-bullets when describing multiple changes, and explain what changed with enough detail for later review.
Example for a Chinese conversation:
feat(agent-runtime): 完善隔离执行与审查反馈闭环
- 为 CrewAI Agent 增加角色级输出契约、独立子进程与存储隔离、受限 Planner 选择和真实并行度审计。
- 强制执行上下文预算与 resource_limit 失败分类,统一 Agent、ToolCall、诊断和修复产物的审计语义。
- 将 Review 批准的低风险修复通过 protocol v1 接入确定性 Core Writer,并补充评估脚本、回归测试和架构文档。Safe Commit Execution
- Save the current status summary before modifying the index.
- Stage only files that belong to the next approved group.
- Avoid destructive index operations. Do not use
git resetas a cleanup tool unless the user explicitly authorized that operation. - Commit with the exact or selected message.
- If hooks fail, report the actual error. Do not bypass hooks and do not alter an exact message to appease hooks.
- After each commit, verify with:
git status --shortgit log -1 --format=fullergit show --stat --oneline --decorate --no-renames HEAD
- Continue only with remaining groups that are still safe and authorized.
For untracked files, stage by explicit path. Do not use broad git add . when unrelated or sensitive files may exist.
Stop Conditions
Stop and report instead of committing when:
- The user did not explicitly ask to create commits.
- Grouping requires unsafe hunk-level splitting.
- A sensitive, large, binary, generated, or credential-like file needs explicit handling.
- Staged and unstaged changes conflict with the proposed grouping.
- Hooks fail.
- The user explicitly requested split commits but did not provide enough messages or authorize generated messages.
Report Format
Use this structure:
## Planned Groups
- Group: files, message source, reason.
## Executed Commits
- `hash` - exact subject; verification summary.
## Remaining Changes
- Files or groups left uncommitted and why.
## Evidence
- `git status --short --branch` -> summary.
- `git log -1 ...` / `git show ...` -> summary for each commit.Keep the output specific enough that the user can audit exactly what was committed and what remains.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

