Release Skills
Universal release workflow supporting any project type with multi-language changelog.
Quick Start
Just run /release-skills - auto-detects your project configuration.
Supported Projects
| Project Type | Version File | Auto-Detected |
|---|
| Node.js | package.json | ✓ |
| Python |
pyproject.toml | ✓ |
| Rust | Cargo.toml | ✓ |
| Claude Plugin | marketplace.json | ✓ |
| Generic | VERSION / version.txt | ✓ |
Options
| Flag | Description |
|---|
| INLINECODE1 | Preview changes without executing |
| INLINECODE2 |
Force major version bump |
|
--minor | Force minor version bump |
|
--patch | Force patch version bump |
Workflow
Step 1: Detect Project Configuration
- 1. Check for
.releaserc.yml (optional config override) - Auto-detect version file by scanning (priority order):
-
package.json (Node.js)
-
pyproject.toml (Python)
-
Cargo.toml (Rust)
-
marketplace.json or
.claude-plugin/marketplace.json (Claude Plugin)
-
VERSION or
version.txt (Generic)
- 3. Scan for changelog files using glob patterns:
-
CHANGELOG*.md
-
HISTORY*.md
-
CHANGES*.md
- 4. Identify language of each changelog by filename suffix
- Display detected configuration
Language Detection Rules:
Changelog files follow the pattern CHANGELOG_{LANG}.md or CHANGELOG.{lang}.md, where {lang} / {LANG} is a language or region code.
| Pattern | Example | Language |
|---|
| No suffix | INLINECODE20 | en (default) |
| INLINECODE21 (uppercase) |
CHANGELOG_CN.md,
CHANGELOG_JP.md | Corresponding language |
|
.{lang} (lowercase) |
CHANGELOG.zh.md,
CHANGELOG.ja.md | Corresponding language |
|
.{lang-region} |
CHANGELOG.zh-CN.md | Corresponding region variant |
Common language codes: zh (Chinese), ja (Japanese), ko (Korean), de (German), fr (French), es (Spanish).
Output Example:
CODEBLOCK0
Step 2: Analyze Changes Since Last Tag
CODEBLOCK1
Categorize by conventional commit types:
| Type | Description |
|---|
| feat | New features |
| fix |
Bug fixes |
| docs | Documentation |
| refactor | Code refactoring |
| perf | Performance improvements |
| test | Test changes |
| style | Formatting, styling |
| chore | Maintenance (skip in changelog) |
Breaking Change Detection:
- - Commit message starts with INLINECODE35
- Commit body/footer contains INLINECODE36
- Removed public APIs, renamed exports, changed interfaces
If breaking changes detected, warn user: "Breaking changes detected. Consider major version bump (--major flag)."
Step 3: Determine Version Bump
Rules (in priority order):
- 1. User flag
--major/--minor/--patch → Use specified - BREAKING CHANGE detected → Major bump (1.x.x → 2.0.0)
- INLINECODE38 commits present → Minor bump (1.2.x → 1.3.0)
- Otherwise → Patch bump (1.2.3 → 1.2.4)
Display version change: INLINECODE39
Step 4: Generate Multi-language Changelogs
For each detected changelog file:
- 1. Identify language from filename suffix
- Detect third-party contributors:
- Check merge commits:
git log ${LAST_TAG}..HEAD --merges --pretty=format:"%H %s"
- For each merged PR, identify the PR author via
gh pr view <number> --json author --jq '.author.login'
- Compare against repo owner (
gh repo view --json owner --jq '.owner.login')
- If PR author ≠ repo owner → third-party contributor
- 3. Generate content in that language:
- Section titles in target language
- Change descriptions written naturally in target language (not translated)
- Date format: YYYY-MM-DD (universal)
-
Third-party contributions: Append contributor attribution
(by @username) to the changelog entry
- 4. Insert at file head (preserve existing content)
Section Title Translations (built-in):
| Type | en | zh | ja | ko | de | fr | es |
|---|
| feat | Features | 新功能 | 新機能 | 새로운 기능 | Funktionen | Fonctionnalités | Características |
| fix |
Fixes | 修复 | 修正 | 수정 | Fehlerbehebungen | Corrections | Correcciones |
| docs | Documentation | 文档 | ドキュメント | 문서 | Dokumentation | Documentation | Documentación |
| refactor | Refactor | 重构 | リファクタリング | 리팩토링 | Refactoring | Refactorisation | Refactorización |
| perf | Performance | 性能优化 | パフォーマンス | 성능 | Leistung | Performance | Rendimiento |
| breaking | Breaking Changes | 破坏性变更 | 破壊的変更 | 주요 변경사항 | Breaking Changes | Changements majeurs | Cambios importantes |
Changelog Format:
CODEBLOCK2
Only include sections that have changes. Omit empty sections.
Third-Party Attribution Rules:
- - Only add
(by @username) for contributors who are NOT the repo owner - Use GitHub username with
@ prefix - Place at the end of the changelog entry line
- Apply to all languages consistently (always use
(by @username) format, not translated)
Multi-language Example:
English (CHANGELOG.md):
CODEBLOCK3
Chinese (CHANGELOG.zh.md):
CODEBLOCK4
Japanese (CHANGELOG.ja.md):
CODEBLOCK5
Step 5: Group Changes by Skill/Module
Analyze commits since last tag and group by affected skill/module:
- 1. Identify changed files per commit
- Group by skill/module:
-
skills/<skill-name>/* → Group under that skill
- Root files (CLAUDE.md, etc.) → Group as "project"
- Multiple skills in one commit → Split into multiple groups
- 3. For each group, identify related README updates needed
Example Grouping:
CODEBLOCK6
Step 6: Commit Each Skill/Module Separately
For each skill/module group (in order of changes):
- 1. Check README updates needed:
- Scan
README*.md for mentions of this skill/module
- Verify options/flags documented correctly
- Update usage examples if syntax changed
- Update feature descriptions if behavior changed
- 2. Stage and commit:
CODEBLOCK7
- 3. Commit message format:
- Use conventional commit format:
<type>(<scope>): <description>
-
<type>: feat, fix, refactor, docs, perf, etc.
-
<scope>: skill name or "project"
-
<description>: Clear, meaningful description of changes
Example Commits:
CODEBLOCK8
Common README Updates Needed:
| Change Type | README Section to Check |
|---|
| New options/flags | Options table, usage examples |
| Renamed options |
Options table, usage examples |
| New features | Feature description, examples |
| Breaking changes | Migration notes, deprecation warnings |
| Restructured internals | Architecture section (if exposed to users) |
Step 7: Generate Changelog and Update Version
- 1. Generate multi-language changelogs (as described in Step 4)
- Update version file:
- Read version file (JSON/TOML/text)
- Update version number
- Write back (preserve formatting)
Version Paths by File Type:
| File | Path |
|---|
| package.json | INLINECODE53 |
| pyproject.toml |
project.version |
| Cargo.toml |
package.version |
| marketplace.json |
$.metadata.version |
| VERSION / version.txt | Direct content |
Step 8: User Confirmation
Before creating the release commit, ask user to confirm:
Use AskUserQuestion with two questions:
- 1. Version bump (single select):
- Show recommended version based on Step 3 analysis
- Options: recommended (with label), other semver options
- Example:
1.2.3 → 1.3.0 (Recommended),
1.2.3 → 1.2.4, INLINECODE59
- 2. Push to remote (single select):
- Options: "Yes, push after commit", "No, keep local only"
Example Output Before Confirmation:
CODEBLOCK9
Step 9: Create Release Commit and Tag
After user confirmation:
- 1. Stage version and changelog files:
CODEBLOCK10
- 2. Create release commit:
CODEBLOCK11
- 3. Create tag:
CODEBLOCK12
- 4. Push if user confirmed (Step 8):
CODEBLOCK13
Note: Do NOT add Co-Authored-By line. This is a release commit, not a code contribution.
Post-Release Output:
CODEBLOCK14
Configuration (.releaserc.yml)
Optional config file in project root to override defaults:
CODEBLOCK15
Dry-Run Mode
When --dry-run is specified:
CODEBLOCK16
Example Usage
CODEBLOCK17
When to Use
Trigger this skill when user requests:
- - "release", "发布", "create release", "new version", "新版本"
- "bump version", "update version", "更新版本"
- "prepare release"
- "push to remote" (with uncommitted changes)
Important: If user says "just push" or "直接 push" with uncommitted changes, STILL follow all steps above first.
发布技能
支持任何项目类型的通用发布工作流,包含多语言变更日志。
快速开始
只需运行 /release-skills - 自动检测您的项目配置。
支持的项目类型
| 项目类型 | 版本文件 | 自动检测 |
|---|
| Node.js | package.json | ✓ |
| Python |
pyproject.toml | ✓ |
| Rust | Cargo.toml | ✓ |
| Claude 插件 | marketplace.json | ✓ |
| 通用 | VERSION / version.txt | ✓ |
选项
| 标志 | 描述 |
|---|
| --dry-run | 预览更改但不执行 |
| --major |
强制主版本号升级 |
| --minor | 强制次版本号升级 |
| --patch | 强制补丁版本号升级 |
工作流
步骤 1:检测项目配置
- 1. 检查 .releaserc.yml(可选配置覆盖)
- 通过扫描自动检测版本文件(优先级顺序):
- package.json(Node.js)
- pyproject.toml(Python)
- Cargo.toml(Rust)
- marketplace.json 或 .claude-plugin/marketplace.json(Claude 插件)
- VERSION 或 version.txt(通用)
- 3. 使用 glob 模式扫描变更日志文件:
- CHANGELOG*.md
- HISTORY*.md
- CHANGES*.md
- 4. 通过文件名后缀识别每个变更日志的语言
- 显示检测到的配置
语言检测规则:
变更日志文件遵循 CHANGELOG_{LANG}.md 或 CHANGELOG.{lang}.md 模式,其中 {lang} / {LANG} 是语言或地区代码。
| 模式 | 示例 | 语言 |
|---|
| 无后缀 | CHANGELOG.md | en(默认) |
| {LANG}(大写) |
CHANGELOGCN.md、CHANGELOG_JP.md | 对应语言 |
| .{lang}(小写) | CHANGELOG.zh.md、CHANGELOG.ja.md | 对应语言 |
| .{lang-region} | CHANGELOG.zh-CN.md | 对应地区变体 |
常见语言代码:zh(中文)、ja(日语)、ko(韩语)、de(德语)、fr(法语)、es(西班牙语)。
输出示例:
检测到项目:
版本文件:package.json (1.2.3)
变更日志:
- CHANGELOG.md (en)
- CHANGELOG.zh.md (zh)
- CHANGELOG.ja.md (ja)
步骤 2:分析自上次标签以来的变更
bash
LAST_TAG=$(git tag --sort=-v:refname | head -1)
git log ${LAST_TAG}..HEAD --oneline
git diff ${LAST_TAG}..HEAD --stat
按常规提交类型分类:
错误修复 |
| docs | 文档 |
| refactor | 代码重构 |
| perf | 性能改进 |
| test | 测试变更 |
| style | 格式、样式 |
| chore | 维护(在变更日志中跳过) |
破坏性变更检测:
- - 提交消息以 BREAKING CHANGE 开头
- 提交正文/页脚包含 BREAKING CHANGE:
- 移除公共 API、重命名导出、更改接口
如果检测到破坏性变更,警告用户:检测到破坏性变更。考虑主版本号升级(--major 标志)。
步骤 3:确定版本升级
规则(按优先级顺序):
- 1. 用户标志 --major/--minor/--patch → 使用指定版本
- 检测到 BREAKING CHANGE → 主版本升级(1.x.x → 2.0.0)
- 存在 feat: 提交 → 次版本升级(1.2.x → 1.3.0)
- 其他情况 → 补丁版本升级(1.2.3 → 1.2.4)
显示版本变更:1.2.3 → 1.3.0
步骤 4:生成多语言变更日志
对于每个检测到的变更日志文件:
- 1. 从文件名后缀识别语言
- 检测第三方贡献者:
- 检查合并提交:git log ${LAST_TAG}..HEAD --merges --pretty=format:%H %s
- 对于每个合并的 PR,通过 gh pr view
--json author --jq .author.login 识别 PR 作者
- 与仓库所有者比较(gh repo view --json owner --jq .owner.login)
- 如果 PR 作者 ≠ 仓库所有者 → 第三方贡献者
- 3. 以该语言生成内容:
- 目标语言的部分标题
- 用目标语言自然编写的变更描述(非翻译)
- 日期格式:YYYY-MM-DD(通用)
- 第三方贡献:在变更日志条目后附加贡献者归属 (by @username)
- 4. 插入到文件头部(保留现有内容)
部分标题翻译(内置):
| 类型 | en | zh | ja | ko | de | fr | es |
|---|
| feat | Features | 新功能 | 新機能 | 새로운 기능 | Funktionen | Fonctionnalités | Características |
| fix |
Fixes | 修复 | 修正 | 수정 | Fehlerbehebungen | Corrections | Correcciones |
| docs | Documentation | 文档 | ドキュメント | 문서 | Dokumentation | Documentation | Documentación |
| refactor | Refactor | 重构 | リファクタリング | 리팩토링 | Refactoring | Refactorisation | Refactorización |
| perf | Performance | 性能优化 | パフォーマンス | 성능 | Leistung | Performance | Rendimiento |
| breaking | Breaking Changes | 破坏性变更 | 破壊的変更 | 주요 변경사항 | Breaking Changes | Changements majeurs | Cambios importantes |
变更日志格式:
markdown
{VERSION} - {YYYY-MM-DD}
Features
- - 新功能描述
- 第三方贡献描述 (by @username)
Fixes
Documentation
仅包含有变更的部分。省略空部分。
第三方归属规则:
- - 仅为非仓库所有者的贡献者添加 (by @username)
- 使用带有 @ 前缀的 GitHub 用户名
- 放置在变更日志条目行的末尾
- 对所有语言一致应用(始终使用 (by @username) 格式,不翻译)
多语言示例:
英文(CHANGELOG.md):
markdown
1.3.0 - 2026-01-22
Features
- - Add user authentication module (by @contributor1)
- Support OAuth2 login
Fixes
- - Fix memory leak in connection pool
中文(CHANGELOG.zh.md):
markdown
1.3.0 - 2026-01-22
新功能
- - 新增用户认证模块 (by @contributor1)
- 支持 OAuth2 登录
修复
日语(CHANGELOG.ja.md):
markdown
1.3.0 - 2026-01-22
新機能
- - ユーザー認証モジュールを追加 (by @contributor1)
- OAuth2 ログインをサポート
修正
步骤 5:按技能/模块分组变更
分析自上次标签以来的提交并按受影响的技能/模块分组:
- 1. 识别每个提交中变更的文件
- 按技能/模块分组:
- skills//* → 归入该技能
- 根文件(CLAUDE.md 等)→ 归入项目
- 一个提交中的多个技能 → 拆分为多个组
- 3. 对于每个组,识别所需的 README 更新
分组示例:
baoyu-cover-image:
- feat:添加新样式选项
- fix:处理透明背景
→ README 更新:选项表
baoyu-comic:
- refactor:改进面板布局算法
→ 无需 README 更新
project:
-