Commit Staged Changes
Review staged file changes, auto-generate an appropriate commit message, and commit.
Steps
Check staged files
- Run
git status --shortto list staged files - If nothing is staged, notify the user and stop
- NEVER auto-stage unstaged files (modified, untracked, etc.)
- Run
Review changes in detail
- Run
git diff --cachedto inspect the full diff of staged files - Run
git diff --cached --statto get change statistics
- Run
Generate commit message
- Analyze the changes and compose a commit message:
- Determine the change type (feat/fix/refactor/docs/style/test, etc.)
- Summarize the main changes concisely
- If
$ARGUMENTSis provided, write the message in that language (e.g., "japanese", "ja", "english", "en") - If no argument is given, write the message in English by default
- Analyze the changes and compose a commit message:
Execute the commit
- Commit with the generated message
- Verify the result with
git log -1 --oneline
Constraints
- Only target staged files
- NEVER auto-stage unstaged files, even if they exist
- Do NOT push to the remote repository
- Do NOT create a pull request
- Auto-generate the commit message based on change content
- For large changesets, highlight the primary changes in the main message