Git Commit Helper
Overview
Provide a deterministic commit workflow: analyze changes, group by package or meaningful unit, propose Conventional Commits messages in English, and default to a commit plan. Only perform actual staging/committing when explicitly requested or when auto-commit is approved.
Workflow
- •Verify repo context.
- •Inspect changes:
- •
git status -sb - •
git diff - •
git diff --staged
- •
- •Classify changes by package or meaningful unit. Prefer groups that make cherry-picking easy.
- •Keep changes in distinct packages separate unless tightly coupled.
- •Separate mechanical refactors from behavior changes.
- •If a change spans multiple packages for one feature, keep together only when necessary.
- •Produce a commit plan (default output):
- •List commit groups with included paths.
- •Provide a Conventional Commit message for each group.
- •Note any files that should stay uncommitted.
- •Accept follow-up instructions:
- •Adjust commit split.
- •Revise commit messages.
- •Proceed to stage/commit a subset.
Commit message rules
- •Use Conventional Commits in English.
- •Keep the scope tied to the package or area when useful (e.g.,
cli,daemon,core). - •Use
!for breaking changes and add a clear body line when needed.
Auto-commit safety
Only perform auto-commit when explicitly requested. Before committing:
- •Ensure there are changes to commit; if
git diff --stagedis empty, stop and report. - •Run required tests and confirm success (per repo standards).
- •Stage only the planned group of files.
- •Commit with the agreed message.
- •Report the resulting commit hash.
Output format
When not auto-committing, output a concise plan with:
- •Proposed commit groups and paths
- •Proposed Conventional Commit messages
- •Next actions the user can choose (edit message, adjust split, or run auto-commit)