Community写作与编辑github.com

mtai0524/claude-skills

使用 Conventional Commits 格式编写 Git 提交信息。适用于创建提交、用户请求提交信息,以及每次任务修改文件后(以提议提交信息)。

claude-skills 是什么?

该技能确保 Git 提交信息遵循 Conventional Commits 规范,格式为 `<type>(<optional scope>): <summary>`。支持的类型包括 `feat`、`fix`、`refactor`、`perf`、`test`、`docs`、`style`、`chore`、`build` 和 `ci`。摘要必须使用英语、祈使语气(如

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mtai0524/claude-skills/tree/HEAD/skills/commit-message

Installed? Explore more 写作与编辑 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

提交信息

格式:<type>(<optional scope>): <summary>

  • 类型:feat、fix、refactor、perf、test、docs、style、chore、build、ci。
  • 摘要:英语,祈使语气(如 "add",而非 "added"),小写,无句号,最多 72 个字符。
  • 正文(可选):摘要后空一行,解释原因,每行 72 个字符换行。
  • 破坏性变更:在类型后添加 ! 并添加 BREAKING CHANGE: 页脚。
  • 每个提交只包含一个逻辑变更。仅暂存属于该提交的文件;不要盲目使用 git add -A。

任务完成时

如果任务修改了文件,在回复末尾附上一个可复制的提议提交:

<type>(<scope>): <summary>

<原因,1-3 行,仅在摘要不够时添加>
  • 基于本次任务所触及文件的 git diff,而非工作树中已存在的无关变更。
  • 真正独立的变更(例如一个错误修复和一个 UI 重命名)应分别提议一次提交,并在每个提交下列出对应的文件。
  • 仅提议。除非用户要求,否则不要执行 git commit。

规则:

  • 不要添加 Co-Authored-By 或“Generated with”行。
  • 仅在用户要求时执行提交。除非用户明确要求,否则永远不要执行 git push。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

相关技能