• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

integrate-revenuecat

プラグイン
rc
ソース
GitHub で見る ↗
説明

RevenueCat(アプリ内課金管理サービス)の統合設定 — ダッシュボード側をRevenueCat MCP(拡張機能)または`rc`コマンドラインツール(プロジェクト・アプリ・公開APIキーの設定)で準備し、アプリ側にPurchases SDK(購入処理ライブラリ)をインストール・設定します。 次のような場合に使用: - ユーザーがRevenueCatの追加を依頼した - Purchasesの統合を求められた - RevenueCat SDKのインストールを依頼された - RevenueCat APIキーの設定を依頼された - アプリ起動時のPurchases設定を依頼された - iOS・Android・Kotlin Multiplatform・Flutter・React Nativeで新規のRevenueCat統合セットアップを依頼された

原文を表示

End-to-end RevenueCat integration — sets up the dashboard side via the RevenueCat MCP or the `rc` CLI (project, app, public API key) and installs/configures the Purchases SDK in the app. Use when the user asks to add RevenueCat, integrate Purchases, install the RevenueCat SDK, set up a RevenueCat API key, configure Purchases on launch, or set up a brand new RevenueCat integration on iOS, Android, Kotlin Multiplatform, Flutter, or React Native.

ユースケース
  • RevenueCatの追加を依頼された
  • Purchasesの統合を求められた
  • RevenueCat SDKのインストール依頼
  • RevenueCat APIキーの設定依頼
  • アプリ起動時のPurchases設定依頼
本文(日本語訳)

integrate-revenuecat: RevenueCat統合の完全ガイド

次のような場合に使用: ユーザーがはじめてプロジェクトにRevenueCatを追加する場合、または公開APIキーでSDK(ソフトウェア開発キット)を再設定する場合。このスキルは2つの部分に分かれています:

  1. ダッシュボード側 — プロジェクトの設定、アプリの登録、公開APIキーの取得をRevenueCat MCPサーバーまたは rc CLIを通じて実行します。
  2. アプリ側 — Purchases SDKをインストール、アプリ起動時に Purchases.configure(…) を呼び出し、ログで設定が完了したことを確認します。

この順序で進めてください。ユーザーが「SDKをインストールするだけ」と言った場合でも、ほとんどの統合では両方の部分が必要です。SDKはダッシュボードからのAPIキーが必要だからです。

プロジェクトとアプリが既に存在し、ユーザーがSDKをコードに接続したいだけの場合は、以下の「セクション3」にスキップしてください。 ユーザーがRevenueCatプロジェクト全体を新規作成したい場合(アプリ、商品、機能権、オファー含む)は、代わりに create-revenuecat-project スキルを使用し、その後ここに戻ってSDKインストールを行ってください。

引数

スラッシュコマンドで実行した際に $ARGUMENTS として利用可能:

  • platform(省略可能): ios、android、kmp、flutter、react-native のいずれか。省略した場合は、セクション3aの検出アルゴリズムを実行します。
  • app_identifier(省略可能): iOS用のBundle IDまたはAndroid用のパッケージ名。省略した場合は、プロジェクトファイル(Info.plist、AndroidManifest.xml、app.json、pubspec.yaml)から読み込みます。
  • project_name(省略可能): 使用するRevenueCatプロジェクトの名前。省略した場合は、プロジェクトを一覧表示(MCPまたは rc projects list 経由)してユーザーに選んでもらいます。

1. 現状把握

ダッシュボードに手を加える前に、以下の情報を収集します:

  • プラットフォーム: iOS・App Store、Android・Google Play、またはその両方。作業ディレクトリを確認してください。セクション3の検出アルゴリズムで、ほとんどのプロジェクトは自動判定できます。
  • テクノロジー: ネイティブiOS(Swift)、ネイティブAndroid(Kotlin・Java)、React Native、Flutter、Kotlin Multiplatform。SDKリスト: https://www.revenuecat.com/docs/getting-started/installation.md
  • アプリ識別子: iOS用のBundle ID、Android用のパッケージ名。Info.plist や AndroidManifest.xml、app.json、pubspec.yaml から取得してください。ユーザーに聞かないようにしましょう。

2. ダッシュボード側

ユーザーが利用できるツールを使用します: RevenueCat MCPサーバーまたは rc CLI(CLIの詳細は revenuecat-cli スキルを参照)。両ツールは同じ操作をカバーしており、以下の各ステップでMCPツールと rc コマンドを記載しています。

2a. プロジェクトの取得または作成

  • アクセス可能なプロジェクトを一覧表示: list-projects(MCP)または rc projects list。複数ある場合は、このアプリに適したプロジェクトをユーザーに選んでもらうか、新規作成を提案してください(create-project / rc projects create)。
  • プロジェクトがない場合は、create-revenuecat-project スキルに引き継ぎ、その後ここに戻ります。
  • 以降のステップで使用するため project_id を保存しておきます。

2b. アプリの取得または作成

  • プロジェクト内で既に設定されているアプリを確認します(list-apps / rc apps list)。test_store アプリは常に存在します。app_store と play_store アプリは、ユーザーがストア側の設定を完了した場合のみ存在します。
  • ユーザーのアプリが既にApp Store ConnectまたはGoogle Play Consoleで設定されているかを確認します。ストア側の設定は後からでも可能なこと、今は test_store アプリで統合を開始できることを安心させてください。
  • ユーザーがストア側の設定が完了していることを確認した場合、create-app を呼び出します(または rc apps create):
    • iOS: type: "app_store"、bundle_id はセクション1から取得。
    • Android: type: "play_store"、package_name はセクション1から取得。
    • name は識別子から導き出すか、ユーザーに入力してもらいます。

2c. 公開APIキーの取得

  • 対象アプリIDの公開キーを一覧表示: list-public-api-keys(MCP)または rc apps keys <app-id>:
    • ストア側アプリが存在する場合は app_store / play_store。
    • 存在しない場合は test_store アプリ。
  • 返されたキーは公開キーで、クライアントアプリコードに埋め込んでも安全です。iOSキーは appl_… で始まり、Androidキーは goog_…、Amazonは amzn_… で始まります。

秘密APIキーをクライアントコードに使用しないでください。 秘密キーはサーバー側のみの使用です。

3. アプリ側 — SDKのインストールと設定

3a. プラットフォームの検出

作業ディレクトリを確認し、上から順に最初にマッチするものを選択します:

  1. React Native: package.json に react-native-purchases エントリがある、または react-native が依存ライブラリとして指定されている → platforms/react-native.md を読みます。expo も依存ライブラリにある場合は、Expoプロジェクトとしてメモしておきます。
  2. Flutter: プロジェクトルートに pubspec.yaml が存在 → platforms/flutter.md を読みます。
  3. Kotlin Multiplatform: build.gradle.kts にKotlin マルチプラットフォーム(複数のプラットフォーム対応)のソースセットブロック kotlin { … } が含まれている、または com.revenuecat.purchases:purchases-kmp* に依存している → platforms/kmp.md を読みます。
  4. Android(ネイティブ): build.gradle(.kts) が com.android.application を適用しており、KMPではない → platforms/android.md を読みます。
  5. iOS(ネイティブ): プロジェクトルートに Package.swift、*.xcodeproj、*.xcworkspace、または Podfile が存在 → platforms/ios.md を読みます。

複数にマッチする場合(例えば、Flutterプロジェクト内の ios/ フォルダ)は、最も外側のプロジェクト(ビルドの所有者)を選択します。それでも判断がつかない場合は、ユーザーにどのプラットフォームを設定するか聞いてください。

3b. 全プラットフォーム共通の概念

  • 公開SDKキー、秘密キーではない。 RevenueCatはストア・プラットフォームごとに個別の公開SDKキーを発行します。iOSアプリは appl_… キーを、AndroidアプリはGoogleア goog_… キーを使用します(AmazonはAmazo amzn_… 使用)。サーバー側の秘密キーはクライアントアプリに絶対に表示されてはいけません。
  • アプリ起動時に1回だけ設定。 Purchases.configure(…) はアプリの起動ポイント(できるだけ早く)に正確に1回呼び出します。その後の呼び出しは無視されるか警告が出ます。
  • デフォルトは匿名ユーザー。 appUserID を渡さない場合、RevenueCatは安定した匿名IDを生成します。アプリ起動時に既に認証されたユーザーがいる場合のみ appUserID を渡します。そうでない場合は、後から logIn(…) を呼び出します(revenuecat-identify-user スキルを参照)。
  • 統合中はデバッグログを有効に。 各プラットフォームファイルに方法を記載しています。本番ビルドではオフにしてください。
  • キーをソース管理外に。 ユーザーが秘密管理について質問した場合、.env(RN)、xcconfig(iOS)、local.properties / gradle.properties(Android)、またはdart-define(Flutter)を推奨します。

3c. 実装

検出に一致するプラットフォームファイルを読みます:

  • platforms/ios.md
  • platforms/android.md
  • platforms/kmp.md
  • platforms/flutter.md
  • platforms/react-native.md

各プラットフォームファイルは自己完結しています: インストールコマンド、正確な configure スニペット、アプリエントリーポイント内での配置場所が記載されています。

4. 検証

以下のすべてが完了するまで、セットアップが完了したと言わないでください:

  1. プロジェクトがビルドできる(Xcodeビルド、./gradlew assembleDebug、flutter run、npx react-native run-ios、またはKMPの同等コマンド)。
  2. アプリが起動し、RevenueCat SDKがコンソール・logcat・Metro出力に設定完了バナーをログ出力する(各プラットフォームファイルに想定されるログ行を記載しています)。
  3. 最初のSDKネットワーク呼び出しに認証エラーが表示されない。APIキーが間違っている場合、アプリがオファーを取得するとすぐに認証エラーがログに表示されます。

ユーザーが「インストールするだけ」と言った場合で、アプリを実行するのは後からの場合、アプリ実行時にログで何を確認すればよいかを教えてください。

5. 次のステップ

5a. 商品、機能権、オファー

商品、機能権、オファーがプロジェクト内に既に設定されているかを確認します。設定されていない場合は、create-revenuecat-project スキルで支援を提案します。

5b. ストア側の設定

iOS(App Store Connect)

  1. アプリ内購入キー(StoreKit 2推奨) — App Store Connect → ユーザーとアクセス → 連携 → アプリ内購入。キーを生成し、.p8 ファイルをダウンロード。Key IDとIssuer IDをメモしておきます。
  2. 共有シークレット(レガシーStoreKit 1) — App Store Connect → アプリ → アプリ情報 → アプリ固有の共有シークレット。
  3. ユーザーがこの情報を提供した場合、RevenueCat側で登録します(create-app / update-app 経由)。

Android(Google Play Console)

  1. サービスアカウント認証情報 — Google Cloud Consoleでサービスアカウントを作成。「Service Account User」ロールを付与。JSONキーを作成。Play Consoleで、「財務データの表示」権限でサービスアカウントにアクセス権を付与します。
  2. リアルタイム開発者通知(RTDN) — Cloud Pub/Subトピックをセットアップ。Play Console → マネタイズ設定で設定します。
  3. ユーザーがこの情報を提供した場合、create-app / update-app で登録します。

5c. 続行するスキル

integrate-revenuecat の後の一般的なフォローアップ:

  • revenuecat-paywall — ダッシュボード設定したペイウォール(購入画面)を表示します。
  • revenuecat-purchase-flow — 購入と復元を手動で実装します。
  • revenuecat-entitlements-gate — アクティブな機能権の背後に機能をロックします。
  • revenuecat-identify-user — logIn / logOut をアプリの認証システムに接続します。
  • revenuecat-testing-setup — サンドボックステストチャネルをセットアップします。
  • revenuecat-troubleshoot — オファー・商品・機能権のバグを診断します。
原文(English)を表示

integrate-revenuecat: end-to-end RevenueCat integration

Use this skill when the user wants to add RevenueCat to a project for the first time, or to reconfigure the SDK with a public API key. The skill covers two halves:

  1. Dashboard side — set up the project, register the app, and obtain the public API key, through the RevenueCat MCP server or the rc CLI.
  2. App side — install the Purchases SDK, call Purchases.configure(…) at app entry, and verify the configuration banner in the logs.

Walk them in order. Most integrations need both halves, even when the user asks "just install the SDK" — the SDK needs an API key from the dashboard.

If a project + app already exist and the user only wants to wire the SDK into code, jump to Section 3 below. If the user wants to bootstrap a brand new RevenueCat project (apps + products + entitlements + offerings), use the create-revenuecat-project skill instead, then come back here for the SDK install.

Arguments

Available as $ARGUMENTS when invoked as a slash command:

  • platform (optional): One of ios, android, kmp, flutter, react-native. If omitted, run the detection algorithm in Section 3a.
  • app_identifier (optional): Bundle ID (iOS) or package name (Android). If omitted, read it from the project files (Info.plist, AndroidManifest.xml, app.json, pubspec.yaml).
  • project_name (optional): Name of the RevenueCat project to use. If omitted, list projects (via MCP or rc projects list) and ask the user.

1. Understand the status quo

Before touching the dashboard, gather the facts:

  • Platform target: iOS / Apple App Store, Android / Google Play, or both. Inspect the working directory before asking — the detection algorithm in Section 3 makes this obvious for most projects.
  • Technology: native iOS (Swift), native Android (Kotlin / Java), React Native, Flutter, Kotlin Multiplatform. SDK list: https://www.revenuecat.com/docs/getting-started/installation.md.
  • App identifier: bundle ID (iOS), package name (Android). Pull from Info.plist / AndroidManifest.xml / app.json / pubspec.yaml rather than asking.

2. Dashboard side

Use whichever surface the user has available: the RevenueCat MCP server or the rc CLI (see the revenuecat-cli skill for CLI discovery and conventions). Both cover the same operations for these steps, and each step below notes the MCP tool and the rc command.

2a. Get or create the project

  • List accessible projects: list-projects (MCP) or rc projects list. If multiple, ask the user which one matches this app, or offer to create a new one (create-project / rc projects create).
  • If there is no project, hand off to the create-revenuecat-project skill, then resume here.
  • Store the project_id for the rest of the steps.

2b. Get or create the app

  • Check which apps are already configured in the project (list-apps / rc apps list). A test_store app is always present; app_store and play_store apps are present only if the user has finished store-side setup.
  • Ask the user whether their app is already set up in App Store Connect (iOS) or Google Play Console (Android). Reassure them that store-side setup can come later — the test_store app is enough to start integrating.
  • If the user confirms store-side setup is done, call create-app (or rc apps create):
    • iOS: type: "app_store", bundle_id from Section 1.
    • Android: type: "play_store", package_name from Section 1.
    • name derived from the identifier or asked from the user.

2c. Get the public API key

  • List public keys for the relevant app ID: list-public-api-keys (MCP) or rc apps keys <app-id>:
    • app_store / play_store if the store-side app exists.
    • Otherwise the test_store app.
  • The returned key is public and safe to embed in client app code. iOS keys are prefixed appl_…, Android keys goog_…, Amazon amzn_….

Never use the secret API key in client code. Secret keys are server-side only.

3. App side — install and configure the SDK

3a. Detect the platform

Inspect the working directory and pick the first match, from top to bottom:

  1. React Native: package.json has a react-native-purchases entry, or react-native as a dependency → read platforms/react-native.md. If expo is also a dependency, note it as an Expo project.
  2. Flutter: pubspec.yaml exists at the project root → read platforms/flutter.md.
  3. Kotlin Multiplatform: build.gradle.kts contains a kotlin { … } multiplatform source sets block, or depends on com.revenuecat.purchases:purchases-kmp* → read platforms/kmp.md.
  4. Android (native): build.gradle(.kts) applies com.android.application (and is not KMP) → read platforms/android.md.
  5. iOS (native): Package.swift, *.xcodeproj, *.xcworkspace, or Podfile at the project root → read platforms/ios.md.

If several match (e.g. an ios/ folder inside a Flutter project), pick the outermost project, the one that owns the build. If still ambiguous, ask the user which platform they want to configure.

3b. Shared concepts (all platforms)

  • Public SDK key, not secret key. RevenueCat issues a separate public SDK key per store/platform. iOS apps use an appl_… key, Android apps use a goog_… key (Amazon uses amzn_…). Server-side secret keys must never appear in client apps.
  • Configure once per app launch. Call Purchases.configure(…) exactly once, as early as possible (app entry point). Later calls no-op or warn.
  • Anonymous users by default. If you don't pass an appUserID, RevenueCat creates a stable anonymous ID. Only pass appUserID if you already have an authenticated user at launch; otherwise call logIn(…) later (see the revenuecat-identify-user skill).
  • Enable debug logging during integration. Each platform file shows how. Turn it off for release builds.
  • Keep keys out of source control. Recommend .env (RN), xcconfig (iOS), local.properties / gradle.properties (Android), or dart-define (Flutter) when the user asks about secret management.

3c. Implementation

Read the platform file that matches detection:

  • platforms/ios.md
  • platforms/android.md
  • platforms/kmp.md
  • platforms/flutter.md
  • platforms/react-native.md

Each platform file is self-contained: install command, exact configure snippet, and where to place it in the app entry point.

4. Verify

Do not claim setup is complete until:

  1. The project builds (Xcode build, ./gradlew assembleDebug, flutter run, npx react-native run-ios, or the KMP equivalent).
  2. The app launches and the RevenueCat SDK logs a configuration banner in the console / logcat / Metro output (each platform file describes the expected log line).
  3. No authentication errors appear on the first SDK network call. A wrong API key surfaces as an auth error log as soon as the app fetches offerings.

If the user only asked to "install" without running the app, tell them what to look for in the logs when they do run it.

5. Next steps

5a. Products, entitlements, offerings

Check whether products, entitlements, and offerings are already set up in the project. If not, offer to help via the create-revenuecat-project skill.

5b. Store-side setup

iOS (App Store Connect)

  1. In-App Purchase Key (recommended for StoreKit 2) — App Store Connect → Users and Access → Integrations → In-App Purchase. Generate key, download the .p8 file. Note the Key ID and Issuer ID.
  2. Shared Secret (legacy StoreKit 1) — App Store Connect → App → App Information → App-Specific Shared Secret.
  3. If the user provides this information, register it on the RevenueCat side via create-app / update-app.

Android (Google Play Console)

  1. Service account credentials — Create a service account in Google Cloud Console. Grant "Service Account User" role. Create a JSON key. In Play Console, grant the service account access with "View financial data" permission.
  2. Real-time Developer Notifications (RTDN) — Set up a Cloud Pub/Sub topic. Configure in Play Console → Monetization setup.
  3. If the user provides this information, register it via create-app / update-app.

5c. Subsequent skills

Common follow-ups after integrate-revenuecat:

  • revenuecat-paywall — display a dashboard-configured paywall.
  • revenuecat-purchase-flow — implement purchase + restore manually.
  • revenuecat-entitlements-gate — gate features behind active entitlements.
  • revenuecat-identify-user — wire logIn / logOut to the app's auth system.
  • revenuecat-testing-setup — set up a sandbox testing channel.
  • revenuecat-troubleshoot — diagnose offerings / products / entitlement bugs.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。