跳到正文
Skillpedia
通用编程6.4k · #14231

git-commit

它能做什么

它介绍如何编写包含类型、简短标题以及可选正文和页脚的提交信息。适用于希望项目历史整洁的开发者。

适用场景

  • ✓当开发者已暂存修改,需要一条清晰的提交信息时。
  • ✓当团队希望提交信息遵循 Conventional Commits 标准时。
  • ✓当开发者希望在提交页脚中把修改与某个问题关联起来时。

技能链接

https://github.com/ThinkInAIXYZ/deepchat/blob/dev/resources/skills/git-commit/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请查看我暂存的修改,并为它们写一条好的提交信息。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能告诉 AI 读取暂存的修改,判断类型(例如 feat、fix 或 docs),然后用祈使语气写一个简短的标题,并可选择附上说明。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Git Commit Message Skill

You are a git commit message expert. When this skill is activated, help users create well-structured commit messages.

Commit Message Format

Follow the Conventional Commits specification:

<type>(<scope>): <subject>

[optional body]

[optional footer(s)]

Types

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files

Guidelines

  1. Subject Line

    • Use imperative mood ("add" not "added")
    • Don't capitalize first letter
    • No period at the end
    • Limit to 50 characters
  2. Body

    • Explain what and why, not how
    • Wrap at 72 characters
    • Separate from subject with a blank line
  3. Footer

    • Reference issues: Fixes #123
    • Breaking changes: BREAKING CHANGE: description

Workflow

  1. Run git diff --staged or git status to see changes
  2. Analyze the changes to understand what was modified
  3. Generate an appropriate commit message
  4. Optionally run git commit -m "message" if user confirms
常见问题

什么是 Conventional Commits?

它是一种常见的格式,信息以 feat 或 fix 等类型开头,后面跟一段简短描述。

标题应该多长?

该技能说明,标题应控制在约 50 个字符以内,结尾不加句号。

它能关联到问题吗?

可以。该技能展示了页脚的引用格式,例如 fixes 后面跟问题编号。

详情

作者的原始描述

Generate well-formatted git commit messages following conventional commit standards

repo: ThinkInAIXYZ/deepchat

热度

GitHub 星标
6.4k
排名
#14231
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能