atomic-semantic-commit
Skill0 starsChanged 56 days agoMITView on GitHub
Split a messy working tree into small commits, one purpose and one context per commit, with semantic commit messages (feat, fix, docs, style, refactor, test, chore) written in Simplified Technical English. Use when the user asks to commit, split commits, organize changes, clean up history or write a commit message, or when unrelated changes are staged together. Commits only when asked.
- Reads credentials
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/comments.mdcCursor rule
- .cursor/rules/commit-messages.mdcCursor rule
- .cursor/rules/git-workflow.mdcCursor rule
- .cursor/rules/manage-stack.mdcCursor rule
- .cursor/rules/no-worktrees.mdcCursor rule
- manage-stackSkill
- convert-as-skillSkill
- create-agentSkill
- create-agents-mdSkill
- create-commandSkill
- create-hookSkill
- create-ruleSkill
- create-skillSkill
- super-architectureSkill
- super-cachingSkill
- super-nodejsSkill
- super-protobufSkill
- super-tech-blueprintSkill
- create-bruno-collectionSkill
- create-jira-storySkill
- glab-code-reviewSkill
- write-mr-descriptionSkill
- output-saversSkill
- polyglot-copywriterSkill
- super-designSkill
- super-elixirSkill
- super-noslopSkill
- super-refactorSkill
- super-tddSkill
- super-verifySkill
- one-next-actionSkill
- parking-lotSkill
- super-challenge-meSkill
- super-codebase-learnerSkill
- writing-plansSkill
- find-skillsSkill
- handoffSkill
- standupSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 9 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 17
One purpose per commit: If the subject needs the word "and", split the commit.
- Very specific: line 22
Commit only when the user asks: Do not push unless asked. Add no trailers (Co-authored-by, Generated with) unless the user's rule requires …
- Very specific: line 26
Look: Run git status --short and git diff --stat.
- Very specific: line 28
Stage exactly: Use git add <paths>, or git add -p when one file holds two purposes.
- Distinctive: line 29
Verify: Run the focused test for the staged context.
- Very specific: line 30
Write the message: Follow the format and the STE rules below.
- Very specific: line 31
Commit: Run git commit -m "<subject>".
- Very specific: line 33
Report: Run git log --oneline -n <count> and show the new commits.
- Very specific: line 60
Common words, one meaning: Use add, remove, fix, rename, move, replace, extract.
- Distinctive: line 62
Punctuation: no em dash, no en dash, no semicolon.
- Distinctive: line 63
Exact names: Keep code, identifiers, commands and error text unchanged.
- Distinctive: line 78
Do not put a test before the code it tests.
- Distinctive: line 103
Write in English by default.
- Distinctive: line 107
Do not rewrite commits that are already pushed.
- Distinctive: line 109
Do not use git worktree. Work in the current checkout.
- Very specific: line 110
Do not stage files the user did not mean to commit (.env, build output, secrets).
- Distinctive: line 115
Every change is in a commit, or the user said to leave it.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Atomic commits
One commit has one purpose and one context. The message is a semantic commit written in Simplified Technical English (STE): short, exact, and easy to scan.
Uses semantic commit types, STE message rules, and two helper scripts.
Rules
- One purpose per commit. If the subject needs the word "and", split the commit.
- One context per commit. One module, package or layer. Put the tests, types and docs for a change in the same commit as the change.
- Every commit works alone. It builds, and the tests for its context pass.
- Prepare first, change second. Refactor in one commit. Change behavior in the next.
- Keep formatting apart. A style-only change gets its own commit.
- Commit only when the user asks. Do not push unless asked. Add no trailers (
Co-authored-by,Generated with) unless the user's rule requires them.
Workflow
- Look. Run
git status --shortandgit diff --stat. Then runnode scripts/group-changes.mjsfor a starting grouping. It is a hint, not a plan. - Plan. Fill in templates/commit-plan.md: the commits in order, each with
type(scope), a subject, its files or hunks, and how to verify it. Show the plan before you commit if it has more than two commits or the user asked to see it first. - Stage exactly. Use
git add <paths>, orgit add -pwhen one file holds two purposes. Rungit diff --cached --stat. The staged files must match the plan. - Verify. Run the focused test for the staged context. If the test needs unstaged changes, say so and stage them or split differently.
- Write the message. Follow the format and the STE rules below. Run
node scripts/check-message.mjs "<message>"and fix every error. - Commit. Run
git commit -m "<subject>". Add a body only when the reason is not clear from the subject. - Repeat from step 3 until
git statusshows a clean tree, or only the changes the user wants to keep. - Report. Run
git log --oneline -n <count>and show the new commits.
Message format
<type>(<scope>): <subject>
<body, only when needed>| Type | Use it for |
feat | A new feature for the user |
fix | A bug fix for the user |
docs | A change to the documentation |
style | Formatting, missing semicolons, whitespace. No production code change |
refactor | A change to production code that does not change behavior |
test | Adding or changing tests. No production code change |
chore | Maintenance, tooling, dependencies. No production code change |
These seven are the base. Use perf, build, ci or revert only when the repository already uses them. How to choose a type, how to name a scope, and breaking changes: semantic-types.md.
Write the message in STE
- Subject: imperative, present tense:
add,fix,remove. Notadded,adds,adding. - Length: aim for 50 characters. The hard limit is 72. No period at the end. Lowercase after the colon, unless the repository does otherwise.
- One idea. Name the thing that changed and the action. Do not list files.
- Common words, one meaning. Use
add,remove,fix,rename,move,replace,extract. Avoidimprove,enhance,update stuff,various,misc,minor changes. - Body: explain why, not what. Use active voice. Use 20 words or fewer per sentence. One topic per paragraph. Wrap at 72 characters.
- Punctuation: no em dash, no en dash, no semicolon. Use a period or a colon.
- Exact names. Keep code, identifiers, commands and error text unchanged.
Full rules, a vocabulary list and before and after examples: ste-messages.md. The wider STE style is in ste-style.md, and the commit discipline is in commit.md.
Order of commits
Dependency order wins. A commit that another commit needs comes first. Otherwise use this order:
buildorchore: a new dependency or tool that later commits use.refactor: preparation that does not change behavior.fix: independent corrections.feat: the main change, with its tests.test: tests that cover code that already exists.docs: documentation.
Do not put a test before the code it tests. That commit would fail on its own.
Example
Changes: a login page, an avatar bug, a README note, and new tests for the login page.
fix(avatar): correct size on retina screens
feat(login): add login page with validation # includes its tests
docs(readme): add login setup stepsThe login tests go with the login page, so the page commit passes on its own. The avatar fix and the README note do not depend on it, so they are separate.
With a body, when the reason is not obvious:
fix(avatar): correct size on retina screens
The image used the CSS pixel size. Retina screens showed it blurry.
Use the device pixel ratio to pick the source size.Language
Write in English by default. If the repository history is in another language, write in that language and keep the type words in English. Then use polyglot-copywriter: simple-prose.md for the vocabulary and grammar bar, and its language pack for the register.
Boundaries
- Do not rewrite commits that are already pushed. No force push.
- Interactive rebase is not available in this environment. For unpublished commits, and only if the user asks, use
git commit --fixup <sha>and thenGIT_SEQUENCE_EDITOR=true git rebase -i --autosquash <base>. - Do not use
git worktree. Work in the current checkout. - Do not stage files the user did not mean to commit (
.env, build output, secrets). Name them and stop. - More advanced patterns: advanced.md.
Done when
- Every change is in a commit, or the user said to leave it.
- Each commit has one purpose and one context, and passes its own tests.
check-message.mjsreports no errors for any message.- The user has the list of new commits.
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.

