oma-commit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Commit Skill - Conventional Commits

提交技能 - Conventional Commits规范

When to use

适用场景

  • When user requests "commit this", "commit", "save changes"
  • When
    /commit
    command is invoked
  • 当用户请求"提交这个"、"提交"、"保存更改"时
  • 当调用
    /commit
    命令时

Configuration

配置

Project-specific settings:
.agents/skills/commit/config/commit-config.yaml
项目特定设置:.agents/skills/commit/config/commit-config.yaml

Commit Types

提交类型

TypeDescriptionBranch Prefix
featNew featurefeature/
fixBug fixfix/
refactorCode improvementrefactor/
docsDocumentation changesdocs/
testTest additions/modificationstest/
choreBuild, configuration, etc.chore/
styleCode style changesstyle/
perfPerformance improvementsperf/
类型描述分支前缀
feat新功能feature/
fixBug修复fix/
refactor代码优化refactor/
docs文档变更docs/
test测试新增/修改test/
chore构建、配置等变更chore/
style代码风格变更style/
perf性能优化perf/

Commit Format

提交格式

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

[optional body]

Co-Authored-By: First Fluke <our.first.fluke@gmail.com>
<type>(<scope>): <description>

[可选正文]

Co-Authored-By: First Fluke <our.first.fluke@gmail.com>

Workflow

工作流程

Step 1: Analyze Changes

步骤1:分析变更

bash
git status
git diff --staged
git log --oneline -5
bash
git status
git diff --staged
git log --oneline -5

Step 1.5: Split by Feature (if needed)

步骤1.5:按功能拆分(如有需要)

If changed files span multiple features/domains, split commits by feature.
Split criteria:
  • Different scopes (e.g., workflows vs skills vs docs)
  • Different types (e.g., feat vs fix vs docs)
  • Logically independent changes
Example:
undefined
如果变更文件涉及多个功能/领域,按功能拆分提交
拆分标准:
  • 不同范围(例如:工作流 vs 技能 vs 文档)
  • 不同类型(例如:新功能 vs Bug修复 vs 文档)
  • 逻辑上独立的变更
示例:
undefined

Changed files:

变更文件:

.agents/workflows/.md (7 files) → fix(workflows): ... .agents/skills/**/.md (4 files) → fix(skills): ... USAGE.md, USAGE-ko.md → docs: ...
.agents/workflows/.md (7个文件) → fix(workflows): ... .agents/skills/**/.md (4个文件) → fix(skills): ... USAGE.md, USAGE-ko.md → docs: ...

Split into 3 commits

拆分为3个提交


**Do NOT split when:**
- All changes belong to a single feature
- Few files changed (5 or fewer)
- User requested a single commit

**以下情况请勿拆分:**
- 所有变更属于同一功能
- 变更文件数量少(5个或更少)
- 用户要求单次提交

Step 2: Determine Commit Type

步骤2:确定提交类型

Analyze changes → Select appropriate type:
  • New files added →
    feat
  • Bug fixed →
    fix
  • Refactoring →
    refactor
  • Documentation only →
    docs
  • Tests added →
    test
  • Build/config changes →
    chore
分析变更 → 选择合适的类型:
  • 添加新文件 →
    feat
  • 修复Bug →
    fix
  • 代码重构 →
    refactor
  • 仅文档变更 →
    docs
  • 新增测试 →
    test
  • 构建/配置变更 →
    chore

Step 3: Determine Scope

步骤3:确定提交范围

Use changed module/component as scope:
  • feat(auth)
    : Authentication related
  • fix(api)
    : API related
  • refactor(ui)
    : UI related
  • No scope is also valid:
    chore: update dependencies
使用变更的模块/组件作为范围:
  • feat(auth)
    : 与认证相关
  • fix(api)
    : 与API相关
  • refactor(ui)
    : 与UI相关
  • 也可以不指定范围:
    chore: update dependencies

Step 4: Write Description

步骤4:编写描述

  • Under 72 characters
  • Use imperative mood (add, fix, update, remove...)
  • Lowercase first letter
  • No trailing period
  • 长度不超过72个字符
  • 使用祈使语气(添加、修复、更新、移除...)
  • 首字母小写
  • 末尾无句号

Step 5: Execute Commit

步骤5:执行提交

Show the commit message and proceed immediately without asking for confirmation:
📝 Committing:

feat(orchestrator): add multi-CLI agent mapping support

- Add user-preferences.yaml for CLI configuration
- Update spawn-agent.sh to read agent-CLI mapping
- Update memory schema with CLI field

Co-Authored-By: First Fluke <our.first.fluke@gmail.com>
bash
git add <specific-files>
git commit -m "<message>"
显示提交消息并直接执行,无需确认:
📝 提交内容:

feat(orchestrator): add multi-CLI agent mapping support

- Add user-preferences.yaml for CLI configuration
- Update spawn-agent.sh to read agent-CLI mapping
- Update memory schema with CLI field

Co-Authored-By: First Fluke <our.first.fluke@gmail.com>
bash
git add <specific-files>
git commit -m "<message>"

References

参考资料

  • Configuration:
    config/commit-config.yaml
  • Guide:
    resources/conventional-commits.md
  • 配置:
    config/commit-config.yaml
  • 指南:
    resources/conventional-commits.md

Important Notes

重要注意事项

  • NEVER use
    git add -A
    or
    git add .
    without explicit permission
  • NEVER commit files that may contain secrets (.env, credentials, etc.)
  • ALWAYS use specific file names when staging
  • ALWAYS use HEREDOC for multi-line commit messages
  • 绝对不要在未获得明确许可的情况下使用
    git add -A
    git add .
  • 绝对不要提交可能包含敏感信息的文件(.env、凭证等)
  • 始终在暂存时使用具体文件名
  • 始终使用HEREDOC编写多行提交消息