git-commit-cn
Skill0 starsChanged 8 months agoMITView on GitHub
Analyzes git changes and commits with Chinese commit messages; splits into multiple commits when changes serve unrelated purposes. Use when the user asks to commit, submit code, or says 提交改动、提交一下、提交代码、commit、帮我 commit.
- Reads credentials
- Commits and pushes
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Gahotx/skillstheir own version, first seen Oct 29, 2026
- nanami7777777/chinese-fullstack-skillstheir own version, first seen Mar 28, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Gahotx/skills★ 1same name
- nanami7777777/chinese-fullstack-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Files
Git 提交(中文 commit message)
触发词
用户说以下任意一种时执行:
- "提交改动"、"提交一下"、"提交代码"
- "commit 一下"、"帮我 commit"
流程
第一步:收集信息
并行执行:
git status
git diff --stat
git diff
git diff --cached
git log --oneline -5第二步:分析改动,决定是否拆分 commit
- 所有改动围绕同一个目的 → 单个 commit
- 改动涉及多个无关目的 → 拆分为多个 commit
- 拆分按逻辑关联性分组,不按文件类型分组
第三步:编写 commit message
格式:
- 第一行:简洁中文摘要,不超过 50 字
- 如有必要,空一行后用
-列表写详细说明 - 描述做了什么、为什么做,不罗列文件名
示例:
修复用户登录时 token 过期未刷新的问题
- 登录接口返回 401 时自动重试一次
- 刷新 token 失败则跳转登录页优化圈画交互:悬停高亮同组圈画 + 扩大点击命中区域第四步:执行提交
git add添加相关文件(排除.env、credentials等敏感文件)- 用 HEREDOC 格式传递 commit message:
git commit -m "$(cat <<'EOF'
这里写 commit message
EOF
)"- 需要拆分时,按顺序逐个
git add+git commit - 提交后执行
git status确认结果
第五步:报告结果并询问是否 push
提交完成后报告:
- 本次提交了几个 commit
- 每个 commit 的短 hash 和完整 message
- 当前分支名和状态(领先 remote 几个 commit)
然后主动询问用户是否需要 push,例如:
"以上 2 个 commit 已提交,当前领先 origin/main 2 个 commit。需要 push 吗?"
- 用户确认后才执行
git push - 用户不回复或拒绝则不 push
注意事项
- 绝不自动 push,必须询问用户确认
- 不修改 git config
- 不使用
--amend,除非用户明确要求且 HEAD 是本次会话创建的 - 没有改动时告诉用户"没有需要提交的改动"
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

