AgentSkillsCN

commit

根据暂存的变更自动生成 Conventional Commit 提交信息。适用于提交代码、生成提交信息,或当用户请求提交时使用。

SKILL.md
--- frontmatter
name: commit
description: "Generate Conventional Commit messages from staged changes. Use when committing code, generating commit messages, or when the user asks for a commit."
event: pre-commit
auto_trigger: true
version: "2.0.0"
last_updated: "2026-01-26"

# Inputs/Outputs
inputs:
  - staged_files
  - diff_summary
  - file_paths
output: commit_message
output_format: "type(scope): description"

# Auto-Trigger Rules
auto_invoke:
  events:
    - "git-add"
    - "pre-commit"
  conditions:
    - "files staged for commit"

# Validation
validation_rules:
  - "type must be valid (feat, fix, docs, etc.)"
  - "scope must match path pattern"
  - "description must be lowercase"
  - "max 72 characters"

# Chaining
chain_after: []
chain_before: [pull-request]

# Agent Association
called_by: ["@Scribe", "@Backend", "@Frontend"]
mcp_tools:
  - mcp_gitkraken_git_add_or_commit

Commit Message Skill

Purpose: Generate consistent Conventional Commit messages from staged changes.

Trigger

When: User stages files and requests commit Context Needed: git diff --staged, file paths MCP Tools: mcp_gitkraken_git_add_or_commit

Format

code
type(scope): description

Types

ChangeType
New featurefeat
Bug fixfix
Documentationdocs
Refactorrefactor
Teststest
Build/depschore

Scope Detection

PathScope
apps/api/**api
apps/web/**web
prisma/**db
docs/**docs
libs/ui/**ui

Examples

code
feat(api): add payment webhook endpoint
fix(web): resolve signal update in product list
docs(api): update authentication API documentation
chore(db): add index for merchant lookup

Reference