From atomic-conventional-commits
主動式技能 — 每完成一個獨立的邏輯變更(建立檔案、實作功能、修復 bug、重構、更新文件、新增測試),立即 stage 相關檔案並建立原子化 commit。不要累積變更或等到最後才 commit。也適用於決定如何拆分變更為多個 commit,或當 commit 過大、混合了不相關變更時。
How this skill is triggered — by the user, by Claude, or both
Slash command
/atomic-conventional-commits:atomic-conventional-commitsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**每完成一個獨立的邏輯變更,立即 commit。不要累積變更。**
每完成一個獨立的邏輯變更,立即 commit。不要累積變更。
工作節奏應為:修改 → commit → 修改 → commit,而非:修改 → 修改 → 修改 → 最後才 commit。
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
type(必填):
| type | 用途 | SemVer |
|---|---|---|
feat | 新功能 | MINOR |
fix | 修復錯誤 | PATCH |
refactor | 重構(不改行為) | — |
docs | 文件 | — |
style | 格式(不影響邏輯) | — |
test | 測試 | — |
perf | 效能改善 | — |
build | 建置系統 / 依賴 | — |
ci | CI 設定 | — |
chore | 雜項維護 | — |
破壞性變更: 在 type 後加驚嘆號(如 feat!:)或在 footer 加上 BREAKING CHANGE: 描述,對應 SemVer MAJOR。
scope(選填): 影響範圍,如 feat(auth):、fix(parser):
description(必填): 祈使句、小寫開頭、不加句號
一個 commit = 一個邏輯變更,不可再分割。
問自己:「這個 commit 能不能用一句話描述?」如果需要用「和」連接兩件事,就該拆。
| 情境 | 拆法 |
|---|---|
| 新功能 + 修復無關 bug | 分成 feat + fix 兩個 commit |
| 重構 + 行為變更 | 先 refactor,再 feat 或 fix |
| 格式調整 + 邏輯修改 | 先 style,再對應 type |
| 多個獨立 bug 修復 | 每個 bug 一個 fix commit |
| 新功能 + 對應測試 | 同一個 feat commit(測試跟隨功能) |
feat(cart): add coupon code input field
fix(email): correct broken template links
refactor(scheduler): extract email queue logic
# ❌ 混合多個不相關變更
feat: add coupons, fix email links, refactor scheduler
# ❌ 過度細碎,失去脈絡
style: add space after if
style: add space after for
style: add space after while
git add <specific-files> 只加入與當前邏輯變更相關的檔案git add -A 或 git add .,避免混入無關變更git add -p 互動式暫存提交前確認:
type(scope): description 格式?完整 Conventional Commits 規格:見 references/conventional-commits-spec.md
npx claudepluginhub abjutus/my-claude-plugins --plugin atomic-conventional-commitsEnforces git commit best practices with conventional commits format, atomic principles, type prefixes, and semantic versioning for clear, meaningful history. Use when committing code.
Guides atomic git commits: analyzes diffs, detects mixed concerns, groups files, stages selectively, verifies tests/builds, uses conventional messages, adds issues.
Generates concise conventional git commit messages prioritizing 'why' over 'what', with proper types, scopes, imperative mood, and atomic structure. Use when writing commits or learning best practices.