| name | commit |
| description | Interactive commit workflow — analyzes all uncommitted changes, proposes atomic, logically grouped commits with messages following commit-conventions, and executes them only after the user approves the groups. Use when the user asks to commit their current changes, split the working tree into commits, or invokes /commit. For just a commit message or a single amend/reword, commit-conventions alone is enough.
|
| user_invocable | true |
| version | 2.0.0 |
Commit Command
Analyzes uncommitted changes and creates logical, atomic, grouped commits. Every group and every
message follows .agents/skills/commit-conventions/SKILL.md — read it first; this file only
describes the interactive flow around those rules.
Workflow
Step 1: Gather Changes
git status
git diff --stat
git diff
git diff --cached --stat
git diff --cached
git diff --name-status
git diff --cached --name-status
Warning: Skip sensitive files (.env, credentials, API keys) — warn user if detected.
Step 2: Analyze and Group
Group the changes into atomic, functional units following the "Atomic Commits" section of
commit-conventions (tests with their code, lockfiles and migrations with their cause, generated
files and upgrade notes handled as described there, order so that no commit breaks the app).
If a single file contains changes for multiple groups, use git add -p <file> to stage specific
hunks separately.
Step 3: Propose Commit Groups
Present groups to user in format:
## Group 1: admin: product list now displays name instead of ID
- improves readability for administrators managing large catalogs
Files:
- path/to/file1.php
- path/to/file2.php
---
## Group 2: OrderTotalCalculator: added null guard for missing discount
- order total crashed when optional discount was not set
Files:
- path/to/other-file.php
Then ask: "Proceed with these groups? (yes / edit messages / modify groups / regroup / abort)"
Step 4: Execute After Approval
For each approved group:
- Stage only the files in that group (use
git add -p for partial files)
- Commit with the approved message
- Report success
- Move to next group
If commit fails (pre-commit hook, etc.):
- Show the error
- Ask user how to proceed (fix and retry / skip this group / abort)
If user wants to abort mid-process:
- Stop immediately
- Inform user which commits were already made
- Suggest
git reset --soft HEAD~N to undo if needed
Interaction Pattern
- Show proposed groups with suggested messages
- Ask user to confirm, edit messages, modify groups, regroup, or abort
- Only commit after explicit approval
- Report success after each commit
- If all changes belong to one logical group, propose single commit