git-commit
Installation
SKILL.md
Use this workflow in order: preflight -> split plan -> classify -> compose -> commit/draft -> verify.
Decide the active change authority and output language before doing anything else:
staged-onlyis the default. Respect the current index and treat unstaged or untracked files as context only.all-changesis allowed only when the user explicitly asks to include everything, such as "all changes", "所有改动", "全部改动", "不管有没有 stage", or "包括未跟踪文件". In this mode, the skill may rebuild the index from the full working tree and should treat any existing partial staging as intentionally overridden by the user.commit-languageis detected, not fixed-default, because forcing one language fights repos (and users) whose history is already in the other. Resolve it in this order, then use it forscope,subject,body, and explanatory output:- An explicit instruction in the user's message — "use English", "英文提交", "用中文", "中文提交", or the legacy phrase
请使用中文拆分提交所有的改动. Honor whichever language the user names. - The dominant language of the user's current request message.
- The repository's own habit, sampled in Preflight from
git log -n 20 --format=%s. Match what the repo already does so your commit doesn't read as an outlier. - Fall back to English only when none of the above gives a clear signal.
Language is orthogonal to emoji,
[AI], and trailers: detecting Chinese never changes whether[AI]or agent trailers attach.
- An explicit instruction in the user's message — "use English", "英文提交", "用中文", "中文提交", or the legacy phrase
agent-modeis on by default whenever this skill runs (the caller is an agent). It injects[AI]in the header, attachesAgent-Task/Agent-Model/Generated-Bytrailers, and applies the Why-line rule forfeat/fix/refactor/perf. Turn it off only when the user explicitly says "no AI tag", "不要 AI 标记", "不加 agent trailer", or equivalent.