SKILL.md
readonly只读
name
conventional-commit
description
使用结构化XML格式生成约定式提交消息的提示词和工作流程。引导用户按照约定式提交规范创建标准化、描述性的提交消息,包含说明、示例和验证。
说明
<description>该文件包含用于生成约定式提交消息的提示词模板。它提供了说明、示例和格式指南,帮助用户按照约定式提交规范编写标准化、描述性的提交消息。</description>
工作流程
请遵循以下步骤:
- 运行
git status查看已更改的文件。 - 运行
git diff或git diff --cached检查更改内容。 - 使用
git add <file>暂存更改。 - 使用以下XML结构构建提交消息。
- 生成提交消息后,Copilot将自动在集成终端中运行以下命令(无需确认):
git commit -m "type(scope): description"
- 只需执行此提示,Copilot将在终端中为您处理提交。
提交消息结构
<commit-message>
<type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert</type>
<scope>()</scope>
<description>简短、祈使语气的更改摘要</description>
<body>(可选:更详细的说明)</body>
<footer>(可选:例如 BREAKING CHANGE: 详情,或问题引用)</footer>
</commit-message>
示例
<examples>
<example>feat(parser): add ability to parse arrays</example>
<example>fix(ui): correct button alignment</example>
<example>docs: update README with usage instructions</example>
<example>refactor: improve performance of data processing</example>
<example>chore: update dependencies</example>
<example>feat!: send email on registration (BREAKING CHANGE: email service required)</example>
</examples>
验证
<validation>
<type>必须是允许的类型之一。参见 <reference>https://www.conventionalcommits.org/en/v1.0.0/#specification</reference></type>
<scope>可选,但建议使用以保持清晰。</scope>
<description>必需。使用祈使语气(例如 "add",而不是 "added")。</description>
<body>可选。用于提供额外上下文。</body>
<footer>用于破坏性变更或问题引用。</footer>
</validation>
最后一步
<final-step>
<cmd>git commit -m "type(scope): description"</cmd>
<note>替换为您构建的消息。如有需要,可包含 body 和 footer。</note>
</final-step>






