AgentSkillsCN

commit-message

采用语义化版本控制前缀的Git提交消息规范。在创建提交、审查提交消息,或准备发布时使用此功能。通过在提交消息中添加类型前缀(feat/fix/refactor/等),确保提交格式的一致性,从而实现自动化变更日志的生成。

SKILL.md
--- frontmatter
name: commit-message
description: Git commit message conventions with Semantic Versioning prefix. Use when creating commits, reviewing commit messages, or preparing releases. Ensures consistent commit format with type prefix (feat/fix/refactor/etc.) for automated changelog generation.

Commit Message

Format

code
<type>(<scope>): <emoji> <subject>

<body>

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Types (Semantic Versioning)

TypeVersion BumpDescription
featMINORNew feature for the user
fixPATCHBug fix
refactorPATCHCode change (no feature/fix)
perfPATCHPerformance improvement
style-Formatting, whitespace
docs-Documentation only
test-Adding/updating tests
build-Build system, dependencies
ci-CI configuration
chore-Maintenance tasks

Breaking Changes: Append ! after type → feat!: triggers MAJOR bump

Emoji Reference

EmojiUsage
New feature (feat)
🐛Bug fix (fix)
♻️Refactoring (refactor)
Performance (perf)
📝Documentation (docs)
🔧Configuration (chore)
⬆️Dependency upgrade
🏹Release

Examples

bash
# Feature
feat(auth): ✨ add OAuth2 login support

# Bug fix
fix(api): 🐛 resolve null pointer in user service

# Refactoring
refactor(components): ♻️ unify BaseTag root element

# Release
chore(release): 🏹 4.0.6

# Breaking change
feat!(api): ✨ redesign authentication flow

BREAKING CHANGE: Auth tokens now use JWT format

Rules

  1. Use imperative mood: "add feature" not "added feature"
  2. Keep subject under 72 characters
  3. Scope is optional but recommended for clarity
  4. Body explains "why" not "what"
  5. Reference issues: Fixes #123 or Closes #456
  6. Always include Co-Authored-By for AI-assisted commits