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

capgo-release-management — скилл для Claude Code: OTA-релизы Capgo

Скилл ведёт релизы Capgo из CLI: загрузка бандлов, каналы, постепенный выкат, откат и шифрование. Пригодится, когда релиз ломается на загрузке или нужно откатить бандл.

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

Что делает capgo-release-management

Скилл закрывает операции с OTA-бандлами Capgo через @capgo/cli. Внутри — карта команд: bundle upload с каналами, delta, rollout и шифрованием, проверки bundle compatibility и bundle releaseType, работа с каналами (channel add/set/promote/currentBundle/delete), постепенный выкат и откат, bundle cleanup, QR-коды для превью и настройка ключей шифрования через key create и key save.

Порядок работы такой: сначала посмотреть, что сейчас живёт на канале, и получить вердикт OTA или native. Если вердикт native, скилл останавливается и передаёт дело нативным сборкам. Дальше загрузка, продвижение staging в production, выкат долей трафика. Откат делается через channel set production --bundle <версия> или --rollout-rollback во время выката.

Есть ловушки. На канале с настроенным rollout обычный bundle upload --channel production меняет цель выката, а стабильная версия остаётся прежней — заменять её нужно явно через channel set --bundle. Флаг bundle cleanup --ignore-channel удаляет и связанные каналы, так что без спроса его не добавляют. bundle delete необратим, и удалённую версию нельзя использовать снова. Для шифрования приватный ключ .capgo_key_v2 держат в секретах CI и добавляют в .gitignore; смена ключа требует новой нативной сборки, иначе устройства падают с key_id_mismatch.

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

  • загрузить бандл в канал и связать его с версией
  • проверить, безопасно ли изменение для OTA, до публикации
  • продвинуть staging в production без ручной сверки
  • откатить плохой релиз на предыдущую версию
  • почистить старые бандлы, оставив несколько последних

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

  • загрузи бандл из ./dist в канал staging и покажи текущую версию
  • проверь через bundle releaseType, безопасен ли этот релиз для OTA
  • откати production на версию 1.4.2

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

1Через Skills CLI (Vercel)

npx skills add Cap-go/capgo-skills --skill capgo-release-management -a claude-code

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

~/.claude/skills/capgo-release-management/SKILL.md

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

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

Вопросы о capgo-release-management

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

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

Что делает capgo-release-management?

Проводит операции с OTA-бандлами Capgo через CLI: загрузку, проверки совместимости, каналы, постепенный выкат, откат, очистку и настройку ключей шифрования.

Что нужно для шифрования бандлов?

Создайте ключи через key create, затем синхронизируйте проект командой npx cap sync, чтобы публичный ключ попал в нативное приложение. Приватный ключ .capgo_key_v2 храните в секретах CI и не коммитьте.

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

SKILL.md · MIT
---
name: capgo-release-management
description: Runs Capgo OTA release operations with the CLI, including `bundle upload` (channels, delta, rollout, encryption, version bumps), `bundle compatibility` and `releaseType` checks, `channel add/set/promote/currentBundle/delete`, progressive rollouts and rollback, `bundle cleanup`, preview QR codes, and `key create/save` encryption setup. Use when the user ships, promotes, rolls back, or cleans up Capgo bundles, or hits upload errors such as "Version X already exists", "Bundle NOT compatible with <channel> channel", or "Cannot upload the same bundle content". Do not use for updater plugin wiring in app code (capgo-live-updates), native binaries (capgo-native-builds), or org/member administration (capgo-organization-management).
---

# Capgo Release Management

Ship, promote, roll back, and clean up Capgo OTA bundles from the CLI.

Facts below were checked against `@capgo/cli` 8.77 (October 2026). Every command accepts `-a, --apikey`. The `appId` can be omitted inside a Capacitor project.

## When to Use

TRIGGER when:

- The user uploads, lists, deletes, or cleans up bundles, or asks which version a channel serves.
- The user creates or configures channels, promotes staging to production, starts, pauses, or rolls back a progressive rollout, or rolls back a bad release.
- The user asks whether a change is OTA-safe (`bundle compatibility`, `bundle releaseType`).
- The user sets up bundle encryption (`key create`, `key save`, `--key-v2`).

Do not use when:

- The work is app-side updater code or config (`notifyAppReady`, `autoUpdate`, `setChannel`). Use `capgo-live-updates`.
- A native binary is needed. Use `capgo-native-builds`.
- The user manages organizations, members, 2FA, or API-key policy. Use `capgo-organization-management`.
- The user wants an end-to-end release pipeline design. Use `capgo-release-workflows`.

## Command Map

| Goal | Command |
| --- | --- |
| Upload and link | `bundle upload [appId] --path ./dist --channel production` (comma-separate several channels) |
| Is it OTA-safe? | `bundle releaseType [appId] --channel production` prints `OTA` or `native` |
| Detailed native diff | `bundle compatibility [appId] --channel production [--text]` |
| What is live | `channel currentBundle production [appId] --quiet` |
| Promote | `channel promote staging production [appId]` |
| Roll back | `channel set production [appId] --bundle <previous-version>` |
| Rollout | `bundle upload ... --rollout 10`, then `channel set ... --rollout-percentage 50` / `--rollout-promote` / `--rollout-rollback` |
| Create channel | `channel add beta [appId] [--default] [--self-assign]` |
| Channel policy | `channel set <ch> --disable-auto-update major\|minor\|patch\|metadata\|none` plus `--ios/--android/--dev/--prod/--emulator/--device` toggles |
| List | `bundle list [appId]`, `channel list [appId]` |
| Clean up | `bundle cleanup [appId] --bundle 1.0 --keep 3` |
| Delete | `bundle delete <version> [appId]`, `channel delete <ch> [appId]` |
| Preview QR | `app set [appId] --preview` once, then `get-qr [appId] --channel beta` or `bundle upload ... --qr-preview` |
| Encryption keys | `key create`, `key save --key ./.capgo_key_v2.pub`, `key delete_old` |
| Custom zip / external | `bundle zip [appId] --json`, `bundle encrypt <zip> <checksum>`, `bundle upload --external <url>` |

All of these are `npx @capgo/cli@latest <command>`. Commands that do **not** exist (they come from old docs or other tools): `channel create`, `bundle revert`, `upload --sign`, `key verify`, and a top-level `capgo upload` without `bundle`.

## Procedure

### 1. Inspect first

```bash
npx @capgo/cli@latest channel list com.example.app
npx @capgo/cli@latest channel currentBundle production com.example.app --quiet
npx @capgo/cli@latest bundle releaseType com.example.app --channel production
```

Report the current live version and the OTA/native verdict before you change anything. If the verdict is `native`, stop and hand off to `capgo-native-builds` (or the user's native pipeline).

### 2. Upload

```bash
npm run build
npx @capgo/cli@latest bundle upload com.example.app --path ./dist --channel staging --comment "$(git rev-parse --short HEAD)"
```

- The version comes from `package.json` unless you pass `--bundle <semver>`. It must be unique, greater than `0.0.0`, and never a previously deleted version.
- Use `--delta` for instant-apply apps. The CLI refuses delta uploads with more than 10,000 files. Use `--no-delta` in that case.
- Use `--fail-on-incompatible` in CI. Use `--accept-incompatible` only when the JS guards missing plugins. These two flags and `--ignore-metadata-check` cannot be combined.

### 3. Promote and roll out

- Promote: `npx @capgo/cli@latest channel promote staging production com.example.app`. It runs the same compatibility checks as `channel set --bundle`.
- Gradual rollout: upload with `--rollout <pct>`, then watch the stats before you run `--rollout-promote`.
- Only change which channel is the **default** (`channel set <ch> --state default`, or `channel add --default`) when the user explicitly wants to move production traffic.

### 4. Roll back

```bash
npx @capgo/cli@latest bundle list com.example.app
npx @capgo/cli@latest channel set production com.example.app --bundle 1.4.2
# or, during a rollout:
npx @capgo/cli@latest channel set production com.example.app --rollout-rollback
```

Devices pick up the change on their next update check.

### 5. Encryption (optional, for sensitive apps)

```bash
npx @capgo/cli@latest key create        # writes .capgo_key_v2 (private) + .capgo_key_v2.pub, saves the public key to config
npx cap sync                             # the public key must ship in the native app
npx @capgo/cli@latest bundle upload com.example.app --key-v2 ./.capgo_key_v2 --channel production
```

In CI, keep the private key in the CI secret store, write it to `./.capgo_key_v2` in the job, and pass the same `--key-v2 ./.capgo_key_v2`. The private key never leaves the runner. Add `.capgo_key_v2` to `.gitignore` and never commit it. A changed key needs a new native build: devices with the old `publicKey` fail with `key_id_mismatch`.

## Traps

- On a channel that has a rollout configured, a plain `bundle upload --channel production` sets the **rollout target**, and stable is unchanged. Replace stable explicitly with `channel set --bundle`.
- `bundle cleanup --ignore-channel` also deletes the linked channels. Never add it without asking.
- `bundle delete` is permanent, and the deleted version cannot be reused. Prefer relinking an older bundle to roll back.
- `releaseType` only sees native package metadata, not raw `ios/` or `android/` edits.
- `--self-assign` on upload changes the channel's settings, not just this bundle.

## Verification

1. `npx @capgo/cli@latest channel currentBundle production com.example.app --quiet` prints the expected version.
2. `npx @capgo/cli@latest probe --platform ios` (run in the project) reports whether an update would be served.
3. `npx @capgo/cli@latest app debug com.example.app` shows a test device downloading and setting the bundle.
4. For encrypted uploads, a device on the new native build applies the update with no `key_id_mismatch` error.

## Error Handling

| String | Fix |
| --- | --- |
| `❌ Version X already exists` | Bump `--bundle`, use `--auto-bump patch`, or pass `--version-exists-ok` in CI re-runs |
| `Cannot upload the same bundle content` | The checksum is already on that channel. Rebuild with changes, or pass `--ignore-checksum-check` |
| `Bundle NOT compatible with <channel> channel` | Native packages differ. Do a native build first, or use `--accept-incompatible` if the code guards it |
| `notifyAppReady() is missing in the build folder (...)` | Fix the app entry point (see `capgo-live-updates`) |
| `index.html is missing in the root folder of <dir>` | Wrong `--path` |
| `Cannot find channel <name>` | Check `channel list`. Names are case sensitive |
| `Channel strategy <x> is not known` | Use `major`, `minor`, `patch`, `metadata`, or `none` |
| `No Capgo API key found. Run ... first, then retry this command.` | `npx @capgo/cli@latest login`, set `CAPGO_TOKEN`, or pass `-a` |
| `Insufficient permissions for <key>` | The API key role is too low for this app. Ask an admin for an upload-capable key |
| `Cannot upload bundle ( try again with --tus option)` | Retry with `--tus`, and raise `--timeout` for large bundles |

## Resources

- Bundle reference: https://capgo.app/docs/cli/reference/bundle/
- Channel reference: https://capgo.app/docs/cli/reference/channel/
- Progressive rollouts: https://capgo.app/docs/live-updates/progressive-rollouts/
- Encryption: https://capgo.app/docs/live-updates/encryption/
- Compatibility: https://capgo.app/docs/live-updates/compatibility/

© Cap-go · MIT · Cap-go/capgo-skills

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

Всё по теме «Мобильная разработка» →
capgo-cloud-migration capawesome-team Ведёт агента через перенос Capacitor-проекта с Capgo на Capawesome Cloud: находит следы Capgo и меняет плагин, конфиг, каналы и CI/CD. CX Codex +1 409установок github-release-management ruvnet Автоматизация релизов на GitHub: от черновика и changelog до сборки и развёртывания. Пригодится, когда версии выходят часто, а ручные шаги уже раздражают. CX Codex +1 1 200установок capawesome-cloud capawesome-team Скилл проводит агента через настройку Capawesome Cloud: облачные сборки iOS и Android, OTA-обновления и автопубликация в App Store и Google Play. CX Codex +1 840установок release cyrusagents Скилл проводит релиз Cyrus CLI через trusted-publishing: подготовка, проверка, публикация и финал. Пригодится, когда нужно выпустить версию, не трогая пакеты руками. CX Codex +1 829установок release-skills JimLiu Автоматизирует подготовку релизов, анализ коммитов и обновление версий в проектах на Node.js, Python или Rust. Сгенерирует ченджлог и создаст GitHub Release. CX Codex +1 25 600установок cmux-release manaflow-ai Автоматизирует подготовку релизов cmux: собирает журнал изменений из пулл-реквестов и обновляет версии проекта. CX Codex +1 4 700установок

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

cocoapods-to-spm Переводит iOS-проект Capacitor с CocoaPods на Swift Package Manager и подсказывает, что делать с плагинами без Package.swift. CX Codex +1 796установок capacitor-app-upgrades Ведёт приложение на Capacitor через мажорные версии по одной, с обязательным шагом UIScene для iOS перед Capacitor 9. CX Codex +1 771установок capacitor-plugin-upgrades Ведёт плагин Capacitor через один или несколько мажорных апгрейдов, от 4 до 9, с аудитом iOS UIScene. Пригодится мейнтейнерам, у которых peerDependencies отстали от приложения. CX Codex +1 730установок sqlite-to-fast-sql Переносит Capacitor-приложение с bridge-плагинов SQLite на @capgo/capacitor-fast-sql, сохраняя данные, транзакции и BLOB. CX Codex +1 706установок capacitor-app-upgrade-v7-to-v8 Ведёт приложение на Capacitor 7 к восьмой версии: сначала npx cap migrate, потом ручной чек-лист по iOS и Android. CX Codex +1 704установок webapp-to-capacitor Планирует и выполняет превращение веб-приложения, PWA или SPA в приложение под iOS и Android на Capacitor, которое проходит ревью магазинов. CX Codex +1 665установок ionic-appflow-migration Переводит Ionic или Capacitor проект с Ionic Appflow на Capgo: живые обновления, сборки и публикация в стор. CX Codex +1 653установок capacitor-app-upgrade-v6-to-v7 Ведёт приложение на Capacitor с версии 6 на 7: сначала автоматическая миграция, потом ручной чек-лист по iOS, Android и плагинам. CX Codex +1 643установок

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

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