Prepare release

From ComeOnOliver/skillshub · View interactive version

Prepare release is an AI agent skill from the GitHub repository ComeOnOliver/skillshub. Prepare a new release by collecting commits, generating bilingual release notes, updating version files, and creating a release branch with PR. Use when asked to prepare/create a release, bump version, or run `/prepare-release`.

How to use this skill

Skill file

Prepare Release

Automate the Cherry Studio release workflow: collect changes → generate bilingual release notes → update files → create release branch + PR → trigger CI/CD.

Arguments

Parse the version intent from the user's message. Accept any of these forms:

Defaults to patch if no version is specified. Always echo the resolved target version back to the user before proceeding with any file edits.

Workflow

Step 1: Determine Version

  1. Get the latest tag:

```bash

git describe --tags --abbrev=0

```

  1. Read current version from package.json.
  2. Compute the new version based on the argument:

Step 2: Collect Commits

  1. List all commits since the last tag:

```bash

git log <last-tag>..HEAD --format="%H %s" --no-merges

```

  1. For each commit, get the full body:

```bash

git log <hash> -1 --format="%B"

```

  1. Extract the content inside ` `release-note ` code blocks from each commit body.
  2. Extract the conventional commit type from the title (feat, fix, refactor, perf, docs, etc.).
  3. Skip these commits:

Step 3: Generate Bilingual Release Notes

Using the collected commit information, generate release notes in both English and Chinese.

Format (must match exactly):

<!--LANG:en-->
Cherry Studio {version} - {Brief English Title}

✨ New Features
- [Component] Description

🐛 Bug Fixes
- [Component] Description

💄 Improvements
- [Component] Description

⚡ Performance
- [Component] Description

<!--LANG:zh-CN-->
Cherry Studio {version} - {简短中文标题}

✨ 新功能
- [组件] 描述

🐛 问题修复
- [组件] 描述

💄 改进
- [组件] 描述

⚡ 性能优化
- [组件] 描述
<!--LANG:END-->

Rules:

IMPORTANT: User-Focused Content Only

Release notes are for end users, not developers. Exclude anything users don't care about:

INCLUDE only changes that users will notice:

Keep descriptions simple and non-technical:

Step 4: Update Files

  1. package.json: Update the "version" field to the new version.
  2. electron-builder.yml: Replace the content under releaseInfo.releaseNotes: | with the generated notes. Preserve the 4-space YAML indentation for the block scalar content.

Step 5: Present for Review

Show the user:

If --dry-run was specified, stop here.

Otherwise, ask the user to confirm before proceeding to Step 6.

Step 6: Create Branch and PR

  1. Create and push the release branch:

```bash

git checkout -b release/v{version}

git add package.json electron-builder.yml

git commit -m "chore: release v{version}"

git push -u origin release/v{version}

```

  1. Create the PR using the gh-create-pr skill. If the skill tool is unavailable, read .agents/skills/gh-create-pr/SKILL.md and follow it manually. In CI (non-interactive) mode, skip interactive confirmation steps and create the PR directly after filling the template.
  1. Report the PR URL and next steps.

CI Trigger Chain

Creating a PR from release/v* to main automatically triggers:

Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.