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-only is the default. Respect the current index and treat unstaged or untracked files as context only.
  • all-changes is 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-language is 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 for scope, subject, body, and explanatory output:
    1. An explicit instruction in the user's message — "use English", "英文提交", "用中文", "中文提交", or the legacy phrase 请使用中文拆分提交所有的改动. Honor whichever language the user names.
    2. The dominant language of the user's current request message.
    3. 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.
    4. 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.
  • agent-mode is on by default whenever this skill runs (the caller is an agent). It injects [AI] in the header, attaches Agent-Task / Agent-Model / Generated-By trailers, and applies the Why-line rule for feat / fix / refactor / perf. Turn it off only when the user explicitly says "no AI tag", "不要 AI 标记", "不加 agent trailer", or equivalent.

1. Preflight

Installs
7
GitHub Stars
16
First Seen
Apr 19, 2026
git-commit — bahayonghang/my-claude-code-settings