Chuyển đến nội dung
Skillpedia
Lập trình chung40k · #7121

conventional-commit

Skill này làm gì

Công cụ này giúp bạn viết thông điệp rõ ràng, chuẩn hóa để ghi lại các thay đổi trong mã. Nó theo một định dạng cụ thể để những lập trình viên khác dễ hiểu điều gì đã thay đổi.

Khi nào nên dùng

  • ✓Khi bạn thêm một tính năng mới vào mã.
  • ✓Khi bạn sửa một lỗi trong mã.
  • ✓Khi bạn cập nhật tài liệu của mã.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/conventional-commit/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/conventional-commit/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo thông điệp commit cho việc thêm một nút đăng nhập mới, với loại 'feat' và phạm vi 'ui'.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn điền vào một mẫu gồm loại thay đổi (như 'feat' cho tính năng hoặc 'fix' cho lỗi), một tóm tắt ngắn và tùy chọn thêm chi tiết. Sau đó, công cụ tạo thông điệp cuối cùng cho bạn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Instructions

	<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>

Workflow

Follow these steps:

  1. Run git status to review changed files.
  2. Run git diff or git diff --cached to inspect changes.
  3. Stage your changes with git add <file>.
  4. Construct your commit message using the following XML structure.
  5. After generating your commit message, Copilot will automatically run the following command in your integrated terminal (no confirmation needed):
git commit -m "type(scope): description"
  1. Just execute this prompt and Copilot will handle the commit for you in the terminal.

Commit Message Structure

<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

<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

<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

<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>
Câu hỏi thường gặp

“Commit” là gì?

Commit giống như một lần “lưu” cho dự án mã của bạn, ghi lại một tập hợp thay đổi.

Vì sao dùng định dạng chuẩn hóa?

Nó giúp lịch sử dự án có tổ chức và dễ hiểu với mọi người cùng làm việc trên đó.

“Imperative” nghĩa là gì?

Nghĩa là dùng động từ ở dạng mệnh lệnh, như 'add' (thêm) hoặc 'fix' (sửa), thay vì 'added' (đã thêm) hoặc 'fixed' (đã sửa).

Chi tiết

Mô tả gốc của tác giả

Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation.

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7121
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự