AgentSkillsCN

Git Commit Guidelines

当用户提出“撰写提交信息”“格式化提交信息”“提交信息风格”等需求,或需要关于常规提交信息格式的指导时,应使用此技能。

SKILL.md
--- frontmatter
name: Git Commit Guidelines
description: This skill should be used when the user asks to "write a commit message", "format commit", "commit message style", or needs guidance on conventional commit format.

Git Commit Guidelines

This skill provides guidance for writing conventional commit messages.

Commit Message Format

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

<body>

<footer>

Types

TypeDescription
featNew feature
fixBug fix
docsDocumentation only
styleFormatting, no code change
refactorCode change, no feature/fix
testAdding tests
choreMaintenance tasks

Rules

  1. Subject line max 50 characters
  2. Use imperative mood ("Add feature" not "Added feature")
  3. No period at end of subject
  4. Blank line between subject and body
  5. Body explains what and why, not how

Examples

Good:

code
feat(auth): add OAuth2 login support

Implement Google and GitHub OAuth providers.
Closes #123

Bad:

code
Updated the login page to support OAuth

Quick Reference

  • feat: New functionality for users
  • fix: Bug fix for users
  • docs: Documentation changes
  • refactor: Code restructuring
  • test: Test additions/changes
  • chore: Build, CI, dependencies