AgentSkillsCN

commit-message

按照常规提交规范生成提交信息。在准备提交暂存变更时使用此方法。触发条件包括“提交信息”、“commit message”、“我该提交什么?”、“变更提交”。

SKILL.md
--- frontmatter
name: commit-message
description: Generate commit messages following conventional commits. Use this when preparing to commit staged changes. Triggers on "コミットメッセージ", "commit message", "what should I commit", "変更をコミット".
model: haiku
context: fork
agent: general-purpose
allowed-tools: Bash(git:*)

Commit Message Skill

Generate a commit message based on staged changes. Do not commit directly, just generate the message.

Format

code
<type>: <subject>

Types

TypeUse When
featNew feature
fixBug fix
docsDocumentation changes
refactorCode refactoring (no feature or bug fix)
ciCI/CD related changes
testTest code additions or modifications
choreOther changes (build process, tools, etc.)

Subject Rules

  • Maximum 50 characters
  • Use imperative mood ("add" not "added" or "adds")
  • No period at the end
  • English only

Process

  1. Run git diff --cached --stat to see staged files
  2. Run git diff --cached to see actual changes
  3. Analyze the changes
  4. Generate appropriate commit message

Examples

  • feat: add user authentication
  • fix: resolve null pointer in login flow
  • docs: update API documentation
  • refactor: extract validation logic to separate module
  • chore: update dependencies