根据 git 缓存区(staged)内容生成中文提交消息草稿。无参数时只看缓存区、不执行 git add;带参数 `/msg X` 时先把与 X 相关的改动 `git add` 到缓存区,再生成消息草稿。始终不执行 git commit。
74
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
git add -A / git add . / git add --all:只按明确的路径列表添加/msg:只分析 git diff --cached,完全忽略未缓存的修改,不执行 git add/msg X:先把与 X 相关的改动加入缓存区,再按无参数流程生成消息/msg X 的执行步骤git status --short 查看当前所有未缓存/已缓存的改动ls/test -e 能命中)→ 直接 git add <X>标注修复、日志、skill)→ 从 git status 的未缓存列表中挑出与主题相关的文件,显式列出每一个路径,再执行 git add <path1> <path2> ...git add <明确路径列表>(禁止 -A/./--all)git diff --cached --stat 确认缓存区内容git diff --cached --stat 查看缓存文件列表git diff --cached 查看具体改动内容git log --oneline -5 了解本项目的 commit message 风格/tmp/gitmsg_<YYYYmmdd_HHMMSS>_<sha6>.txt,其中 sha6 取 git diff --cached 内容的 sha256 前 6 位首行:一句话总结(≤50字,说明做了什么)
模块A:
- 新增/更新/修复/删除 具体内容
模块B:
- ...MSGFILE=$(python3 -c "
import hashlib, subprocess, datetime
diff = subprocess.check_output(['git','diff','--cached'])
h = hashlib.sha256(diff).hexdigest()[:6]
ts = datetime.datetime.now().strftime('%Y%m%d_%H%M%S')
print(f'/tmp/gitmsg_{ts}_{h}.txt')
")$MSGFILE 的值(实际路径)git commit -F /tmp/gitmsg_<YYYYmmdd_HHMMSS>_<sha6>.txt(用实际生成的文件名替换占位符)
不主动执行 commit,不主动询问。
79c272f
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.