搜索

PythonReactSEOPDF
GitHub Skill

conventional-commits

Write commit messages using Conventional Commits 1.0.0. Use when creating, reviewing, or fixing commit messages so they follow <type>[optional scope]: <description> with optional body/footer and proper BREAKING CHANGE handling.

vana-com☆ 19 仓库 Stars2 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Conventional Commits

Reference: https://www.conventionalcommits.org/en/v1.0.0/

Use this format exactly:

<type>[optional scope][optional !]: <description>

[optional body]

[optional footer(s)]

Required rules

  • Start with a lowercase type, then : , then a short description.
  • Keep subject imperative and concise.
  • Use ! before : for breaking changes, for example feat(api)!: drop v1 endpoint.
  • Put BREAKING CHANGE: ... in a footer when details are needed.
  • Separate subject/body/footer blocks with a single blank line.

Type selection

  • fix: bug fix
  • feat: new feature
  • docs: documentation-only changes
  • refactor: code change without behavior change
  • perf: performance improvement
  • test: add/update tests
  • build: build system or dependency changes
  • ci: CI/CD changes
  • chore: maintenance work that is not user-facing
  • revert: revert a previous commit

Prefer fix or feat when either is accurate.

Scope guidance

  • Use scope when it disambiguates impact, for example fix(connect): ....
  • Keep scope a single noun-like token.
  • Skip scope when change is cross-cutting or obvious without it.

Subject line guidance

  • Use imperative verbs: add, fix, remove, refactor, rename.
  • Do not end subject with a period.
  • Describe outcome, not implementation detail.

Good:

  • fix(connect): preserve return path after login
  • feat(auth)!: require signed nonce for session creation

Bad:

  • fixed the login bug
  • changes
  • feat: stuff

Body guidance

Add a body only when needed. Use it for:

  • why this change exists
  • important tradeoffs
  • migration notes

Do not repeat obvious diffs from the subject.

Footer guidance

Use footers for machine/human metadata:

  • BREAKING CHANGE: <details>
  • Refs: #123
  • Reviewed-by: Name

BREAKING CHANGE must be uppercase when used as a footer token.

Breaking change workflow

For breaking changes, do one of:

  1. Add ! in header: feat(core)!: remove legacy grant format
  2. Add footer: BREAKING CHANGE: legacy grant format is removed
  3. Use both when you want extra clarity

Commit drafting workflow

  1. Inspect staged changes.
  2. Choose one primary intent (fix, feat, etc.).
  3. Decide whether scope helps.
  4. Draft subject in imperative mood.
  5. Add body/footer only if they add real context.
  6. Re-read for exact format compliance.

Output contract

When asked to produce a commit message:

  • Return the final commit message only.
  • If provided input is non-compliant, rewrite it to compliant form and return only the corrected version.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-03-11
索引更新时间
2026-03-11
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!