name: git-commits description: Git提交规则 user-invocable: false
Git提交规则
当用户要求提交、推送或保存更改到git时:
必须使用/commit技能
不要直接运行git commit。而是:
Skill("commit")
/commit技能:
- 移除提交中的Claude属性
- 生成reasoning.md,记录尝试的内容
- 清理构建尝试,以便下一个功能
为什么这很重要
- 常规的
git commit会添加"Generated with Claude Code"和Co-Author行 /commit技能移除这些,使提交看起来是用户创作的- 推理记录保存构建历史,供未来会话使用
触发词
当您在用户提示中看到以下词语时,使用提交技能:
- “commit”、“push”、“save changes”
- “push to github”、“push changes”
- “commit and push”
提交后
技能将提示您运行:
bash "$CLAUDE_PROJECT_DIR/.claude/scripts/generate-reasoning.sh" <hash> "<message>"
然后如果请求,推送:
git push origin <branch>