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 attachesAgent-Task/Agent-Model/Generated-Bytrailers and applies the Why-line rule forfeat/fix/refactor/perf. It does not inject[AI]in the header. Pass--aionly when the user explicitly says "add [AI] tag", "加 AI 标记", "加上 [AI]", or equivalent. Turn agent-mode off when the user says "no AI tag", "不要 AI 标记", "不加 agent trailer", or equivalent.commit-channelis local git only. Create the commit withgit commit -F <message-file>(orrtk proxy git commit -F). Do not create commits through GitHub's web UI, Contents API, Git Data API, GraphQLcreateCommitOnBranch,gh apifile-commit helpers, GitHub MCPcreate_or_update_file/push_files, or a platform GitHub App (Cursor Agent, Copilot, Grok[bot], Devin). Those channels make GitHub show "This commit was created on GitHub.com." and often "Committed via ". Do not passgit commit --trailerforCo-authored-by,Made-with, or "Committed via" text.- Skill responsibility: local commit preparation, execution, and verification.
git push, pull-request creation,git commit --amend,git rebase, and tags belong to other workflows. For mixed requests, preserve the user's full request and hand already-authorized remaining steps back to the main coordinator after verification (§7); the skill boundary does not end the request. A commit-only request grants no push or PR authorization.