commit
它能做什么
这项技能指导你的智能体按标准格式用 Git 保存代码改动。适合希望提交历史清晰、一致的开发者。
适用场景
- ✓当你完成一项改动,并想将其保存到 Git 中的时候。
- ✓当你的提交信息需要遵循标准格式的时候。
- ✓当你的改动涉及多个主题,需要拆分为独立提交的时候。
技能链接
https://github.com/EverMind-AI/EverOS/blob/main/.claude/skills/commit/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我提交我的改动,并附上清晰的提交信息,描述这次的错误修复。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查改动内容以及过往提交的样式,然后撰写包含类型、简短摘要和可选细节的提交信息。它不会跳过项目的安全检查。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
/commit
Create a well-formed commit following the Conventional Commits
standard. The format is enforced by gitlint in the commit-msg hook.
Steps
Run
git statusandgit diff(andgit diff --staged) to see what changed.Review recent history for style:
git log --oneline -10.Group the change into a single focused commit. If the working tree mixes unrelated changes, stage selectively (
git add -p/ specific paths) rather than committing everything at once.Write the message in Conventional Commits form:
<type>[(scope)][!]: <imperative summary, ≤72 chars> <optional body: what & why, wrapped at 72> <optional footer: BREAKING CHANGE: …, Refs: #123>Never use
--no-verify. If pre-commit hooks fail, fix the cause and re-commit.Do not commit secrets, generated artifacts, or work-in-progress directly to the protected
mainbranch.
Types
| Type | Use for |
|---|---|
feat |
new feature |
fix |
bug fix |
refactor |
behavior-preserving restructure |
test |
add / update tests |
docs |
documentation |
style |
formatting only |
perf |
performance |
chore |
config / build / tooling |
build |
build system or dependencies |
ci |
CI configuration |
revert |
revert a previous commit |
Notes
- No emoji — the title must start with the
type. - One logical change per commit; keep the history bisectable.
- The summary is imperative mood: "add", not "added" / "adds".
scopeis optional:fix(search): …. A!before the colon (or aBREAKING CHANGE:footer) marks a breaking change.
常见问题
什么是 Conventional Commits?
它是一种标准格式,每条信息以类型开头,例如 feat 或 fix,后面跟一段简短的摘要。
它会跳过提交检查吗?
不会。这项技能要求永远不要跳过 pre-commit 钩子,而应修复问题的根源。
它能直接提交到主分支吗?
不能。这项技能要求不要把未完成的工作直接提交到受保护的主分支。
详情
作者的原始描述
Stage and create a Conventional Commits message for the current change
repo: EverMind-AI/EverOS
热度
- GitHub 星标
- 14k
- 排名
- #11279
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …