skill/skills/devops/changelog-generation/SKILL.md
自动生成 CHANGELOG,基于 git 提交历史和 pipeline 产物信息,遵循 Conventional Commits 和 Keep a Changelog 规范
npx skillsauth add echovic/boss-skill devops/changelog-generationInstall 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.
在部署成功完成后自动生成或追加 CHANGELOG,记录本次发布的所有变更。适用于:
Git 历史解析:
# 获取从上次 tag 到 HEAD 的所有提交
git log $(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)..HEAD --pretty=format:"%H|%s|%an|%ai"
type(scope): descriptionPipeline 产物读取:
.boss/<feature>/prd.md → 功能描述和用户价值.boss/<feature>/deploy-report.md → 部署环境和版本信息.boss/<feature>/tasks.md → 完成的任务列表版本号确定:
package.json 中的 versionYYYY.MM.DD按 Conventional Commits 规范分类:
| 类型 | CHANGELOG 分类 | 说明 |
|------|---------------|------|
| feat | Added | 新增功能 |
| fix | Fixed | 修复问题 |
| perf | Performance | 性能优化 |
| refactor | Changed | 重构(非功能变更) |
| docs | Documentation | 文档更新 |
| style | (不记录) | 代码格式 |
| test | (不记录) | 测试相关 |
| chore | (不记录) | 构建/工具变更 |
| BREAKING CHANGE | ⚠️ Breaking Changes | 破坏性变更(始终置顶) |
对于非 Conventional Commits 格式的提交:
## [版本号] - YYYY-MM-DD
### ⚠️ Breaking Changes
- 破坏性变更描述 ([commit-hash])
### Added
- 新功能描述(来自 PRD 的用户价值说明) ([commit-hash])
### Changed
- 变更描述 ([commit-hash])
### Fixed
- 修复描述 ([commit-hash])
### Performance
- 优化描述 ([commit-hash])
两种输出模式:
.boss/<feature>/changelog.mdCHANGELOG.md,将新版本内容追加到文件顶部(在 # Changelog 标题之后)追加逻辑:
读取现有 CHANGELOG.md
→ 找到第一个 ## [version] 行
→ 在其前面插入新版本内容
→ 写回文件
如果项目无 CHANGELOG.md,则创建包含标准头部的新文件:
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/).
## [版本号] - 日期
...
.boss/<feature>/changelog.md 必须生成CHANGELOG.md,同步更新testing
交互规范,定义加载状态、空状态、反馈机制、动效、无障碍等交互细节
content-media
设计变体模式,产出2-3个设计方案及 tradeoff 分析,供用户选择后确定最终方案
content-media
设计系统规范,包含颜色、字体、间距、圆角、阴影、动效等基础设计token
testing
UI组件规范,定义按钮、输入框、卡片等基础组件的变体、尺寸、状态