create-commit
它能做什么
这项技能帮助你的 AI 把完成的工作保存到 Git 中,形成干净、小巧的提交。适合希望提交内容精准、只包含指定文件的开发者。
适用场景
- ✓当你要求你的 AI 提交已经完成的工作的时候。
- ✓当工作文件夹里有很多改动,而你只想提交其中一部分的时候。
- ✓当你希望提交说明遵循 Conventional Commits 风格的时候。
技能链接
https://github.com/DevCaress/guia-entrevistas-de-programacion/blob/main/.claude/skills/create-commit/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请只提交我今天完成的那一章,附上清晰的说明,并且不要推送。”
每周 5 个新技能,1 分钟读完。
工作原理
技能会检查改动和最近的提交说明,选出最小的合理文件集,运行相关检查,然后创建提交。除非你要求,它不会推送、修正提交或切换分支。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Create Commit
Create small, reviewable commits that follow this repository's contribution rules. Do not push, amend, rebase, reset, or change branches unless the user explicitly asks.
Workflow
Inspect
git status --short, the staged and unstaged diffs, and recent commit messages.Determine the smallest coherent commit. Preserve unrelated user changes; never use
git add -Aorgit add ..If the intended files or scope are unclear, ask the user before staging or committing.
Stage only the chosen paths with
git add <path>....Select a Conventional Commit message. Prefer a scoped type when useful:
docs(scope): describe documentation change feat(scope): describe user-facing addition fix(scope): describe corrected behavior test(scope): describe test change chore(scope): describe maintenance work ci: describe workflow changeUse a concise, lowercase imperative subject with no final period. Reuse an explicit user-provided message if it is suitable.
Run the relevant validation commands from
CONTRIBUTING.mdwhen they are practical for the changed files. Report any pre-existing or environment-related failure; do not conceal it by weakening checks.Review the staged diff one final time, then create the commit with
git commit -m "<message>".Confirm success with
git status --shortandgit log -1 --oneline.
Safety rules
- Do not commit secrets, generated output, local configuration, or unrelated files.
- Do not modify existing commits, force-push, or push any branch as part of this skill.
- Do not bypass hooks with
--no-verifyunless the user explicitly authorizes it after the failure is explained. - If validation fails because of the proposed change, fix it before committing when the user asked for a finished commit. If it is unrelated, report it clearly.
常见问题
它会把我的提交推送到服务器吗?
不会。除非你明确要求,技能不会推送。
它能一次提交所有内容吗?
不能。技能不会盲目添加所有文件,而只暂存指定的路径。
提交说明由它来写吗?
是的。它会提出一条 Conventional Commit 风格的说明,或者沿用你提供的说明。
详情
作者的原始描述
Create a safe, focused Git commit for this repository. Use when the user asks to commit completed work, prepare a commit, or choose a Conventional Commit message. Inspect the working tree, stage only intended files, validate relevant changes, and create the commit without pushing.
热度
- GitHub 星标
- 8.2k
- 排名
- #12545
- 许可证
- MIT
- 更新时间
- 2026/8/8
评论
- …