跳到正文
Skillpedia
通用编程18k · #10625

commit

它能做什么

这个技能用简短的单行提交信息,以约定式格式(例如 feat 或 fix)创建 git 提交。适合任何需要为 git 项目保存更改的人。

适用场景

  • ✓当你让智能体在 git 中保存或提交更改时。
  • ✓当你希望提交信息简短,并遵循 feat、fix 或 docs 的风格时。
  • ✓当你希望只把你修改过的文件加入提交时。

技能链接

https://github.com/windmill-labs/windmill/blob/main/.agents/skills/commit/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请帮我提交我的更改,并使用符合我们项目风格的清晰提交信息。”

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

工作原理

该技能会让智能体检查状态和差异,按文件名逐个添加修改过的文件,并写出一行提交信息,其中包含类型和简短描述。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Git Commit Skill

Create a focused, single-line commit following conventional commit conventions.

Instructions

  1. Analyze changes: Run git status and git diff to understand what was modified
  2. Stage only modified files: Add files individually by name. NEVER use git add -A or git add .
  3. Write commit message: Follow the conventional commit format as a single line

Conventional Commit Format

<type>: <description>

Types

  • feat: New feature or capability
  • fix: Bug fix
  • refactor: Code change that neither fixes a bug nor adds a feature
  • docs: Documentation only changes
  • style: Formatting, missing semicolons, etc (no code change)
  • test: Adding or correcting tests
  • chore: Maintenance tasks, dependency updates, etc
  • perf: Performance improvement

Rules

  • Message MUST be a single line (no multi-line messages)
  • Description should be lowercase, imperative mood ("add" not "added")
  • No period at the end
  • Keep under 72 characters total

Examples

feat: add token usage tracking for AI providers
fix: resolve null pointer in job executor
refactor: extract common validation logic
docs: update API endpoint documentation
chore: upgrade sqlx to 0.7

Execution Steps

  1. Run git status to see all changes
  2. Run git diff to understand the changes in detail
  3. Run git log --oneline -5 to see recent commit style
  4. Stage ONLY the modified/relevant files: git add <file1> <file2> ...
  5. Create the commit with conventional format:
    git commit -m "<type>: <description>"
    
  6. Run git status to verify the commit succeeded
常见问题

约定式格式是什么意思?

它是一个简短的前缀,例如 feat、fix 或 docs,后面跟着冒号和平实的描述。

为什么不一次添加所有文件?

该技能按文件名逐个添加,因此不会误把无关文件加进去。

提交信息有长度限制吗?

有。该技能要求提交信息在一行内,并且少于 72 个字符。

详情

作者的原始描述

Create a git commit with conventional commit format. MUST use anytime you want to commit changes.

repo: windmill-labs/windmill

热度

GitHub 星标
18k
排名
#10625
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能