AgentSkillsCN

git-committing

采用包含类型、范围和描述的常规提交信息格式。适用于提交代码、撰写提交信息,或为提交做准备时使用。触发条件:提交、git commit、提交信息、常规提交、feat、fix、refactor。

SKILL.md
--- frontmatter
name: git-committing
description: "Conventional commit message format with type, scope, and description. Use when committing code, writing commit messages, or preparing changes for commit. Triggers on: commit, git commit, commit message, conventional commit, feat, fix, refactor."

Git Committing

Commit messages follow Conventional Commits format.

Format

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

[optional body]

Types

TypeUse When
featAdding new functionality
fixCorrecting a bug
testAdding or updating tests (primary change)
refactorRestructuring without behaviour change
docsDocumentation only
choreMaintenance, dependencies

Workflow-Aware Type Selection

When a Workflow: field exists in PLAN.md, use the default type for that workflow unless the change clearly warrants a different type:

WorkflowDefault Type
TDD / One-shotfeat
Bug-fix / Hotfixfix
Refactoringrefactor
Chorechore

Scope

Derive from:

  • Repository hint in work item title: [payments] → scope payments
  • Primary domain area affected
  • Component or module name

Check recent commits for consistency: git log --oneline -20

Description Rules

  • Imperative mood: "add" not "added" or "adds"
  • Lowercase throughout
  • No trailing period
  • Under 50 characters (hard limit: 72)
  • Specific: "add balance validation to payment processor" not "update code"