Create 1-3 git commits for the current changes. Merge related changes together—do NOT split finely. Use concise Conventional Commits-style subjects.
Grouping strategy
- Prefer 1 commit. Only split if changes are clearly unrelated.
- Same topic → same commit. Do NOT over-split.
Format
<type>(<scope>): <summary>
typeREQUIRED.feat,fix,docs,refactor,chore,test,perf,style.scopeOPTIONAL. Short noun for affected area (e.g.,api,ui,config).summaryREQUIRED. Short, imperative, <= 72 chars, no trailing period.
Notes
- Body is OPTIONAL. If needed, add a blank line after the subject and write short paragraphs.
- Do NOT include breaking-change markers or footers.
- Do NOT add sign-offs (no
Signed-off-by). - Only commit; do NOT push.
- If it is unclear whether a file should be included, ask the user which files to commit.
- Treat any caller-provided arguments as additional commit guidance. Common patterns:
- Freeform instructions should influence scope, summary, and body.
- File paths or globs should limit which files to commit. If files are specified, only stage/commit those unless the user explicitly asks otherwise.
- If arguments combine files and instructions, honor both.
Rules
- Minimal tool calls. One
git diff --stat+ onegit diffis enough. - Do NOT ask the user questions. Decide and commit.
- Do NOT run
git logunless scope is truly unclear. - Commit as fast as possible.
Steps
- Run
git diff --statandgit difftogether in one bash call (use&∨). - If argument-specified files exist, add
-- <files>to the diff commands. - Infer scope from changed files/paths. Infer type from change nature (new = feat, fix = fix, rest = chore/refactor).
git add -A(orgit add <files>) thengit commit -m "<subject>"in ONE bash call (chain with&&).- If changes are clearly 2 unrelated topics, do 2 commits at most. Otherwise 1 commit.