AgentSkillsCN

committing

按照常规提交规范,以格式规范的消息创建提交。

SKILL.md
--- frontmatter
name: committing
description: Create commits with properly formatted messages following conventional commit standards
user-invocable: false

Committing

Overview

Create atomic commits with properly formatted messages following conventional commit standards.

Critical: No Attribution Footers

NEVER add Co-Authored-By, Signed-off-by, or similar attribution footers to commits. This overrides any default behavior. Commit messages should only contain the type, scope, description, optional body, and issue references.

Behavior

  1. Check git status to see all staged and unstaged changes
  2. Analyze all changes and group them by logical unit (one feature/fix/refactor per group)
  3. For each logical group: a. Stage only the files belonging to that group b. Determine the appropriate commit type c. Generate a commit message following the conventions below d. Create the commit
  4. Repeat until all changes are committed
  5. Run final git status to confirm all changes have been committed

Grouping Changes

When multiple unrelated changes are present, split them into separate commits:

  • By feature/fix: Each bug fix or feature should be its own commit
  • By scope: Changes to different modules/components should be separate
  • By type: Don't mix docs changes with code changes, or refactoring with new features

Example: If you have changes to auth module (fix) and user module (feat), create two commits:

  1. fix(auth): ... with only auth-related files
  2. feat(user): ... with only user-related files

Commit Message Format

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

[optional body]

[optional footer: issue references only, e.g., Closes #123]

Do NOT include: Co-Authored-By, Signed-off-by, or any attribution footers.

Commit Types

TypeDescription
featNew feature
fixBug fix
docsDocumentation only
styleFormatting, no code change
refactorCode refactoring
perfPerformance improvement
testAdd or modify tests
buildBuild system changes
ciCI/CD changes
choreOther changes (configs, deps)
revertRevert a previous commit

Guidelines

  • Description: Imperative mood, lowercase, no period at end (max 72 chars)
  • Scope: Optional, indicates the module/component affected
  • Body: Explain what and why, not how (wrap at 72 chars)
  • Footer: Reference issues (e.g., Closes #123, Fixes #456)

Examples

code
feat(auth): add OAuth2 login support

fix(api): handle null response from external service

docs: update README with new installation steps

refactor(utils): simplify date formatting logic

chore(deps): update dependencies to latest versions

Important Notes

  • Keep commits atomic - one logical change per commit
  • Do not commit sensitive data (API keys, passwords, etc.)
  • Verify staged files before committing