conventional-commit

conventional-commit

熱門

使用結構化 XML 格式產生 Conventional Commit 訊息的提示與工作流程。引導使用者依照 Conventional Commits 規範建立標準化、描述性的提交訊息,包含指示、範例與驗證。

3.6萬星標
4464分支
更新於 2026/7/2
SKILL.md
readonlyread-only
name
conventional-commit
description

使用結構化 XML 格式產生 Conventional Commit 訊息的提示與工作流程。引導使用者依照 Conventional Commits 規範建立標準化、描述性的提交訊息,包含指示、範例與驗證。

指示

	<description>此檔案包含產生 Conventional Commit 訊息的提示模板。提供指示、範例與格式指南,協助使用者依照 Conventional Commits 規範撰寫標準化、描述性的提交訊息。</description>

工作流程

請遵循以下步驟:

  1. 執行 git status 檢視已變更的檔案。
  2. 執行 git diffgit 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>簡短、祈使句的變更摘要</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>