通用编程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 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add windmill-labs/windmill --skill commit
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/windmill-labs/windmill/main/.agents/skills/commit/SKILL.md -o SKILL.md
可以这样问 AI
“请帮我提交我的更改,并使用符合我们项目风格的清晰提交信息。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能会让智能体检查状态和差异,按文件名逐个添加修改过的文件,并写出一行提交信息,其中包含类型和简短描述。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Git Commit Skill
Create a focused, single-line commit following conventional commit conventions.
Instructions
- Analyze changes: Run
git statusandgit diffto understand what was modified - Stage only modified files: Add files individually by name. NEVER use
git add -Aorgit add . - Write commit message: Follow the conventional commit format as a single line
Conventional Commit Format
<type>: <description>
Types
feat: New feature or capabilityfix: Bug fixrefactor: Code change that neither fixes a bug nor adds a featuredocs: Documentation only changesstyle: Formatting, missing semicolons, etc (no code change)test: Adding or correcting testschore: Maintenance tasks, dependency updates, etcperf: 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
- Run
git statusto see all changes - Run
git diffto understand the changes in detail - Run
git log --oneline -5to see recent commit style - Stage ONLY the modified/relevant files:
git add <file1> <file2> ... - Create the commit with conventional format:
git commit -m "<type>: <description>" - Run
git statusto 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
评论
- …