关于 git-commits
git-commits 是用于处理 Git 提交或推送请求的 Claude Code 技能。它要求通过 /commit 技能完成提交,而非直接运行 git commit,并在之后记录推理过程;如有要求则推送。
主要功能
- 01通过 /commit 处理提交
- 02移除 Claude 署名
- 03记录构建推理过程
- 04按要求推送
适用场景
- 01提交已完成的更改
- 02保存不带 Claude 署名的更改
- 03记录构建尝试供后续会话参考
- 04将提交推送到 origin
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ parcadei/ continuous-claude-v3 --skill git-commits安装后在 Claude Code 中输入/git-commits确认已加载。
详细介绍
Git 提交规则
当用户要求将更改提交、推送或保存到 git 时:
必须使用 /commit 技能
不要直接运行 git commit。请改用:
Skill("commit")
/commit 技能会:
- 从提交中移除 Claude 署名
- 生成记录已尝试事项的 reasoning.md
- 清除构建尝试记录,为下一个功能做准备
为何这很重要
- 常规
git commit会添加“Generated with Claude Code”和共同作者行 /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>
评论
支持 Markdown