{"skill":{"slug":"universal-release","displayName":"Universal Release","summary":"Universal release workflow. Auto-detects version files and changelogs. Supports Node.js, Python, Rust, Claude Plugin, and generic projects. Use when user say...","description":"---\nname: release-skills\ndescription: Universal 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\", \"推送\".\n---\n\n# Release Skills\n\nUniversal release workflow supporting any project type with multi-language changelog.\n\n## Quick Start\n\nJust run `/release-skills` - auto-detects your project configuration.\n\n## Supported Projects\n\n| Project Type | Version File | Auto-Detected |\n|--------------|--------------|---------------|\n| Node.js | package.json | ✓ |\n| Python | pyproject.toml | ✓ |\n| Rust | Cargo.toml | ✓ |\n| Claude Plugin | marketplace.json | ✓ |\n| Generic | VERSION / version.txt | ✓ |\n\n## Options\n\n| Flag | Description |\n|------|-------------|\n| `--dry-run` | Preview changes without executing |\n| `--major` | Force major version bump |\n| `--minor` | Force minor version bump |\n| `--patch` | Force patch version bump |\n\n## Workflow\n\n### Step 1: Detect Project Configuration\n\n1. Check for `.releaserc.yml` (optional config override)\n2. Auto-detect version file by scanning (priority order):\n   - `package.json` (Node.js)\n   - `pyproject.toml` (Python)\n   - `Cargo.toml` (Rust)\n   - `marketplace.json` or `.claude-plugin/marketplace.json` (Claude Plugin)\n   - `VERSION` or `version.txt` (Generic)\n3. Scan for changelog files using glob patterns:\n   - `CHANGELOG*.md`\n   - `HISTORY*.md`\n   - `CHANGES*.md`\n4. Identify language of each changelog by filename suffix\n5. Display detected configuration\n\n**Language Detection Rules**:\n\nChangelog files follow the pattern `CHANGELOG_{LANG}.md` or `CHANGELOG.{lang}.md`, where `{lang}` / `{LANG}` is a language or region code.\n\n| Pattern | Example | Language |\n|---------|---------|----------|\n| No suffix | `CHANGELOG.md` | en (default) |\n| `_{LANG}` (uppercase) | `CHANGELOG_CN.md`, `CHANGELOG_JP.md` | Corresponding language |\n| `.{lang}` (lowercase) | `CHANGELOG.zh.md`, `CHANGELOG.ja.md` | Corresponding language |\n| `.{lang-region}` | `CHANGELOG.zh-CN.md` | Corresponding region variant |\n\nCommon language codes: `zh` (Chinese), `ja` (Japanese), `ko` (Korean), `de` (German), `fr` (French), `es` (Spanish).\n\n**Output Example**:\n```\nProject detected:\n  Version file: package.json (1.2.3)\n  Changelogs:\n    - CHANGELOG.md (en)\n    - CHANGELOG.zh.md (zh)\n    - CHANGELOG.ja.md (ja)\n```\n\n### Step 2: Analyze Changes Since Last Tag\n\n```bash\nLAST_TAG=$(git tag --sort=-v:refname | head -1)\ngit log ${LAST_TAG}..HEAD --oneline\ngit diff ${LAST_TAG}..HEAD --stat\n```\n\nCategorize by conventional commit types:\n\n| Type | Description |\n|------|-------------|\n| feat | New features |\n| fix | Bug fixes |\n| docs | Documentation |\n| refactor | Code refactoring |\n| perf | Performance improvements |\n| test | Test changes |\n| style | Formatting, styling |\n| chore | Maintenance (skip in changelog) |\n\n**Breaking Change Detection**:\n- Commit message starts with `BREAKING CHANGE`\n- Commit body/footer contains `BREAKING CHANGE:`\n- Removed public APIs, renamed exports, changed interfaces\n\nIf breaking changes detected, warn user: \"Breaking changes detected. Consider major version bump (--major flag).\"\n\n### Step 3: Determine Version Bump\n\nRules (in priority order):\n1. User flag `--major/--minor/--patch` → Use specified\n2. BREAKING CHANGE detected → Major bump (1.x.x → 2.0.0)\n3. `feat:` commits present → Minor bump (1.2.x → 1.3.0)\n4. Otherwise → Patch bump (1.2.3 → 1.2.4)\n\nDisplay version change: `1.2.3 → 1.3.0`\n\n### Step 4: Generate Multi-language Changelogs\n\nFor each detected changelog file:\n\n1. **Identify language** from filename suffix\n2. **Detect third-party contributors**:\n   - Check merge commits: `git log ${LAST_TAG}..HEAD --merges --pretty=format:\"%H %s\"`\n   - For each merged PR, identify the PR author via `gh pr view <number> --json author --jq '.author.login'`\n   - Compare against repo owner (`gh repo view --json owner --jq '.owner.login'`)\n   - If PR author ≠ repo owner → third-party contributor\n3. **Generate content in that language**:\n   - Section titles in target language\n   - Change descriptions written naturally in target language (not translated)\n   - Date format: YYYY-MM-DD (universal)\n   - **Third-party contributions**: Append contributor attribution `(by @username)` to the changelog entry\n4. **Insert at file head** (preserve existing content)\n\n**Section Title Translations** (built-in):\n\n| Type | en | zh | ja | ko | de | fr | es |\n|------|----|----|----|----|----|----|-----|\n| feat | Features | 新功能 | 新機能 | 새로운 기능 | Funktionen | Fonctionnalités | Características |\n| fix | Fixes | 修复 | 修正 | 수정 | Fehlerbehebungen | Corrections | Correcciones |\n| docs | Documentation | 文档 | ドキュメント | 문서 | Dokumentation | Documentation | Documentación |\n| refactor | Refactor | 重构 | リファクタリング | 리팩토링 | Refactoring | Refactorisation | Refactorización |\n| perf | Performance | 性能优化 | パフォーマンス | 성능 | Leistung | Performance | Rendimiento |\n| breaking | Breaking Changes | 破坏性变更 | 破壊的変更 | 주요 변경사항 | Breaking Changes | Changements majeurs | Cambios importantes |\n\n**Changelog Format**:\n\n```markdown\n## {VERSION} - {YYYY-MM-DD}\n\n### Features\n- Description of new feature\n- Description of third-party contribution (by @username)\n\n### Fixes\n- Description of fix\n\n### Documentation\n- Description of docs changes\n```\n\nOnly include sections that have changes. Omit empty sections.\n\n**Third-Party Attribution Rules**:\n- Only add `(by @username)` for contributors who are NOT the repo owner\n- Use GitHub username with `@` prefix\n- Place at the end of the changelog entry line\n- Apply to all languages consistently (always use `(by @username)` format, not translated)\n\n**Multi-language Example**:\n\nEnglish (CHANGELOG.md):\n```markdown\n## 1.3.0 - 2026-01-22\n\n### Features\n- Add user authentication module (by @contributor1)\n- Support OAuth2 login\n\n### Fixes\n- Fix memory leak in connection pool\n```\n\nChinese (CHANGELOG.zh.md):\n```markdown\n## 1.3.0 - 2026-01-22\n\n### 新功能\n- 新增用户认证模块 (by @contributor1)\n- 支持 OAuth2 登录\n\n### 修复\n- 修复连接池内存泄漏问题\n```\n\nJapanese (CHANGELOG.ja.md):\n```markdown\n## 1.3.0 - 2026-01-22\n\n### 新機能\n- ユーザー認証モジュールを追加 (by @contributor1)\n- OAuth2 ログインをサポート\n\n### 修正\n- コネクションプールのメモリリークを修正\n```\n\n### Step 5: Group Changes by Skill/Module\n\nAnalyze commits since last tag and group by affected skill/module:\n\n1. **Identify changed files** per commit\n2. **Group by skill/module**:\n   - `skills/<skill-name>/*` → Group under that skill\n   - Root files (CLAUDE.md, etc.) → Group as \"project\"\n   - Multiple skills in one commit → Split into multiple groups\n3. **For each group**, identify related README updates needed\n\n**Example Grouping**:\n```\nbaoyu-cover-image:\n  - feat: add new style options\n  - fix: handle transparent backgrounds\n  → README updates: options table\n\nbaoyu-comic:\n  - refactor: improve panel layout algorithm\n  → No README updates needed\n\nproject:\n  - docs: update CLAUDE.md architecture section\n```\n\n### Step 6: Commit Each Skill/Module Separately\n\nFor each skill/module group (in order of changes):\n\n1. **Check README updates needed**:\n   - Scan `README*.md` for mentions of this skill/module\n   - Verify options/flags documented correctly\n   - Update usage examples if syntax changed\n   - Update feature descriptions if behavior changed\n\n2. **Stage and commit**:\n   ```bash\n   git add skills/<skill-name>/*\n   git add README.md README.zh.md  # If updated for this skill\n   git commit -m \"<type>(<skill-name>): <meaningful description>\"\n   ```\n\n3. **Commit message format**:\n   - Use conventional commit format: `<type>(<scope>): <description>`\n   - `<type>`: feat, fix, refactor, docs, perf, etc.\n   - `<scope>`: skill name or \"project\"\n   - `<description>`: Clear, meaningful description of changes\n\n**Example Commits**:\n```bash\ngit commit -m \"feat(baoyu-cover-image): add watercolor and minimalist styles\"\ngit commit -m \"fix(baoyu-comic): improve panel layout for long dialogues\"\ngit commit -m \"docs(project): update architecture documentation\"\n```\n\n**Common README Updates Needed**:\n| Change Type | README Section to Check |\n|-------------|------------------------|\n| New options/flags | Options table, usage examples |\n| Renamed options | Options table, usage examples |\n| New features | Feature description, examples |\n| Breaking changes | Migration notes, deprecation warnings |\n| Restructured internals | Architecture section (if exposed to users) |\n\n### Step 7: Generate Changelog and Update Version\n\n1. **Generate multi-language changelogs** (as described in Step 4)\n2. **Update version file**:\n   - Read version file (JSON/TOML/text)\n   - Update version number\n   - Write back (preserve formatting)\n\n**Version Paths by File Type**:\n\n| File | Path |\n|------|------|\n| package.json | `$.version` |\n| pyproject.toml | `project.version` |\n| Cargo.toml | `package.version` |\n| marketplace.json | `$.metadata.version` |\n| VERSION / version.txt | Direct content |\n\n### Step 8: User Confirmation\n\nBefore creating the release commit, ask user to confirm:\n\n**Use AskUserQuestion with two questions**:\n\n1. **Version bump** (single select):\n   - Show recommended version based on Step 3 analysis\n   - Options: recommended (with label), other semver options\n   - Example: `1.2.3 → 1.3.0 (Recommended)`, `1.2.3 → 1.2.4`, `1.2.3 → 2.0.0`\n\n2. **Push to remote** (single select):\n   - Options: \"Yes, push after commit\", \"No, keep local only\"\n\n**Example Output Before Confirmation**:\n```\nCommits created:\n  1. feat(baoyu-cover-image): add watercolor and minimalist styles\n  2. fix(baoyu-comic): improve panel layout for long dialogues\n  3. docs(project): update architecture documentation\n\nChangelog preview (en):\n  ## 1.3.0 - 2026-01-22\n  ### Features\n  - Add watercolor and minimalist styles to cover-image\n  ### Fixes\n  - Improve panel layout for long dialogues in comic\n\nReady to create release commit and tag.\n```\n\n### Step 9: Create Release Commit and Tag\n\nAfter user confirmation:\n\n1. **Stage version and changelog files**:\n   ```bash\n   git add <version-file>\n   git add CHANGELOG*.md\n   ```\n\n2. **Create release commit**:\n   ```bash\n   git commit -m \"chore: release v{VERSION}\"\n   ```\n\n3. **Create tag**:\n   ```bash\n   git tag v{VERSION}\n   ```\n\n4. **Push if user confirmed** (Step 8):\n   ```bash\n   git push origin main\n   git push origin v{VERSION}\n   ```\n\n**Note**: Do NOT add Co-Authored-By line. This is a release commit, not a code contribution.\n\n**Post-Release Output**:\n```\nRelease v1.3.0 created.\n\nCommits:\n  1. feat(baoyu-cover-image): add watercolor and minimalist styles\n  2. fix(baoyu-comic): improve panel layout for long dialogues\n  3. docs(project): update architecture documentation\n  4. chore: release v1.3.0\n\nTag: v1.3.0\nStatus: Pushed to origin  # or \"Local only - run git push when ready\"\n```\n\n## Configuration (.releaserc.yml)\n\nOptional config file in project root to override defaults:\n\n```yaml\n# .releaserc.yml - Optional configuration\n\n# Version file (auto-detected if not specified)\nversion:\n  file: package.json\n  path: $.version  # JSONPath for JSON, dotted path for TOML\n\n# Changelog files (auto-detected if not specified)\nchangelog:\n  files:\n    - path: CHANGELOG.md\n      lang: en\n    - path: CHANGELOG.zh.md\n      lang: zh\n    - path: CHANGELOG.ja.md\n      lang: ja\n\n  # Section mapping (conventional commit type → changelog section)\n  # Use null to skip a type in changelog\n  sections:\n    feat: Features\n    fix: Fixes\n    docs: Documentation\n    refactor: Refactor\n    perf: Performance\n    test: Tests\n    chore: null\n\n# Commit message format\ncommit:\n  message: \"chore: release v{version}\"\n\n# Tag format\ntag:\n  prefix: v  # Results in v1.0.0\n  sign: false\n\n# Additional files to include in release commit\ninclude:\n  - README.md\n  - package.json\n```\n\n## Dry-Run Mode\n\nWhen `--dry-run` is specified:\n\n```\n=== DRY RUN MODE ===\n\nProject detected:\n  Version file: package.json (1.2.3)\n  Changelogs: CHANGELOG.md (en), CHANGELOG.zh.md (zh)\n\nLast tag: v1.2.3\nProposed version: v1.3.0\n\nChanges grouped by skill/module:\n  baoyu-cover-image:\n    - feat: add watercolor style\n    - feat: add minimalist style\n    → Commit: feat(baoyu-cover-image): add watercolor and minimalist styles\n    → README updates: options table\n\n  baoyu-comic:\n    - fix: panel layout for long dialogues\n    → Commit: fix(baoyu-comic): improve panel layout for long dialogues\n    → No README updates\n\nChangelog preview (en):\n  ## 1.3.0 - 2026-01-22\n  ### Features\n  - Add watercolor and minimalist styles to cover-image\n  ### Fixes\n  - Improve panel layout for long dialogues in comic\n\nChangelog preview (zh):\n  ## 1.3.0 - 2026-01-22\n  ### 新功能\n  - 为 cover-image 添加水彩和极简风格\n  ### 修复\n  - 改进 comic 长对话的面板布局\n\nCommits to create:\n  1. feat(baoyu-cover-image): add watercolor and minimalist styles\n  2. fix(baoyu-comic): improve panel layout for long dialogues\n  3. chore: release v1.3.0\n\nNo changes made. Run without --dry-run to execute.\n```\n\n## Example Usage\n\n```\n/release-skills              # Auto-detect version bump\n/release-skills --dry-run    # Preview only\n/release-skills --minor      # Force minor bump\n/release-skills --patch      # Force patch bump\n/release-skills --major      # Force major bump (with confirmation)\n```\n\n## When to Use\n\nTrigger this skill when user requests:\n- \"release\", \"发布\", \"create release\", \"new version\", \"新版本\"\n- \"bump version\", \"update version\", \"更新版本\"\n- \"prepare release\"\n- \"push to remote\" (with uncommitted changes)\n\n**Important**: If user says \"just push\" or \"直接 push\" with uncommitted changes, STILL follow all steps above first.\n","tags":{"changelog":"1.0.0","git":"1.0.0","latest":"1.0.0","publish":"1.0.0","release":"1.0.0","version":"1.0.0"},"stats":{"comments":0,"downloads":584,"installsAllTime":22,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1773452484109,"updatedAt":1778491894093},"latestVersion":{"version":"1.0.0","createdAt":1773452484109,"changelog":"Initial release: Universal release workflow for OpenClaw skills with multi-language changelog support","license":"MIT-0"},"metadata":null,"owner":{"handle":"zoopools","userId":"s17a35rca93qan3nzqege0jqv98845zc","displayName":"wh1ko","image":"https://avatars.githubusercontent.com/u/85224127?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089875015}}