skills/generate-changelog-zh-tw/SKILL.md
依據 Git 提交紀錄自動產生 CHANGELOG 區段(繁體中文),並支援 MinVer 版本號推進規格。
npx skillsauth add CloudyWing/ai-dotfiles generate-changelog-zh-twInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
/generate-changelog-zh-tw [版本號]
若未傳入版本號,依 MinVer 規格自動推算下一個版本號(見步驟 1)。
已傳入版本號:直接使用,確認格式符合 MAJOR.MINOR.PATCH(可含預發布後綴如 -preview.1)。
未傳入版本號,依序嘗試以下來源:
git branch --show-current 取得當前分支名稱。
release/vX.Y.Z 或 hotfix/vX.Y.Z 格式,擷取版本號(去掉 v 前綴),直接使用。git tag --sort=-v:refname | head -1 取得最新標籤,讀取自上次標籤以來的 commit 類型,依下列規則推算:
BREAKING CHANGE → 升 MAJOR。feat: 但無 Breaking Change → 升 MINOR。fix:、docs:、chore: 等 → 升 PATCH。0.1.0)。執行:
git log [上次標籤]..HEAD --pretty=format:"%H %s" --no-merges
若無標籤,改用:
git log --pretty=format:"%H %s" --no-merges
依 Conventional Commits 類型分類,過濾掉非使用者可見的變更:
| 類型 | CHANGELOG 分類 | 顯示 |
| --- | --- | --- |
| feat | New Features | ✅ |
| fix | Bug Fixes | ✅ |
| perf | Improvements | ✅ |
| docs | 文件 | 僅在 commit 標題明確有使用者影響時顯示 |
| refactor | - | ❌ 略過 |
| style | - | ❌ 略過 |
| chore | - | ❌ 略過 |
| ci | - | ❌ 略過 |
| test | - | ❌ 略過 |
輸出格式:
## v1.2.0 (2026-04-04)
### New Features
- 新增使用者頭像上傳功能,支援 JPG 與 PNG 格式。
- 新增多語言切換 API 端點 `POST /api/locale`。
### Bug Fixes
- 修正訂單金額在特定幣別下計算錯誤的問題。
### Improvements
- 最佳化商品列表查詢,減少 N+1 查詢。
### BREAKING CHANGE
- 移除 `IUserRepository.GetById(int)` 方法,請改用 `GetByIdAsync(Guid)`。
規則:
v{MAJOR}.{MINOR}.{PATCH},日期格式為 (YYYY-MM-DD),固定使用今日日期。已存在 CHANGELOG.md:將新區段插入至第一個 ## v 標題之前(Append 模式,追加於標頭之後)。
不存在 CHANGELOG.md:建立新檔,結構如下:
# CHANGELOG
[新產生的區段]
輸出產生的版本號與條目數量摘要,告知使用者寫入位置。
tools
PowerShell 腳本撰寫規範:嚴格模式、錯誤處理、參數宣告、Verb-Noun 命名與 5.1 相容語法邊界。當撰寫或修改 `*.ps1` / `*.psm1` 腳本時自動套用。
tools
產生或補齊 .gitattributes,統一行尾處理、二進位識別與 lock files 標記,保留既有自訂偏好。
development
產生或補齊前端 Lint 設定(Prettier + ESLint Flat Config),統一格式化與程式碼品質規則,保留既有自訂偏好。
testing
依據事實校閱報告修改技術文件:以事實層為不可違反的約束,由改檔者負責表達層的措辭與行文連貫。Use when the user asks to apply fact-check results to a document, or to edit a document based on a previously produced fact-check-report.md.