Auto Commit
Create focused commits without rewriting or losing existing work. Write every commit subject in English.
Inspect
- Run
git status --short -uall.
- Inspect unstaged, staged, deleted, and untracked content with
git diff, git diff --cached, and targeted file reads.
- Treat the complete working tree as input, not only the current index.
- Preserve unrelated changes and pre-existing staged content. Stop when commit boundaries cannot be separated safely.
Plan
- Group files and hunks by one independent purpose. Keep source and its directly generated outputs together.
- Prefer fewer coherent commits over mechanical per-file splitting.
- Use repository-style prefixes:
feat: for new behavior or capability.
fix: for bug or regression fixes.
doc: for documentation or AI instruction changes.
ci: for CI, release, hook, build, or automation changes.
chore: for maintenance that fits none of the above.
- Use a concise imperative English subject, normally no more than 72 characters.
- Examples:
feat: align theme switching across framework sites, fix: preserve input state during reset, doc: add repository development skills.
For a bare commit request, show the proposed commits and wait for one choice:
- Commit without pushing.
- Commit and push once after all commits succeed.
- Cancel and preserve the workspace.
Skip confirmation only when the user explicitly says to commit directly, not ask again, or commit and push.
Execute
- Stage only the files or hunks for the current commit.
- Inspect
git diff --cached --name-status before committing.
- Commit without
--no-verify.
- Repeat for each planned commit; never stage the whole workspace before a multi-commit sequence.
- Do not run formatting, lint, tests, or generated-file commands unless the user requests them as part of the commit task.
- Push once after every commit succeeds when push was selected.
- Finish with
git status --short --branch.
Cancel or Fail Safely
- On cancellation, remove only staging added by this workflow and keep any staging that existed beforehand.
- On a hook or push failure, keep successful commits intact, report the exact failure, and do not bypass safeguards automatically.
- Report each commit hash, English subject, included scope, push result, and final workspace state.
1---2name: auto-commit3description: Inspect, plan, split, stage, commit, and optionally push local changes in the Any TDF repository using concise English Conventional Commit messages. Use when the user says auto commit, automatic commit, 自动提交, gcm, feat-gcm, fix-gcm, commit, commit and push, or asks to organize the current workspace into commits.4---56# Auto Commit78Create focused commits without rewriting or losing existing work. Write every commit subject in English.910## Inspect11121. Run `git status --short -uall`.132. Inspect unstaged, staged, deleted, and untracked content with `git diff`, `git diff --cached`, and targeted file reads.143. Treat the complete working tree as input, not only the current index.154. Preserve unrelated changes and pre-existing staged content. Stop when commit boundaries cannot be separated safely.1617## Plan1819- Group files and hunks by one independent purpose. Keep source and its directly generated outputs together.20- Prefer fewer coherent commits over mechanical per-file splitting.21- Use repository-style prefixes:22 - `feat:` for new behavior or capability.23 - `fix:` for bug or regression fixes.24 - `doc:` for documentation or AI instruction changes.25 - `ci:` for CI, release, hook, build, or automation changes.26 - `chore:` for maintenance that fits none of the above.27- Use a concise imperative English subject, normally no more than 72 characters.28- Examples: `feat: align theme switching across framework sites`, `fix: preserve input state during reset`, `doc: add repository development skills`.2930For a bare commit request, show the proposed commits and wait for one choice:31321. Commit without pushing.332. Commit and push once after all commits succeed.343. Cancel and preserve the workspace.3536Skip confirmation only when the user explicitly says to commit directly, not ask again, or commit and push.3738## Execute39401. Stage only the files or hunks for the current commit.412. Inspect `git diff --cached --name-status` before committing.423. Commit without `--no-verify`.434. Repeat for each planned commit; never stage the whole workspace before a multi-commit sequence.445. Do not run formatting, lint, tests, or generated-file commands unless the user requests them as part of the commit task.456. Push once after every commit succeeds when push was selected.467. Finish with `git status --short --branch`.4748## Cancel or Fail Safely4950- On cancellation, remove only staging added by this workflow and keep any staging that existed beforehand.51- On a hook or push failure, keep successful commits intact, report the exact failure, and do not bypass safeguards automatically.52- Report each commit hash, English subject, included scope, push result, and final workspace state.