About commit-changes
commit-changes is a skill that guides repository commits for developers creating commits from reviewed changes. It emphasizes atomic groups and avoids merging or squashing commit history.
Key features
- 01Check workspace status and staged and unstaged diffs
- 02Group changes into atomic commits
- 03Follow Conventional Commits and project conventions
- 04Stage specific files and verify the index before committing
- 05Check commit messages and workspace status afterward
Use cases
- 01Create separate commits for distinct changes
- 02Stage selected hunks in shared files
- 03Write commit messages to project conventions
- 04Ensure commits exclude unrelated staged changes
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ aircury/ ai-framework --skill commit-changesAfter installing, type/commit-changesin Claude Code to confirm it loaded.
Details
From the project READMEWhen committing changes, follow this workflow:
This skill creates ordinary, new commits from reviewed staged changes only.
It must never create a merge commit or squash commits:
do not run git merge, git merge --no-ff, git merge --squash,
git rebase --autosquash, git commit --amend to fold commits together,
or any equivalent history-combining operation.
-
Analyze the workspace: Run
git statusandgit diff(staged and unstaged) to understand all changes. -
Group changes semantically: Identify logical units of work. Each commit must be atomic — one functional change per commit. Group related files that together implement a single concern.
-
Write conventional commit messages: Use the format
<type>(<scope>): <description>, optionally followed by a body. Allowed types:feat: new featurefix: bug fixrefactor: code restructuring without behavior changedocs: documentation onlystyle: formatting, whitespace, semicolons (no logic change)test: adding or updating testschore: tooling, configs, dependenciesperf: performance improvementci: CI/CD changesbuild: build system changesrevert: reverting a previous commit
The project's own convention comes on top of this format. Before writing the first message, read what the project says about commits — its
README.md(a Contributing section),CONTRIBUTING.md,FRAMEWORK.local.mdor equivalent — and look at its recentgit log. A project may require more than the format above, such as the delivery card's key in every subject; where the documentation and the history disagree, the documentation wins. A convention missed here is found after every commit has been written, and correcting it means rewording them all. -
Commit rules:
- Keep the subject line to one line. Add a body when the change needs context the subject cannot carry — why the change was made, a trade-off taken, or a consequence for other work. Separate it from the subject with a blank line, and leave it out when the subject already says everything.
- Never include trailers, co-author lines, AI/tool attribution, generated-by markers, bot signatures, or metadata implying AI involvement — in the subject or the body.
- Use
git addfor specific files per commit, nevergit add .unless all changes belong to one commit. - Read
git diff --cached --name-onlyimmediately before every commit, and commit only when it matches the group. Naming your own files does not make the index yours:git rm,git mvand an interrupted earlier group all stage changes that stay staged, so a latergit add <one file>commits them alongside it. The result is a commit that spans two changes, and the message describes only one of them — which is invisible in review, because the message reads as true. - After each commit, run
git log -1 --format=%Band verify the final message contains no AI-related attribution or metadata, then rungit statusto verify success. - A file that mixes this change's edits with someone else's unrelated
uncommitted work needs hunk-level staging, not a decision to include
or skip the whole file.
git add <file>stages every hunk in it, which either drags unrelated work into your commit or forces you to leave your own change unstaged. Isolate your hunks first —git diff -- <file>and identify them by their@@headers — then stage only those withgit apply --cachedagainst a patch file containing just those hunks (each hunk needs the samediff --githeader, but its own@@block; git apply locates it by context, so drift in the stated line numbers from omitted hunks is not a problem). Verify the split withgit diff --cached -- <file>(only your hunks) andgit diff -- <file>(only the rest, still present in the working tree, untouched). This is a real, not hypothetical, shape in a repository with one large shared test file that every change in an area lands in.
-
Execution order: Stage and commit one group at a time. Do not skip ahead.