跳到正文
Skillpedia
通用编程14k · #11279

commit

它能做什么

这项技能指导你的智能体按标准格式用 Git 保存代码改动。适合希望提交历史清晰、一致的开发者。

适用场景

  • ✓当你完成一项改动,并想将其保存到 Git 中的时候。
  • ✓当你的提交信息需要遵循标准格式的时候。
  • ✓当你的改动涉及多个主题,需要拆分为独立提交的时候。

技能链接

https://github.com/EverMind-AI/EverOS/blob/main/.claude/skills/commit/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/EverMind-AI/EverOS/blob/main/.claude/skills/commit/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Run git status and git diff (and git diff --staged) to see what changed.

  2. Review recent history for style: git log --oneline -10.

  3. 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.

  4. 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>
    
  5. Never use --no-verify. If pre-commit hooks fail, fix the cause and re-commit.

  6. Do not commit secrets, generated artifacts, or work-in-progress directly to the protected main branch.

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".
  • scope is optional: fix(search): …. A ! before the colon (or a BREAKING 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能