commit-message
Generate a conventional commit message from staged git changes. Use this skill when the user wants to create a commit message for their staged changes.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Commit Message Generator
This skill generates conventional commit messages from staged git changes.
Usage
When invoked, analyze the staged changes and generate an appropriate commit message following the conventional commits specification.
Process
- First, check if there are staged changes:
git diff --cached
-
If there are staged changes, analyze them and generate a commit message.
-
The commit message should follow the conventional commits format:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Commit Types
-
feat: A new feature -
fix: A bug fix -
docs: Documentation only changes -
style: Changes that do not affect the meaning of the code (white-space, formatting) -
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 -
chore: Changes to the build process or auxiliary tools and libraries -
ci: Changes to CI configuration files and scripts -
revert: Reverts a previous commit
Guidelines
- Keep the subject line under 72 characters
- Use the imperative mood in the subject line ("add" not "added")
- Do not end the subject line with a period
- Separate subject from body with a blank line
- Use the body to explain what and why vs. how
- The scope is optional but helpful for larger projects
Output
Output ONLY the commit message - no explanations, no markdown formatting, no code blocks, no quotes around the message. The message should be ready to use directly with git commit -m.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!