git-change-conventions
在此 repository 建立或命名 branch、pull request、commit 時使用。遵守既定 type prefix,並撰寫詳盡 commit message。
- License 许可
- MIT
- 最近更新
- 2026-09-19
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- git-change-conventions
- description
- 在此 repository 建立或命名 branch、pull request、commit 時使用。遵守既定 type prefix,並撰寫詳盡 commit message。
02 资源文件 1
- 参考文档agents/openai.yaml278 B
03 SKILL.md 正文
Git Change Conventions
task 包含建立 branch、更新 README、命名 pull request、撰寫 commit message,或提議 branch/PR/commit naming convention 時使用。
PR title format
Pull request title 必須精確採用:<TYPE>: <summary>。
允許的 <TYPE>:
FEATURE:new featureFIX:bug fixREFACTOR:無行為變更的 code refactorDOCS:documentation onlyTEST:tests onlySTYLE:僅 formatting,例如 linting 或 layout cleanupPERF:performance improvementCHORE:maintenance 或 miscellaneous housekeepingCI:continuous integration configuration 或 script
Branch format
Git branch 不可含 : 或 space,故採用:<type>/<summary-in-kebab-case>。
例:feat/add-weekly-fatigue-summary、fix/handle-empty-garmin-heart-rate-payload。
必要規則
- 除非有明確理由,branch 與 PR title 使用相同 logical type。
- branch 使用 short lowercase prefix(如
feat);PR title 使用完整允許的 TYPE(如FEATURE:)。 - prefix 後文字精確描述實際變更。
- 使用者未明確改變 convention 前,不得自創 top-level prefix。
- 跨多 category 時選擇最符合主要 user-facing outcome 的 prefix。
- branch summary 轉為 lowercase kebab-case。
- PR description 應包含 summary、why、what changed、重要 implementation/validation note。
Commit message 規則
- Commit message 必須詳盡,不可過短。
- subject line 清楚說明 intent 與 affected area。
- 非 trivial 變更優先採 multiline commit message。
- body 摘要 what changed、why 需要此變更、重要 implementation 或 validation note。
範例
- Branch:
feat/add-weekly-fatigue-summary - PR title:
FEATURE: add weekly fatigue summary to coach report - Branch:
fix/handle-empty-garmin-heart-rate-payload - PR title:
FIX: handle empty Garmin heart rate payload - Branch:
docs/add-shared-git-naming-conventions - PR title:
DOCS: add shared Git naming conventions for branch, PR, and commits
GitHub CLI environment
所有 gh command 必須在 local host environment 執行,使用其 credential store 與 GitHub configuration。不可使用 sandboxed gh credential 或 fallback;local-host gh authentication 失敗時停止並回報 authentication blocker。
使用 GitHub CLI 建立 PR
使用 gh 建立 PR 時套用上述 convention:
gh pr create \
--title "TYPE: summary" \
--body "## Summary
<這個 PR 做什麼>
## Why
<為何需要此變更>
## Changes
- <file/area>: <description>
## Validation
- <執行的 test、manual check 或 screenshot>" \
--base main
- 不得使用
--draft;每個 PR 都必須可立即 review。 - team 要求 reviewer 時加入
--reviewer <handle>。 - 有 project label 時加入
--label <label>。 - PR title TYPE 必須用允許名稱,不可直接將 branch prefix 大寫:
feat→FEATURE、fix→FIX、refactor→REFACTOR、docs→DOCS、test→TEST、style→STYLE、perf→PERF、chore→CHORE、ci→CI。
PR review follow-up
完成要求的 PR review change 後,commit 並 push fix,再使用 PR 的 Add a comment action 發布 @codex review,要求 Codex reviewer 再次審查。
Output expectation
- 被要求建立名稱時,提供精確符合 convention 的 branch 與 PR title。
- 被要求 commit 時,依變更範圍撰寫詳盡 commit message,不用單行 shorthand。
04 同仓库更多 Skills
readme-pm-review
僅在使用者明確要求以 product-manager 角度審查 repository README 時使用。先只讀 README,不推測未記錄功能,提供可讀性回饋、改寫建議與產品優先順序建議。
improve-codebase-architecture
掃描 codebase 的 deepening 機會,以視覺化 HTML report 呈現,並針對使用者選擇的項目進行 grilling。
handoff
將目前對話濃縮為可供下一位 agent 接手的交接文件。
grilling
以密集提問檢驗使用者的計畫、決策或想法。使用者想壓力測試思考或使用任何「grill」觸發語時使用。
grill-with-docs
以密集訪談釐清並磨練計畫或設計,並同步建立 ADR 與 glossary 文件。
grill-me
以密集訪談釐清並磨練計畫或設計。