mcpField
C
conventional-commit

conventional-commit

github.com/ilteoood开发2547 次安装6 天前更新
代码仓库

关于 conventional-commit

用于生成 Conventional Commits 提交信息的提示模板 Skill。它引导 Copilot 检查变更、暂存文件、按规范组织信息并运行提交命令。

主要功能

  1. 01检查仓库状态与差异
  2. 02按 Conventional Commits 格式组织信息
  3. 03提供允许的类型和示例
  4. 04通过 Copilot 执行 git commit 命令

适用场景

  1. 01编写规范的提交信息
  2. 02提交前检查已修改文件
  3. 03使用 Copilot 提交已暂存的变更

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/ilteoood/harness --skill conventional-commit

安装后在 Claude Code 中输入/conventional-commit确认已加载。

详细介绍

说明
	<description>This file contains a prompt template for generating conventional commit messages. It provides instructions, examples, and formatting guidelines to help users write standardized, descriptive commit messages in accordance with the Conventional Commits specification.</description>
工作流

请按以下步骤操作:

  1. 运行 git status 查看已更改的文件。
  2. 运行 git diff 或 git diff --cached 检查更改内容。
  3. 使用 git add <file> 暂存你的更改。
  4. 使用以下 XML 结构构造你的提交信息。
  5. 生成提交信息后,Copilot 将自动在集成终端中运行以下命令(无需确认):
git commit -m "type(scope): description"
  1. 只需执行此提示词,Copilot 便会在终端中为你处理提交。
提交信息结构
<commit-message>
	<type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert</type>
	<scope>()</scope>
	<description>A short, imperative summary of the change</description>
	<body>(optional: more detailed explanation)</body>
	<footer>(optional: e.g. BREAKING CHANGE: details, or issue references)</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>Must be one of the allowed types. See <reference>https://www.conventionalcommits.org/en/v1.0.0/#specification</reference></type>
	<scope>Optional, but recommended for clarity.</scope>
	<description>Required. Use the imperative mood (e.g., "add", not "added").</description>
	<body>Optional. Use for additional context.</body>
	<footer>Use for breaking changes or issue references.</footer>
</validation>
最后一步
<final-step>
	<cmd>git commit -m "type(scope): description"</cmd>
	<note>Replace with your constructed message. Include body and footer if needed.</note>
</final-step>

评论

支持 Markdown