Shorebird OTA Patch Distribution

VerifiedSafe

Create and distribute Shorebird OTA patches via staging, verify, then promote to stable.

Sby Skills Guide Bot
DevelopmentIntermediate
107/23/2026
Claude Code
#shorebird#ota-patches#flutter#mobile-deployment#patch-management

Recommended for

Our review

Creates and promotes Shorebird OTA patches (staging → stable) for Flutter mobile apps.

Strengths

  • Full automation of the OTA patch pipeline (creation, verification, promotion).
  • Handles patches for both iOS and Android with asset change checks.
  • Detects and reports asset diff warnings that prevent patch application.
  • Clear verification and rollback procedure (preview, debug screen).

Limitations

  • Requires Shorebird setup and proper environment privileges.
  • Patches with asset changes (fonts, images) require a full new release.
  • Does not handle new version releases (requires separate skill).
When to use it

When you need to quickly deploy a hotfix for a Flutter mobile app in production via OTA.

When not to use it

For major changes or asset modifications; instead, use /release-mobile for a full deployment.

Security analysis

Safe
Quality score92/100

The skill uses Bash to run project-local scripts for Shorebird OTA patching, a legitimate development workflow. There is no downloading of external content, no exfiltration, and no destructive commands. The risk is limited to the intended use of Shorebird and related tools.

No concerns found

Examples

Patch Android staging
Create a Shorebird OTA patch for Android to staging for version 1.2.3+4.
Promote patch to stable
Promote Shorebird patch 5 for version 1.2.3+4 from staging to stable.
Patch both platforms and promote
Create OTA patches for both iOS and Android for version 2.0.1+7, verify them, then promote to stable if successful.

name: shorebird-patch description: Shorebird OTA パッチの作成・配布(staging → promote → stable) disable-model-invocation: true allowed-tools: Bash(bash:), Bash(shorebird:), Bash(dart:), Bash(xcrun:), Bash(grep:*), Read

Shorebird パッチ配布

Shorebird OTA パッチを staging に作成し、検証後に stable へ昇格する。

新バージョンのリリース/release-mobile スキルを使用する。 アセット差分でパッチが適用されない場合も、/release-mobile でリリース後に再パッチする。

フロー概要

patch (staging) → デバッグ画面で検証 → promote (stable) → 全ユーザーに配信

パッチ手順

1. バージョン確認

grep '^version:' apps/mobile/pubspec.yaml

version: X.Y.Z+N の値を記録する(= <version>)。

2. パッチ作成 (staging)

引数でプラットフォームが指定された場合はそのまま使う。指定がなければユーザーに確認する。

# iOS
bash .claude/skills/shorebird-patch/patch.sh ios <version>

# Android
bash .claude/skills/shorebird-patch/patch.sh android <version>

# 両方の場合は順番に実行

スクリプトが以下を一括で行う:

  • shorebird patchstaging にパッチ作成
  • --allow-asset-diffs によりアセット変更の確認プロンプトを自動スキップ

完了後の出力から パッチ番号 を記録する(= <patch-number>)。

3. アセット差分の検証(重要)

パッチ出力に以下の警告が含まれていないか確認する:

[WARN] Your app contains asset changes, which will not be included in the patch.

この警告が出た場合、パッチは publish されるが実機に適用されない可能性が高い。

対処法

アセット差分が検出された場合、ユーザーに以下を報告する:

  1. 警告内容: どのファイルにアセット差分があるか(例: MaterialIcons-Regular.otf
  2. 影響: パッチは作成されるが、デバイスでダウンロード後に適用されない
  3. 推奨対応: /release-mobile で新リリースを作成してから、クリーンな状態でパッチを再作成する

4. 検証(staging)

パッチが staging に配信されたら、以下の方法で検証する:

  • ローカル: shorebird preview --track=staging --release-version=<version>
  • 実機(TestFlight等): アプリのデバッグ画面(ロゴ5連打)→ Update Track を Staging に変更 → アプリ再起動

5. Promote (staging → stable)

検証が問題なければ stable に昇格する:

bash .claude/skills/shorebird-patch/promote.sh <version> <patch-number>

6. 完了報告

以下を報告する:

  • パッチ番号
  • 対象プラットフォーム
  • リリースバージョン
  • トラック: staging → promote 前 / stable → promote 後
  • アセット差分: あり/なし(ありの場合は警告を明記)

npm scripts

npm run shorebird:patch:android -- <release-version>
npm run shorebird:patch:ios -- <release-version>
npm run shorebird:promote -- <release-version> <patch-number>

トラブルシュート

  • アセット差分でパッチが適用されない: --allow-asset-diffs でパッチ作成は成功するが、アセット変更(フォント、画像等)を含むパッチは実機で適用に失敗する。/release-mobile で新リリースが必要
  • 署名エラー(exportArchive): IPA生成時のエラーはShorebirdパッチ自体には影響しない。パッチが Published Patch N! と表示されていれば成功
  • インタラクティブプロンプト: shorebird コマンドを直接実行する場合は --release-version フラグ必須(省略するとインタラクティブプロンプトで非TTY環境がエラーになる)
  • パッチが反映されない場合の確認: 設定画面のバージョン表示で (patch N) が出ているか確認。出ていなければShorebirdリリースビルドでない可能性がある
  • staging パッチの確認方法: デバッグ画面(ロゴ5連打)→ Update Track を Staging に変更 → アプリ再起動
Related skills