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 attaches Agent-Task / Agent-Model / Generated-By trailers and applies the Why-line rule for feat / fix / refactor / perf. It does not inject [AI] in the header. Pass --ai only 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-channel is local git only. Create the commit with git commit -F <message-file> (or rtk proxy git commit -F). Do not create commits through GitHub's web UI, Contents API, Git Data API, GraphQL createCommitOnBranch, gh api file-commit helpers, GitHub MCP create_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 pass git commit --trailer for Co-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.

1. Preflight

Installs
12
GitHub Stars
16
First Seen
Apr 19, 2026
git-commit — bahayonghang/my-ai-cli-toolkit