首页/ AI 技能 / @skilllib/skill-2014279409782435841
Skill站外收录 @skilllib/skill-2014279409782435841

commit-messages

根据暂存区代码变更自动生成符合规范的提交信息,兼顾项目历史风格与行业通用约定,明确区分功能新增、缺陷修复、文档更新等类型,并在必要时添加作用域说明,确保提交记录清晰、一致且具备可追溯性。

0.0 (0) 149 次安装 原作者 编程导航
收录于 2026-01-22
开发运维 AI 技能

Skills.MD

# Commit Message Guide Generates conventional commit messages that are clear, consistent, and informative. ## Core Principles 1. **Follow Project Style** - Mimic existing `git log` patterns above all else. 2. **Imperative mood** - "add feature" not "added feature" 3. **Explain why** - Body explains motivation, not just what changed 4. **Concise subject** - 72 characters or less, no period 5. **Scope when helpful** - Include scope when it clarifies the change ## Commit Formats ### 1. Conventional Commits (Standard) The most common standard, widely used across the industry. ``` <type>(<scope>): <subject> ``` _Example:_ `feat(auth): add login page` ### 2. Path-Based / Scoped (Alternative) Common in monorepos or systems like Nixpkgs. ``` <path/to/component>: <subject> ``` _Example:_ `programs/waybar: update config` ## Detailed Reference Material - [reference.md](reference.md) - **Commit Types** table, Scope determination, **Breaking Changes**, and **Alternative Conventions**. - [examples.md](examples.md) - Good and bad examples for various scenarios. ## Analyzing Changes for Commit Type 1. **Look at files changed** - New files = likely `feat` - Test files only = `test` - Config/build files = `build` or `ci` - README/docs = `docs` 2. **Examine the diff** - Bug fix patterns = `fix` - New exports/functions = `feat` - Restructuring = `refactor` - Optimizations = `perf` 3. **Check `git log`** - Verify if the repo uses `type(scope):` or `path/to/file:` style. ## See Also - **Code review**: See [code-review](../code-review/) for reviewing commits - **Git workflows**: See [git-workflows](../git-workflows/) for branching strategies

评论 0

还没有评论,来抢沙发。