- Read
git status --shortfirst and identify only the files touched by the current task or explicitly requested by the user. - Leave unrelated dirty files untouched unless the user explicitly asks for a whole-tree commit.
- If the tree is mixed, inspect diffs before staging and keep the staged set scoped to one semantic change.
- Stage files by purpose, not with
git add ., unless the whole task is intentionally one coherent change. - Default to one scoped conventional commit when the task is cohesive. Split into multiple commits only when there are clearly separate semantic groups.
- When multiple commits are needed, prefer this order:
feat,fix,test,docs,refactor,chore. - Use short scoped conventional commit messages that match exactly what changed.
- Keep each commit minimal, reviewable, and scoped to one change type.
- Run
git status -sbbetween groups to confirm the next commit only contains intended files. - Stop and ask before staging unrelated user changes, generated churn you do not understand, or a dirty tree that makes ownership ambiguous.
Commit
Stage and commit changes in semantic groups. Use when the user wants to commit, organize commits, or clean up a branch before pushing.
Commit by majiayu000 · c33fa2d
npx skillmds add majiayu000/commit-27 File contents
---name: commit-27description: Stage and commit changes in semantic groups. Use when the user wants to commit, organize commits, or clean up a branch before pushing.---
1. Read `git status --short` first and identify only the files touched by the current task or explicitly requested by the user.
2. Leave unrelated dirty files untouched unless the user explicitly asks for a whole-tree commit.
3. If the tree is mixed, inspect diffs before staging and keep the staged set scoped to one semantic change.
4. Stage files by purpose, not with `git add .`, unless the whole task is intentionally one coherent change.
5. Default to one scoped conventional commit when the task is cohesive. Split into multiple commits only when there are clearly separate semantic groups.
6. When multiple commits are needed, prefer this order: `feat`, `fix`, `test`, `docs`, `refactor`, `chore`.
7. Use short scoped conventional commit messages that match exactly what changed.
8. Keep each commit minimal, reviewable, and scoped to one change type.
9. Run `git status -sb` between groups to confirm the next commit only contains intended files.
10. Stop and ask before staging unrelated user changes, generated churn you do not understand, or a dirty tree that makes ownership ambiguous.
majiayu000/claude-skill-registry-data/tree/main/development/commit-bjornmelin-dev-skills commit c33fa2d5cc
Frequently asked questions
Run npx skillmds add majiayu000/commit-27 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Stage and commit changes in semantic groups. Use when the user wants to commit, organize commits, or clean up a branch before pushing. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
majiayu000 (@majiayu000) published this skill. Their other Agent Skills are listed on their SkillMD profile.