commit

Installation
SKILL.md

Commit

Write a commit message from the staged changes only, then commit.

Steps

  1. Inspect state — run these together:
    • git status --short
    • git diff --staged --stat
    • git diff --staged (if huge, read the stat plus diffs of the most important files)
    • git log --format='%s' -n 20 (match the repo's existing style)
  2. If nothing is staged, stop and tell the user. Do not git add -A unless they asked.
  3. Understand why the change was made, not just what lines moved. Group the diff into one logical change; if the staged diff clearly contains several unrelated changes, say so and suggest splitting.
  4. Draft the message and show it to the user in a fenced code block. Stop there — do not commit yet. Ask them to approve, or reply with edits.
    • Never run git commit in the same turn as the draft, not even with --dry-run as a substitute for asking.
    • If they request changes, redraft and ask again.
  5. Only after the user approves, commit with git commit -m "..." (repeated -m for body/footer).
  6. Report the resulting git log -1 --stat briefly.
Installs
3
Repository
ntan-wan/skills
First Seen
Aug 22, 2026
commit — ntan-wan/skills