关于 changelog-maintenance
用于编写和维护结构化项目变更日志与发行说明的技能,帮助开发团队记录重要变更、破坏性变更、修复内容和升级指引,并遵循 Keep a Changelog 与 Semantic Versioning 实践。
主要功能
- 01结构化变更日志模板
- 02起草发行说明
- 03跟踪破坏性变更
- 04迁移与升级指引
- 05Semantic Versioning 参考
适用场景
- 01记录版本历史
- 02准备发行说明
- 03记录安全补丁和缺陷修复
- 04说明 API 迁移与弃用事项
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ aj-geddes/ useful-ai-prompts --skill changelog-maintenance安装后在 Claude Code 中输入/changelog-maintenance确认已加载。
附带文件scripts/validate-api.shtemplates/api-scaffold.yaml
详细介绍
更新日志维护
概述
创建并维护结构化更新日志,记录项目的所有重要变更,并遵循 Keep a Changelog 和语义化版本等行业最佳实践。
使用场景
- 记录版本历史
- 生成发行说明
- 跟踪破坏性变更
- 创建迁移指南
- 发布弃用通知
- 记录安全补丁
- 发布功能公告
- 跟踪错误修复
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/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- New feature or capability that has been added
- Can be multiple items
### Changed
- Changes in existing functionality
- Updates to how features work
### Deprecated
- Features that will be removed in upcoming releases
- Include timeline for removal
### Removed
- Features that have been removed
- Previously deprecated features
### Fixed
- Bug fixes
- Security patches
### Security
- Security vulnerabilities that have been fixed
- Important security updates
## [2.1.0] - 2025-01-15
### Added
- Added OAuth2 authentication support for GitHub and Google
- New dashboard widget system for customizable layouts
- Bulk operations API for processing multiple records
- Export to Excel functionality with custom templates
- Dark mode theme support across all pages
- WebSocket support for real-time notifications
- GraphQL API alongside existing REST endpoints
- Internationalization support for 10 new languages
- Spanish, French, German, Italian, Portuguese
- Japanese, Korean, Chinese (Simplified/Traditional), Arabic
### Changed
- Updated user profile page with improved layout and performance
- Migrated from REST to GraphQL for main API endpoints
- Improved error messages with more context and suggestions
- Refactored authentication system for better security
- Updated dependencies to latest versions
- React 18.2.0 → 19.0.0
- Node.js 16.x → 18.x (minimum required version)
- PostgreSQL 13 → 14
- Changed default pagination from 20 to 50 items
- Improved search algorithm for 3x faster results
### Deprecated
- REST API v1 endpoints (will be removed in v3.0.0)
- Use GraphQL API or REST API v2 instead
- Migration guide: [docs/migration-v1-to-v2.md](docs/migration-v1-to-v2.md)
- Legacy authentication tokens (remove by 2025-06-01)
- Replace with JWT tokens
- Old configuration format in `config.json`
- Use new YAML format in `config.yaml`
### Removed
- Removed deprecated `/api/users/list` endpoint
- Use `/api/v2/users` instead
- Removed support for Internet Explorer 11
- Minimum browser versions: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
- Removed jQuery dependency (now pure JavaScript)
- Removed old dashboard widgets (replaced with new widget system)
### Fixed
- Fixed race condition in order processing causing duplicate charges
- Affected versions: 2.0.0 - 2.0.5
- Issue: [#1234](https://github.com/user/repo/issues/1234)
- Fixed memory leak in WebSocket connections
- Fixed incorrect timezone handling in date pickers
- Fixed CSV export not including all columns
- Fixed CSRF vulnerability in form submissions (CVE-2025-12345)
- Fixed accessibility issues in navigation menu
- Now fully keyboard navigable
- Screen reader friendly
- Fixed mobile responsive issues on iPad Pro
- Fixed SQL injection vulnerability in search (CVE-2025-12346)
- **Security Impact**: High
- **Affected Versions**: 2.0.0 - 2.0.9
- **Recommended Action**: Upgrade immediately
### Security
- **CRITICAL**: Fixed SQL injection in user search (CVE-2025-12346)
- Impact: Allows unauthorized database access
- Affected: v2.0.0 to v2.0.9
- Action: Upgrade to v2.1.0 immediately
- Fixed XSS vulnerability in comment rendering (CVE-2025-12347)
- Updated all dependencies with known security vulnerabilities
- Implemented rate limiting on all API endpoints
- Added CSRF protection to all forms
- Enabled Content Security Policy headers
## [2.0.5] - 2025-01-08
### Fixed
- Hotfix: Critical bug causing data loss in export functionality
- Fixed authentication issues with LDAP integration
- Resolved performance degradation with large datasets
### Security
- Patched authentication bypass vulnerability (CVE-2025-12344)
## [2.0.0] - 2025-01-01
### Added
- Complete UI redesign with modern look and feel
- New REST API v2 with better performance
- User roles and permissions system
- Audit logging for all administrative actions
- Email templates customization
- Two-factor authentication (2FA)
- API rate limiting
- Database backup automation
### Changed
- **BREAKING**: Changed API response format from XML to JSON
- All API consumers must update their integration
- See migration guide: [docs/api-v1-to-v2.md](docs/api-v1-to-v2.md)
- **BREAKING**: Renamed database tables for consistency
- `user` → `users`
- `order` → `orders`
- Run migration script: `npm run migrate:v2`
- **BREAKING**: Changed authentication from session-based to JWT
- Existing sessions will be invalidated
- Users need to log in again
- Improved database query performance by 50%
- Updated minimum Node.js version to 16.x
### Removed
- **BREAKING**: Removed support for Node.js 12 and 14
- **BREAKING**: Removed deprecated configuration options
- `USE_OLD_AUTH` - Use JWT authentication
- `LEGACY_MODE` - No longer supported
### Migration Guide
**From v1.x to v2.0:**
1. Update Node.js to version 16 or higher
2. Update your API integration:
```javascript
// Old (v1)
fetch("/api/users/list")
.then((res) => res.text())
.then((xml) => parseXML(xml));
// New (v2)
fetch("/api/v2/users")
.then((res) => res.json())
.then((data) => console.log(data));
```
-
运行数据库迁移:
npm run migrate:v2 -
更新环境变量:
# Remove USE_OLD_AUTH=true LEGACY_MODE=true # Add JWT_SECRET=your-secret-key JWT_EXPIRES_IN=7d
1.5.2 - 2024-12-15
已修复
- 修复用户列表页面的分页错误
- 解决报告中的时区问题
- 修复电子邮件通知延迟问题
1.5.0 - 2024-12-01
新增
- 新增报表仪表板
- 为用户个人资料新增自定义字段
- 新增集成用的 Webhook 支持
变更
- 提升搜索性能
- 更新 UI 组件库
1.0.0 - 2024-10-01
新增
- 首次发布
- 用户管理
- 基础 API
- 身份验证和授权
- 数据库迁移
- 单元测试和集成测试
## Release Notes Template
```markdown
# Release Notes - Version 2.1.0
**Release Date:** January 15, 2025
**Download:** [v2.1.0](https://github.com/user/repo/releases/tag/v2.1.0)
## 🎉 Highlights
- **OAuth2 Authentication**: Sign in with GitHub and Google
- **GraphQL API**: New GraphQL endpoint alongside REST API
- **Dark Mode**: Full dark mode support across all pages
- **Real-time Notifications**: WebSocket-powered live updates
- **10 New Languages**: Expanded internationalization support
## 📦 What's New
### OAuth2 Authentication
You can now sign in using your GitHub or Google account. Configure OAuth in Settings > Authentication.
```javascript
// Enable OAuth in your config
{
"auth": {
"providers": ["github", "google"],
"github": {
"clientId": "your-client-id",
"clientSecret": "your-client-secret"
}
}
}
GraphQL API
使用 GraphQL 访问数据,实现更高效的查询:
query GetUser {
user(id: "123") {
id
name
email
orders {
id
total
items {
product {
name
price
}
}
}
}
}
端点: https://api.example.com/graphql
文档: GraphQL API 文档
深色模式
在“设置”>“外观”中启用深色模式,或使用系统偏好设置。

🔧 改进
- 搜索速度提升 3 倍:改进搜索算法
- 更友好的错误消息:提供更有帮助的错误消息和建议
- 性能增强:页面加载速度提升 50%
- 移动端改进:优化平板电脑的响应式设计
🐛 错误修复
- 修复订单处理中的竞态条件
- 修复 WebSocket 连接中的内存泄漏
- 修复日期选择器中的时区处理问题
- 修复导航中的无障碍访问问题
🔒 安全更新
- 严重:修复 SQL 注入漏洞(CVE-2025-12346)
- 影响:高——可能导致未经授权访问数据库
- 操作:如果使用 v2.0.0 - v2.0.9,请立即升级
- 修复评论渲染中的 XSS 漏洞(CVE-2025-12347)
- 更新依赖项并应用安全补丁
📋 破坏性变更
已弃用的 API(将在 v3.0.0 中移除)
以下 REST API v1 端点已弃用,将在 v3.0.0 中移除:
| 旧端点 | 新端点 | 迁移指南 |
|---|---|---|
/api/users/list | /api/v2/users | 链接 |
/api/products/search | /api/v2/products?q= | 链接 |
时间安排:这些端点将继续运行至 2025 年 6 月。
已更新的依赖项
- Node.js:最低版本现为 18.x(原为 16.x)
- React:已升级至 19.0.0
- PostgreSQL:最低版本现为 14(原为 13)
📖 文档
🔄 升级
从 v2.0.x 升级
# Backup your database first
pg_dump your_database > backup.sql
# Pull latest version
git pull origin main
# Install dependencies
npm install
# Run migrations
npm run migrate
# Restart application
npm start
从 v1.x 升级
详细升级说明请参阅 v1 到 v2 迁移指南。
🙏 贡献者
感谢所有促成本次发布的贡献者:
- @contributor1 - OAuth2 实现
- @contributor2 - GraphQL API
- @contributor3 - 深色模式
- @contributor4 - 性能改进
📞 支持
- 问题:GitHub Issues
- 讨论:GitHub Discussions
- 文档:docs.example.com
- 电子邮件:[email protected]
🔜 接下来是什么?
即将在 v2.2.0 中推出:
- 高级分析仪表板
- 可扩展的插件系统
- 移动应用(iOS 和 Android)
- 改进的团队协作功能
敬请期待!
## Semantic Versioning Guide
版本:MAJOR.MINOR.PATCH
MAJOR 版本:不兼容的 API 变更 MINOR 版本:添加功能(向后兼容) PATCH 版本:向后兼容的错误修复
示例:
- 1.0.0 → 1.0.1:错误修复
- 1.0.1 → 1.1.0:新功能(向后兼容)
- 1.1.0 → 2.0.0:重大变更
## Best Practices
### ✅ DO
- Follow Keep a Changelog format
- Use Semantic Versioning
- Document breaking changes prominently
- Include migration guides
- Link to relevant issues/PRs
- Categorize changes (Added, Changed, Fixed, etc.)
- Include security fixes in separate section
- Date all releases (YYYY-MM-DD format)
- Link to release tags
- Document deprecations with timelines
- Include upgrade instructions
- Mention contributors
### ❌ DON'T
- Skip documenting breaking changes
- Forget to update changelog before release
- Mix multiple types in one category
- Use vague descriptions
- Skip dates on releases
- Forget semantic versioning
- Hide security issues
## Resources
- [Keep a Changelog](https://keepachangelog.com/)
- [Semantic Versioning](https://semver.org/)
- [Conventional Commits](https://www.conventionalcommits.org/)
- [Release Drafter](https://github.com/release-drafter/release-drafter)
评论
支持 Markdown