AgentSkillsCN

commit

按照项目的常规提交格式创建 Git 提交。

SKILL.md
--- frontmatter
name: commit
description: Create a git commit following the project's conventional commit format

Commit Skill

Create a git commit following the project's commit conventions.

Instructions

  1. Check git status to see what files have changed
  2. Review the changes using git diff --staged (or git diff for unstaged changes)
  3. Generate a commit message following this format:
code
<type>(<scope>): <message title>

- Bullet points summarizing what was updated

Commit Types

TypeDescription
featNew feature
fixBug fix
choreMaintenance (e.g., tooling, deps)
docsDocumentation changes
refactorCode restructure (no behavior change)
testAdding or refactoring tests
styleCode formatting (no logic change)
perfPerformance improvements

Rules

  • Title is lowercase, no period at the end
  • Title should be a clear summary, max 50 characters
  • Use the body to explain why, not just what
  • Bullet points should be concise and high-level

Critical

  • DO NOT add "Generated with Claude Code" or any AI attribution
  • DO NOT add "Co-Authored-By: Claude" lines
  • DO NOT add emojis or promotional footers
  • Only commit files that were changed during this session

Execution

  1. Stage the appropriate files (prefer specific files over git add -A)
  2. Create the commit with the generated message
  3. Show the result with git log -1