Git Commit (auto message)
Workflow
- •Stage —
git add -A(or stage specific paths if the user specified). - •Inspect — Run
git status -sbandgit diff --cached(andgit diff --cached --statif helpful). If nothing staged, stop and report. - •Compose — From the staged diff, write a single short commit message: concise, imperative, summarizing the change (e.g. "Add raw mouse cursor clip on focus loss", "Fix cbuf overflow logging in debug build"). Prefer conventional style only when it fits (e.g.
fix(menus): ...). - •Commit —
git commit -m "message".
Do not bump version or push unless the user asks.
Optional: stage and show in one go
From repo root, to stage everything and print the diff for message composition:
bash
./.cursor/skills/git-commit/scripts/stage_and_show.sh
Then compose the message from the output and run git commit -m "...".
Scope
- •Default: stage all changes (
git add -A). If the user names paths or says "only …", stage only those. - •Untracked files are included with
-A; ensure.gitignoreis correct.