AgentSkillsCN

Commit

提交

SKILL.md

Commit Message Skill

Generate consistent commit messages following Conventional Commits.

Trigger

Activate when user says: "commit", "write commit message", "prepare commit"

Format

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

[optional body]

[optional footer]

Types

TypeUse for
featNew features
fixBug fixes
docsDocumentation only
styleFormatting (no code change)
refactorCode restructuring
perfPerformance improvements
testAdding/fixing tests
buildBuild system changes
ciCI configuration
choreMaintenance tasks

Rules

  • Imperative mood: "add" not "added"
  • No capital after colon
  • No trailing period
  • Max 72 characters for subject
  • Wrap body at 72 characters

Scope

Use area affected: auth, api, db, ui, or feature name. Omit for broad changes.

Footer

  • Reference issues: Fixes #123 or Refs #456
  • Breaking changes: BREAKING CHANGE: description

Process

  1. Run git status and git diff --staged
  2. Analyze changes
  3. Propose commit message
  4. Explain type/scope choice if unclear
  5. Ask for confirmation before committing