How this skill is triggered — by the user, by Claude, or both
Slash command
/scm-tools:commitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Stage and commit changes with proper commit message formatting.
Stage and commit changes with proper commit message formatting.
If bin/scm-tools-git exists in the project root, use bin/scm-tools-git instead of git for the add and commit steps. All other git commands (status, diff, log, etc.) use plain git.
Review changes:
git status
git diff
git diff --staged
Stage explicitly:
bin/scm-tools-git add app/models/user.rb
bin/scm-tools-git add spec/models/user_spec.rb
Or interactively: bin/scm-tools-git add -p
Verify staging:
git diff --staged
Atomicity check: Draft your commit message, then invoke the commit-splitter agent with the staged diff and proposed message. If the verdict is "split", unstage everything, stage only the first unit, and restart from step 2. Commit each unit separately. If "atomic", proceed to step 5.
Commit with heredoc:
git commit -m "$(cat <<'EOF'
Subject line here
Optional body explaining why, wrapped at 72 chars.
EOF
)"
Verify:
git log --oneline -1
| Task | Do | Don't |
|---|---|---|
| Stage | bin/scm-tools-git add <path>, bin/scm-tools-git add -p | git add -A, git add . |
| Unstage | git restore --staged <path> | git reset <path> |
bin/scm-tools-git add -p to split changes into logical commits| Task | Do | Don't |
|---|---|---|
| Delete tracked | git rm [-r] <path> | rm <path> |
| Rename/move | git mv <old> <new> | mv <old> <new> |
git revert <sha> to undo merged history on shared branches--force-with-lease (never plain --force)git reset --hard on shared work without confirmationAdd validation for email format
Fix login timeout on slow connections
Update dependencies to patch CVE-2024-1234
Fixed the bug # past tense, vague
Updates to the login page. # third person, period, vague
WIP # meaningless
Add validation for "email" # smart quotes, use straight quotes
Fix timeout — increase to 30s # em dash, use hyphen
Update deps → patch CVE # Unicode arrow, use ->
Address review feedback # kitchen-sink, split into separate commits
Fix lint errors across files # kitchen-sink, one commit per file/concern
Add validation; update tests # semicolons joining unrelated changes
The subject line is imperative and subject-elided ("Add X"). The body is not. Write the body in full declarative sentences with explicit subjects -- it should sound like a person explaining the change to a colleague, not a changelog entry.
These smells mean the subject line's register has leaked into the body:
| Anti-pattern | Example |
|---|---|
| Subject-elided imperatives | "Mirrors X." "Gains Y." "Threads Z through W." |
| Joiners doing a word's work | +, &, ; connecting clauses, or "plus" gluing thoughts |
| Wall of text | One paragraph covering three or more distinct facets |
| Clipped staccato cadence | "X does Y. Y does Z. Z does W." across consecutive sentences |
Bad -- imperative fragments, no subjects, single paragraph:
Mirrors PasswordsController's shape with param: :token and a
check_inbox action. Views commit to form+button semantics,
aria-labelledby landmarks, and content_for titles. Admin layout
gains <main> landmark and dynamic <title>.
Good -- declarative sentences, explicit subjects, one paragraph per facet:
The controller mirrors PasswordsController's shape - new, create,
edit, update - with param: :token and a check_inbox collection
action.
The views stick to form-and-button semantics rather than
Turbo-method links, use aria-labelledby landmarks, and set titles
via content_for. The admin layout picks up a <main> landmark and
a dynamic <title>.
Bad -- telegraphic "gains", semicolon-joined facets:
Extends sign_in_as_admin with a with_elevation: kwarg so existing
admin specs stay green, and threads with_elevation: true through
the impersonation request spec plus the users spec. Users spec
gains a redirect assertion; session_elevations spec gains the
return-to round-trip and cross-session PATCH rejection tests.
Good -- split into paragraphs, natural verbs:
To keep existing admin specs green, sign_in_as_admin takes a new
with_elevation: kwarg. The impersonation request spec and the
users spec both pass with_elevation: true.
The users spec also picks up a redirect assertion for the
unelevated case. The session_elevations spec now covers the
return-to round-trip end-to-end and verifies that a PATCH from
a different session is rejected.
Note: multi-paragraph bodies describe multiple facets of one concern. They are not license to bundle unrelated concerns into a single commit.
Each commit must address exactly one concern. If you're about to commit changes that span multiple concerns, STOP and split them into separate commits.
Before committing, draft your commit message mentally. If any of these are true, you need multiple commits:
When implementing code review feedback, each fix is its own commit -- not one commit per review round. Stage and commit each fix before moving to the next one. This makes review cleanup easier and keeps the history reviewable.
# BAD: one commit for a review round
"Address review feedback: fix nil check, rename method, add test"
# GOOD: three separate commits
"Guard against nil user in checkout"
"Rename process_order to fulfill_order"
"Add test for expired coupon edge case"
After committing, report:
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub mjbellantoni/cc-marketplace --plugin scm-tools