К основному содержанию
скилл CX Codex

goal-release — скилл для Claude Code: релиз от PR до Homebrew

Ведёт релиз целиком: открывает PR, ждёт зелёный CI, мержит и обновляет формулу Homebrew. Пригодится, когда версию надо выпустить одной командой.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add dyoshikawa/rulesync --skill goal-release -a claude-code
Открыть на GitHub

Что делает goal-release

Скилл запускает цепочку из других скиллов. Сначала draft-release создаёт ветку release/v<version> с коммитами бампа версии, открывает pull request в main и черновик GitHub-релиза с заметками. Дальше goal-release ждёт проверки GitHub Actions, при падении чинит их на релизной ветке и пушит, а после зелёного CI вызывает merge-pr — тот перепроверяет состояние PR и мержит через gh pr merge --admin --merge.

Версию можно задать самому или не указывать вовсе. Если передать new_version, она должна попадать в форму ^v?\d+\.\d+\.\d+$, иначе скилл останавливается и сообщает об этом. Без аргумента версию подбирает release-dry-run. На исправление упавших проверок даётся не больше 3 попыток: чинить можно только по-настоящему, подгонять зелёный статус через удаление тестов или правку workflow нельзя.

Последний шаг — формула Homebrew. Скилл дожидается workflow Publish Assets, потом публикации релиза (пока он черновик, ссылки на ассеты отдают 404, и brew install сломается у всех), скачивает SHA256SUMS и пересобирает Formula/rulesync.rb скриптом scripts/generate-homebrew-formula.ts. Изменение уходит отдельным PR. Нужны gh, pnpm и права администратора в репозитории.

Какие задачи решает

  • выпустить релиз от бампа версии до мержа без ручных шагов
  • дождаться зелёного CI и починить упавшие проверки на релизной ветке
  • обновить формулу Homebrew по свежим контрольным суммам
  • не слить формулу раньше, чем релиз перестанет быть черновиком
  • проверить, что мержится именно релизный PR, а не посторонний

Примеры запросов агенту

  • сделай релиз v1.2.3
  • выпусти новую версию целиком, версию выбери сам
  • запусти goal-release и обнови формулу Homebrew

Как установить goal-release

1Через Skills CLI (Vercel)

npx skills add dyoshikawa/rulesync --skill goal-release -a claude-code

2Вручную: положить файлы

~/.claude/skills/goal-release/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/goal-release/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора11

resolve-scrap-issues Скилл проходит по свежим GitHub-issue с меткой maintainer-scrap, проверяет каждую и либо закрывает её, либо открывает один общий PR с исправлениями. CX Codex +1 ★ 1 552звёзд репо rebase-latest-main Скилл проводит агента по шагам: проверить ветку, сделать fetch, ребейзнуть на origin/main и разрулить конфликты. Полезен, когда ветка отстала от main. CX Codex +1 ★ 1 552звёзд репо prs-awaiting-author Показывает открытые пул-реквесты, по которым следующий шаг за автором: упал CI, не отвечены замечания ревью, ждёт ответа вопрос мейнтейнера. CX Codex +1 ★ 1 552звёзд репо porting-another-repository Разбирает фичу в текущем репозитории и правила целевого, а потом пишет план переноса в tmp/ — файлами, которые вы применяете руками. CX Codex +1 ★ 1 552звёзд репо git-worktree-runner Скилл учит агента управлять git worktree через CLI-обёртку gtr: создавать, открывать в редакторе, запускать команды и удалять. CX Codex +1 ★ 1 552звёзд репо draft-issue-to-external-repository Готовит GitHub issue для репозитория, которым вы не владеете: изучает шаблоны и стиль проекта, уточняет замысел с вами и сохраняет текст в файл. CX Codex +1 ★ 1 552звёзд репо create-issue Скилл, который оформляет GitHub issue по шагам: собирает данные, изучает код, пишет описание на английском и ставит метки. Пригодится, когда лень вручную разбираться с шаблоном и gh label list. CX Codex +1 ★ 1 552звёзд репо clean-branches Скилл проходит по локальным веткам git, находит слитые и осиротевшие и удаляет их по одной, с отчётом в конце. CX Codex +1 ★ 1 552звёзд репо

Похожие

release-skills JimLiu Автоматизирует подготовку релизов, анализ коммитов и обновление версий в проектах на Node.js, Python или Rust. Сгенерирует ченджлог и создаст GitHub Release. CX Codex +1 25 600установок release Yeachan-Heo Скилл анализирует конфигурацию CI и файлы версий, сохраняет правила в .omc/RELEASE_RULE.md и проводит релиз по шагам. Помогает избежать ручных ошибок при тегировании и публикациях. CX Codex +1 832установок github-release-management ruvnet Автоматизация релизов на GitHub: от черновика и changelog до сборки и развёртывания. Пригодится, когда версии выходят часто, а ручные шаги уже раздражают. CX Codex +1 1 200установок github-release официальный github Скилл проводит релиз библиотеки в GitHub-репозитории: анализирует изменения, предлагает версию SemVer, готовит changelog и PR. 741установок re0-release LilMGenius Проводит готовое изменение по чек-листу релиза репозитория, а потом по подтверждению ставит тег и публикует. Запускается вручную, когда вы решили выпускать. CX Codex +1 1 200установок autoship mblode Ведёт релиз npm-пакета от changeset до проверки версии в реестре. Полезен, когда CI версионирует, но не публикует. CX Codex +1 623установок

Рядом в теме «DevOps и инфраструктура»

Всё по теме «DevOps и инфраструктура» →

Вопросы о goal-release

Как установить goal-release в Claude?

Выполните npx skills add dyoshikawa/rulesync --skill goal-release -a claude-code. Скилл появится в ~/.claude/skills/goal-release/SKILL.md.

Что делает goal-release?

Проводит релиз до конца: открывает релизный PR и черновик GitHub-релиза через draft-release, ждёт прохождения CI, мержит PR скиллом merge-pr и пересобирает формулу Homebrew из опубликованных ассетов.

Что нужно, чтобы скилл сработал?

Установленные gh и pnpm, а также права администратора в репозитории — мерж идёт через gh pr merge --admin --merge. Если передать версию вручную, она должна совпадать с ^v?\d+\.\d+\.\d+$.

Исходный текст

SKILL.md · MIT
---
name: goal-release
description: >-
  Cut a release end to end: use the `draft-release` skill to open the release PR and draft
  GitHub release, wait for CI to turn green, run the `merge-pr` skill to merge
  the release PR, then update the Homebrew formula from the published release
  assets. Use when the user wants to draft and merge a release in one go, or
  triggers on "the `goal-release` skill".
targets:
  - "*"
---

# Goal Release

new_version = the user's request

This skill drives a release all the way to merge. It uses the `draft-release` skill to
open the release pull request (and create the draft GitHub release), waits for
the PR's CI checks to pass, runs the `merge-pr` skill to merge it, and finally updates
the Homebrew tap formula once the release assets are built.

## 1. Draft the Release

Use the `draft-release` skill with `new_version`.

- If `new_version` is provided (e.g. `v1.2.3` or `1.2.3`), it must match the
  semver shape `^v?\d+\.\d+\.\d+$` — if it does not, stop and report instead
  of passing it on. Pass a valid value through unchanged; the `draft-release` skill
  normalizes the `v` prefix itself.
- If `new_version` is empty, pass no argument; the `draft-release` skill determines the
  next version automatically via the `release-dry-run` skill.

When the `draft-release` skill finishes, it has:

- created a `release/v<version>` branch with the version-bump commits,
- opened a pull request against `main`, and
- created a draft GitHub release `v<version>` with the release notes.

If the `draft-release` skill failed partway (e.g. the PR exists but the draft release
was not created, or it stopped before opening the PR), stop here and report
the partial state to the user instead of continuing.

## 2. Resolve the Release PR

Use the PR number or URL that the `draft-release` skill's `gh pr create` printed in
Step 1 when available. Otherwise, identify the pull request from the current
`release/v<version>` branch:

```bash
gh pr view --json number,title,state,headRefName
```

Confirm that `headRefName` matches the `release/v<version>` branch created in
Step 1. This skill must only ever merge that release PR — if the resolved PR
is a different one, stop and report to the user instead of merging.

## 3. Wait for CI

Wait for the release PR's GitHub Actions checks to finish:

```bash
gh pr checks <pr_number> --watch
```

If the watch reports that no checks are registered yet, wait a moment and
retry — checks can take a few seconds to appear right after the PR is opened.

- If every check passes, proceed to Step 4.
- If a check fails, investigate and fix the failure on the release branch
  (run `pnpm cicheck` locally, commit, and push), then wait for the re-run.
  Never proceed to the merge while any check is `fail` or `pending`.
- Fixes must legitimately resolve the failure. Never make a check green by
  skipping or deleting tests, weakening lint or type-check configuration, or
  editing GitHub Actions workflows.
- Set a safety cap of **3** fix attempts. If CI is still red after the cap,
  stop and report the failing checks to the user instead of merging.

If any fix commit beyond the `draft-release` skill's own version-bump commits was
pushed, review the extra commits yourself instead of stopping: merge when each
one is a legitimate CI fix (it does not skip or delete tests, weaken lint or
type-check configuration, touch `.github/**`, or add a runtime dependency) and
CI is green, and list the extra commits in the final report. If any extra
commit fails that check, stop and report it instead of merging.

## 4. Merge the Release PR

Use the `merge-pr` skill with the release PR number. It re-verifies the PR
state and CI status, merges with `gh pr merge --admin --merge`, posts a
thank-you comment, and cleans up the local branch.

Note: the `goal-pr` skill tells agents not to auto-merge PRs that touch `package.json`
or release configuration. That restriction does not apply here — merging the
version-bump release PR is this skill's explicit purpose, and the user opted
into it by invoking the `goal-release` skill.

## 5. Update the Homebrew Formula

After the release PR merges, the `Publish Assets` workflow builds the platform
binaries, tags the release, and uploads the assets (including `SHA256SUMS`) to
the draft GitHub release. The Homebrew formula embeds those checksums, so it
can only be regenerated once that workflow finishes — this step replaces the
old `homebrew` job that `.github/workflows/publish.yml` used to run.

1. Wait for the `Publish Assets` run triggered by the merge to complete:

   ```bash
   gh run list --workflow "Publish Assets" --branch "release/v<version>" \
     --limit 1 --json databaseId,status,conclusion,headBranch
   gh run watch <run_id>
   ```

   The workflow triggers on every closed PR to `main` (non-release runs are
   job-level skipped but still listed), so filter by the release branch as
   shown. The run can take a few seconds to appear right after the merge — if
   the list is empty, wait and retry. Confirm the watched run belongs to this
   release (its `headBranch` is the `release/v<version>` branch of the PR
   merged in Step 4) and concluded with `success`. If it failed, stop and
   report — the formula must not be regenerated from stale assets.

2. Wait until the GitHub release is published (no longer a draft). The
   `Publish` workflow (`.github/workflows/publish.yml`) runs after
   `Publish Assets`, publishes the npm package, and then flips the release
   public. Draft-release asset URLs return 404 for unauthenticated users, and
   the Homebrew tap serves the formula straight from `main`, so merging the
   formula before the release is public would break `brew install` for
   everyone:

   ```bash
   gh release view v<version> --json isDraft --jq .isDraft
   ```

   Poll until this prints `false`. If the `Publish` workflow failed (e.g. npm
   publish error) and the release stays a draft, stop and report instead of
   updating the formula.

3. Regenerate the formula from the released checksums:

   ```bash
   git checkout main && git pull
   gh release download v<version> --pattern SHA256SUMS --dir ./tmp --clobber
   pnpm exec tsx scripts/generate-homebrew-formula.ts <version> ./tmp/SHA256SUMS Formula/rulesync.rb
   rm -f ./tmp/SHA256SUMS
   ```

4. If `git diff --quiet -- Formula/rulesync.rb` reports no change, the formula
   is already up to date — skip ahead to the final report.

5. Otherwise commit the regenerated formula on a branch and merge it right
   away (`main` is branch-protected, so the change must land via a PR; merging
   it immediately with admin rights is this skill's explicit purpose, same
   as the release PR itself):

   ```bash
   git switch -c homebrew-formula/v<version>
   git add Formula/rulesync.rb
   git commit -m "chore: update Homebrew formula to v<version>"
   git push -u origin homebrew-formula/v<version>
   gh pr create --base main --title "chore: update Homebrew formula to v<version>" \
     --body "Automated formula update for the v<version> release."
   gh pr merge --admin --merge --delete-branch
   ```

   If a previous attempt already pushed the `homebrew-formula/v<version>`
   branch or opened its PR, reuse them instead of failing: force-push the
   branch with `git push --force-with-lease` and skip `gh pr create` when
   `gh pr list --head homebrew-formula/v<version>` shows an open PR.

   Only `Formula/rulesync.rb` may be committed here. If anything else shows up
   in `git status`, stop and report instead of committing it.

## 6. Final Report

Report to the user:

- The merged release PR number and title.
- The new version and a link to the GitHub release (published automatically by
  the `Publish` workflow, which Step 5 waits for).
- Whether the Homebrew formula was updated (and the formula PR number) or was
  already up to date.
- Any CI fixes that were needed along the way.

© dyoshikawa · MIT · dyoshikawa/rulesync

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой