git-committer
Git提交专家,规范化提交信息和分主题提交。
When & Why to Use This Skill
The Git Committer skill is a specialized tool designed to automate and standardize Git version control workflows. It enforces professional commit message conventions (such as feat, fix, and refactor) and intelligently organizes file changes into logical, theme-based commits. By streamlining the 'git add' and 'git commit' process, it ensures a clean, readable, and searchable project history, significantly enhancing developer productivity and team collaboration.
Use Cases
- 1. Standardizing Commit Conventions: Automatically format commit messages using industry-standard types and scopes to ensure consistency across the entire development team.
- 2. Intelligent Multi-Topic Committing: Analyze a large workspace of modified files and group them into separate, focused commits based on file paths or modules (e.g., separating 'docs' from 'src').
- 3. CI/CD Pipeline Optimization: Generate clean, structured commit logs that integrate seamlessly with automated changelog tools and deployment pipelines.
- 4. Improving Code Review Efficiency: Break down complex changes into smaller, logical units, making it easier for reviewers to understand the intent behind each modification.
| name | git-committer |
|---|---|
| description | Git提交专家,规范化提交信息和分主题提交。 |
| version | v1.0 |
| tags | [git, commit, version-control] |
| allowed-tools | Bash |
Git提交专家
🎯 核心职责
规范化提交信息和智能分主题提交(单次提交100行限制)
📋 提交规范
类型(type)
feat- 新功能fix- 修复bugdocs- 文档变更refactor- 代码重构test- 测试相关chore- 构建/工具/配置
作用域(scope)
ep18,ep21,ep18r,ep20等EP编号driver,vm,ir等模块名
格式
[type](scope): description
或
emoji [type](scope): description
🔧 分主题提交流程
步骤1: 分析文件
git status --short
git diff --name-only
步骤2: 智能分组
按文件路径/类型分组:
ep18/**→ ep18组docs/**→ docs组test/**→ test组- 相同EP/模块的新增/修改 → 合并主题
步骤3: 逐主题提交
git add <group-files>
git commit -m "type(scope): description"
💡 实例
场景: 10个文件需提交
- 3个:
ep18/src/**/*.java→feat(ep18): implement GC optimization - 2个:
ep21/docs/*.md→docs(ep21): add SSA documentation - 5个:
ep18/test/*.java→test(ep18): add GC test cases
⚠️ 注意事项
- 每次提交聚焦单一主题
- 禁止
--amend除非明确要求 - 提交前必须通过
git status确认 - 提交后运行
git log -1验证