AgentSkillsCN

commit

创建符合仓库现有风格的Git提交。

SKILL.md
--- frontmatter
name: commit
description: Create git commits matching the repo's existing style.

Commit Skill

Create well-formatted commits by detecting and following the repository's commit style.

Quick Reference

TypeWhen to use
featNew feature
fixBug fix
docsDocumentation only
refactorCode restructuring
testAdding/fixing tests
choreMaintenance tasks

Workflow

  1. Detect style: git log --oneline -20
  2. Review changes: git status and git diff --staged
  3. Stage files: git add <files>
  4. Commit using detected pattern (or conventional commits as fallback)

Pattern Detection

PatternExample
type: descfeat: add login
type(scope): descfix(api): handle null
type descadd login feature
CapitalizedAdd login feature

Examples

bash
git commit -m "feat: add user authentication"
git commit -m "fix(auth): resolve token expiry"