Stages and commits git changes using semantic commits with logical grouping. Use when the user asks to "commit my changes", "commit these changes", "commit staged files", "commit unstaged files", "commit specific files", "make a commit", "create commits", or /commit. Defaults to staged-only scope. Warns if unstaged changes exist. Groups related changes into separate semantic commits with meaningful titles and body descriptions. Supports three scopes: staged (default), unstaged, or specific files/paths provided by the user.
74
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Create semantic git commits with logical grouping and meaningful descriptions.
Determine scope from user's request:
If scope is staged and there are also unstaged changes, warn:
"Warning: you have unstaged changes in [list files]. These will NOT be included. Pass specific files or say 'unstaged' to include them."
Do not proceed with a different scope unless the user confirms.
Run these commands to understand the current state:
git status --porcelain
git diff --cached --stat # staged summary
git diff --stat # unstaged summary (for warning)
git diff --cached # staged full diff
git log --oneline -5 # recent commits (style reference)For unstaged scope, use git diff --stat and git diff instead of --cached.
For specific files, use git diff HEAD -- <files> (or --cached if already staged).
git add <each unstaged file> (not git add -A, to avoid accidentally including ignored files)git add <file> for each provided pathNever run git add . or git add -A unless the user explicitly requests it.
Read the full diff and group changes into logical commits. Each group should:
Common groupings:
If only one logical group exists, create one commit. Do not split artificially.
For each group, write a semantic commit following this format:
<type>(<scope>): <short imperative title>
<body — what and why, not how. 1-3 sentences. Wrap at 72 chars.>Types: feat, fix, refactor, chore, test, docs, style, perf, build, ci
Title rules:
feat(auth):, fix(queue):Body rules:
Examples of good messages:
feat(categories): add centroid fallback for cold-start classification
Falls back to name-derived embedding when fewer than 3 labeled
examples exist, preventing unclassified results on new categories.fix(queue): handle null accountId before enqueuing webhook
Without this guard, null accountIds silently enqueued invalid jobs
that failed only at worker pickup time, obscuring the root cause.Avoid:
fix: bug fixchore: update stufffeat: implement featureFor multiple groups, commit each group separately in dependency order (foundational changes first).
For each commit:
git restore --staged)git commit -m "$(cat <<'EOF' ...EOF)" using a HEREDOC to preserve formattinggit log --oneline -1If a pre-commit hook fails:
--no-verify66c7102
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.