$npx -y skills add ECNU-ICALK/AutoSkill --skill release-skillsUniversal release workflow. Auto-detects version files and changelogs. Supports Node.js, Python, Rust, Claude Plugin, and generic projects. Use when user says "release", "发布", "new version", "bump version", "push", "推送".
| 1 | # Release Skills |
| 2 | |
| 3 | Universal release workflow supporting any project type with multi-language changelog. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | Just run `/release-skills` - auto-detects your project configuration. |
| 8 | |
| 9 | ## Supported Projects |
| 10 | |
| 11 | | Project Type | Version File | Auto-Detected | |
| 12 | |--------------|--------------|---------------| |
| 13 | | Node.js | package.json | ✓ | |
| 14 | | Python | pyproject.toml | ✓ | |
| 15 | | Rust | Cargo.toml | ✓ | |
| 16 | | Claude Plugin | marketplace.json | ✓ | |
| 17 | | Generic | VERSION / version.txt | ✓ | |
| 18 | |
| 19 | ## Options |
| 20 | |
| 21 | | Flag | Description | |
| 22 | |------|-------------| |
| 23 | | `--dry-run` | Preview changes without executing | |
| 24 | | `--major` | Force major version bump | |
| 25 | | `--minor` | Force minor version bump | |
| 26 | | `--patch` | Force patch version bump | |
| 27 | |
| 28 | ## Workflow |
| 29 | |
| 30 | ### Step 1: Detect Project Configuration |
| 31 | |
| 32 | 1. Check for `.releaserc.yml` (optional config override) |
| 33 | 2. Auto-detect version file by scanning (priority order): |
| 34 | - `package.json` (Node.js) |
| 35 | - `pyproject.toml` (Python) |
| 36 | - `Cargo.toml` (Rust) |
| 37 | - `marketplace.json` or `.claude-plugin/marketplace.json` (Claude Plugin) |
| 38 | - `VERSION` or `version.txt` (Generic) |
| 39 | 3. Scan for changelog files using glob patterns: |
| 40 | - `CHANGELOG*.md` |
| 41 | - `HISTORY*.md` |
| 42 | - `CHANGES*.md` |
| 43 | 4. Identify language of each changelog by filename suffix |
| 44 | 5. Display detected configuration |
| 45 | |
| 46 | **Language Detection Rules**: |
| 47 | |
| 48 | | Filename Pattern | Language | |
| 49 | |------------------|----------| |
| 50 | | `CHANGELOG.md` (no suffix) | en (default) | |
| 51 | | `CHANGELOG.zh.md` / `CHANGELOG_CN.md` / `CHANGELOG.zh-CN.md` | zh | |
| 52 | | `CHANGELOG.ja.md` / `CHANGELOG_JP.md` | ja | |
| 53 | | `CHANGELOG.ko.md` / `CHANGELOG_KR.md` | ko | |
| 54 | | `CHANGELOG.de.md` / `CHANGELOG_DE.md` | de | |
| 55 | | `CHANGELOG.fr.md` / `CHANGELOG_FR.md` | fr | |
| 56 | | `CHANGELOG.es.md` / `CHANGELOG_ES.md` | es | |
| 57 | | `CHANGELOG.{lang}.md` | Corresponding language code | |
| 58 | |
| 59 | **Output Example**: |
| 60 | ``` |
| 61 | Project detected: |
| 62 | Version file: package.json (1.2.3) |
| 63 | Changelogs: |
| 64 | - CHANGELOG.md (en) |
| 65 | - CHANGELOG.zh.md (zh) |
| 66 | - CHANGELOG.ja.md (ja) |
| 67 | ``` |
| 68 | |
| 69 | ### Step 2: Analyze Changes Since Last Tag |
| 70 | |
| 71 | ```bash |
| 72 | LAST_TAG=$(git tag --sort=-v:refname | head -1) |
| 73 | git log ${LAST_TAG}..HEAD --oneline |
| 74 | git diff ${LAST_TAG}..HEAD --stat |
| 75 | ``` |
| 76 | |
| 77 | Categorize by conventional commit types: |
| 78 | |
| 79 | | Type | Description | |
| 80 | |------|-------------| |
| 81 | | feat | New features | |
| 82 | | fix | Bug fixes | |
| 83 | | docs | Documentation | |
| 84 | | refactor | Code refactoring | |
| 85 | | perf | Performance improvements | |
| 86 | | test | Test changes | |
| 87 | | style | Formatting, styling | |
| 88 | | chore | Maintenance (skip in changelog) | |
| 89 | |
| 90 | **Breaking Change Detection**: |
| 91 | - Commit message starts with `BREAKING CHANGE` |
| 92 | - Commit body/footer contains `BREAKING CHANGE:` |
| 93 | - Removed public APIs, renamed exports, changed interfaces |
| 94 | |
| 95 | If breaking changes detected, warn user: "Breaking changes detected. Consider major version bump (--major flag)." |
| 96 | |
| 97 | ### Step 3: Determine Version Bump |
| 98 | |
| 99 | Rules (in priority order): |
| 100 | 1. User flag `--major/--minor/--patch` → Use specified |
| 101 | 2. BREAKING CHANGE detected → Major bump (1.x.x → 2.0.0) |
| 102 | 3. `feat:` commits present → Minor bump (1.2.x → 1.3.0) |
| 103 | 4. Otherwise → Patch bump (1.2.3 → 1.2.4) |
| 104 | |
| 105 | Display version change: `1.2.3 → 1.3.0` |
| 106 | |
| 107 | ### Step 4: Generate Multi-language Changelogs |
| 108 | |
| 109 | For each detected changelog file: |
| 110 | |
| 111 | 1. **Identify language** from filename suffix |
| 112 | 2. **Detect third-party contributors**: |
| 113 | - Check merge commits: `git log ${LAST_TAG}..HEAD --merges --pretty=format:"%H %s"` |
| 114 | - For each merged PR, identify the PR author via `gh pr view <number> --json author --jq '.author.login'` |
| 115 | - Compare against repo owner (`gh repo view --json owner --jq '.owner.login'`) |
| 116 | - If PR author ≠ repo owner → third-party contributor |
| 117 | 3. **Generate content in that language**: |
| 118 | - Section titles in target language |
| 119 | - Change descriptions written naturally in target language (not translated) |
| 120 | - Date format: YYYY-MM-DD (universal) |
| 121 | - **Third-party contributions**: Append contributor attribution `(by @username)` to the changelog entry |
| 122 | 4. **Insert at file head** (preserve existing content) |
| 123 | |
| 124 | **Section Title Translations** (built-in): |
| 125 | |
| 126 | | Type | en | zh | ja | ko | de | fr | es | |
| 127 | |------|----|----|----|----|----|----|-----| |
| 128 | | feat | Features | 新功能 | 新機能 | 새로운 기능 | Funktionen | Fonctionnalités | Características | |
| 129 | | fix | Fixes | 修复 | 修正 | 수정 | Fehlerbehebungen | Corrections | Correcciones | |
| 130 | | docs | Documentation | 文档 | ドキュメント | 문서 | Dokumentation | Documentation | Documentación | |
| 131 | | refactor | Refactor | 重构 | リファクタリング | 리팩토링 | Refactoring | Refactorisation | Refactorización | |
| 132 | | perf | Performance | 性能优化 | パフォーマンス | 성능 | Leistung | Performance | Rendimiento | |
| 133 | | breaking | Breaking Changes | 破坏性变更 | 破壊的変更 | 주요 변경사항 | Breaking Changes | Changements majeurs | Cambios importantes | |
| 134 | |
| 135 | **Changelog Format**: |
| 136 | |
| 137 | ```markdown |
| 138 | ## {VERSION} - {YYYY-MM-DD} |
| 139 | |
| 140 | ### Features |
| 141 | - Des |