AgentSkillsCN

commit

提交Git commit时,遵循Conventional Commits规范撰写提交信息。当用户提出提交更改、编写commit信息,或提及Git commit时,可选用此技能。

SKILL.md
--- frontmatter
name: commit
description: Git commit with messages following the Conventional Commits specification. Use this skill when the user asks to commit changes, write commit messages, or mentions git commits.

Commit

When writing commit messages, follow these rules:

Format

<type>(<scope>): <subject>

<body> <footer>

Types

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • chore: Changes to the build process or auxiliary tools

Guidelines

  1. Subject line should be no longer than 50 characters
  2. Use imperative mood ("add feature" not "added feature")
  3. Do not end the subject line with a period
  4. Separate subject from body with a blank line
  5. Use the body to explain what and why, not how

Examples

Good: feat(auth): add OAuth2 login support

Implement OAuth2 authentication flow to allow users to log in with their Google or GitHub accounts.

Closes #123

Bad: updated stuff

Validation

Before committing, run the validation script to check the format:

python scripts/validate_commit.py "your commit message"