Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

prepare-release

БесплатноБез исполняемых скриптовНе проверен

Prepare a new release by collecting commits, generating bilingual release notes, updating version files, and creating a release branch. Use when asked to…

CherryHQот CherryHQ★ 54 038 звёзд на GitHub

Об этом скилле

Prepare Release

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

Arguments

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

  • Bump type keyword: patch, minor, major
  • Exact version: strict x.y.z or x.y.z-<prerelease> without build metadata (e.g. 1.8.0, 1.8.0-beta.1, 1.8.0-rc.1)
  • Natural language: "prepare a beta release", "bump to 1.8.0-rc.2", etc.

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

  • --dry-run: Preview only, do not create a release branch.

Workflow

Step 1: Determine Version

  1. For an interactive local run, fetch origin/main and all tags, then verify that the checkout is a clean main at exactly origin/main:
    git fetch origin refs/heads/main:refs/remotes/origin/main --tags
    test "$(git branch --show-current)" = main
    test -z "$(git status --porcelain)"
    test "$(git rev-parse HEAD)" = "$(git rev-parse origin/main)"
    
    Stop before editing files if any check fails. This prevents a standalone run from creating a release branch from an arbitrary or stale checkout. In GitHub Actions, use the workflow's frozen dispatch SHA and leave checkout validation to the workflow. Do not fetch or compare the later origin/main head.
  2. Read the current version from package.json. Use it for version increments even if that release has since been withdrawn; never reuse the withdrawn version.
  3. Select the latest published, non-draft GitHub Release whose tag is strict v<semver> as the release-note baseline. Non-semver preview releases and drafts are never a baseline:
    gh release list --limit 1000 --json isDraft,publishedAt,tagName --jq '[.[] | select(.isDraft == false and (.tagName | test("^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$")))] | sort_by(.publishedAt) | last | .tagName // empty'
    
    Stop if no published baseline exists or its Git tag is missing (git rev-parse --verify refs/tags/{baseline-tag}). Compare its version with the current package version using semver: if main is behind, stop and require the latest Post Release metadata PR to be merged. If main is ahead, allow preparation using the published baseline for release notes and the package version for version increments. For example, after withdrawing 2.1.1, main at 2.1.1 with a published baseline of 2.1.0 prepares 2.1.2 and includes changes since 2.1.0. In GitHub Actions, use the workflow-provided baseline tag and collection base without repeating these checks.
  4. Compute the new version based on the argument:
    • patch / minor / major: bump from the current version.
    • An exact version must match ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ and pass semver.valid; build metadata such as +build.1 is not accepted.
    • In both cases, require the result to be strictly greater than the current version according to semver precedence. Reject equal versions and downgrades.

Step 2: Collect Commits

  1. Determine the release-note collection base from the published baseline selected in Step 1, not from the package version:
    • If the baseline tag is an ancestor of HEAD, use the tag.
    • Otherwise, use the latest commit whose full message contains the exact marker release-metadata-boundary: <baseline-tag>. This machine marker is added to the Post Release pull request body and survives the required squash merge.
    • For metadata pull requests created before the machine marker existed, accept a subject exactly equal to chore(release): sync <baseline-tag> metadata or that subject followed only by GitHub's squash suffix (#<PR-number>).
    • Stop with an error if the tag is not an ancestor and its metadata sync commit is missing; otherwise already-released hotfixes could be included again.
  2. List all commits since that base:
    git log <collection-base>..HEAD --format="%H %s" --no-merges
    
  3. For each commit, get the full body:
    git log <hash> -1 --format="%B"
    
  4. Extract the content inside ```release-note code blocks from each commit body.
  5. Extract the conventional commit type from the title (feat, fix, refactor, perf, docs, etc.).
  6. Skip these commits as standalone release-note candidates, but still inspect their effects when reconciling candidates with the final code in Step 3:
    • Titles starting with 🤖 Daily Auto I18N
    • Titles starting with Merge
    • Titles starting with chore(deps)
    • Titles starting with chore: release
    • Titles starting with chore(release)
    • Commits where the release-note block says NONE

Step 3: Generate Bilingual Release Notes

Generate release notes in both English and Chinese from the final user-visible chang

Полный SKILL.md на GitHub

Установить prepare-release в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл prepare-release?

Prepare a new release by collecting commits, generating bilingual release notes, updating version files, and creating a release branch. Use when asked to prepare/create a release, bump version, or run `/prepare-release`.

Как установить скилл prepare-release?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл prepare-release запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить prepare-release с