AgentSkillsCN

commit

生成提交信息并创建提交记录。适用于撰写提交信息、提交更改,或对暂存的更改进行审核时使用。

SKILL.md
--- frontmatter
name: commit
description: Generates commit messages and creates commits. Use when writing commit messages, committing changes, or reviewing staged changes.

Commit Messages

Use Conventional Commits format.

Format

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

[optional body]

Types

  • feat: User-facing features or behavior changes (must change production code)
  • fix: Bug fixes (must change production code)
  • docs: Documentation only
  • style: Code style/formatting (no logic changes)
  • refactor: Code restructuring without behavior change
  • test: Adding or updating tests
  • chore: CI/CD, tooling, dependency bumps, configs (no production code)

Scopes

Optional. Use when it adds clarity. Examples: ui, api, state, auth.

Examples

text
feat(search): add infinite scroll to results
fix(album): correct image path validation
refactor(state): simplify album loading machine
chore: add husky pre-commit hooks
docs: update API documentation
test: add E2E tests for login flow

Instructions

  1. Run git diff --staged to see staged changes
  2. Analyze the changes and determine the appropriate type
  3. Write a concise description (under 72 characters)
  4. Add body only if the "why" isn't obvious from the description