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

revenuecat-customer-center — скилл для Claude Code: экран управления

Добавляет в приложение готовый экран Customer Center из RevenueCat: подписчик сам отменяет подписку, запрашивает возврат и восстанавливает покупки.

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

Что делает revenuecat-customer-center

Скилл ведёт агента по шагам: сначала определяет платформу проекта, потом читает нужный файл с точным сниппетом и формой колбэков. Поддержаны iOS, Android, Kotlin Multiplatform, Flutter и React Native. Для React Native экран лежит в react-native-purchases-ui, для Flutter — в purchases_ui_flutter, для KMP — в purchases-kmp-ui, для нативного Android — в com.revenuecat.purchases:purchases-ui, для iOS — в RevenueCatUI.

Перед запуском скилла должен отработать integrate-revenuecat, а Purchases.configure(…) — пройти успешно: без этого Customer Center не получит данные о покупателе. Если пользователь анонимный и ничего не покупал, экран покажет пустое состояние с одной кнопкой восстановления. Приложению с логином нужен вызов Purchases.logIn(userId) до открытия экрана.

Сам интерфейс настраивается в дашборде RevenueCat: там задаются действия, тексты, промо-офферы и опции опроса при отмене. Без этой настройки отрисуется минимальная заготовка, и толку от неё мало. Запрос возврата работает только на iOS, потому что только Apple даёт запрашивать возврат из приложения; на Android пункт управления подпиской уводит в экран подписок Google Play. Если версия SDK старше поддержки Customer Center, остаётся собрать экран вручную: показать активные entitlements из Purchases.customerInfo(), кнопку Purchases.restorePurchases() и ссылку на управление подпиской в сторе.

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

  • показать подписчику список активных подписок внутри приложения
  • дать отменить подписку без письма в поддержку
  • принять запрос на возврат на iOS
  • восстановить покупки после переустановки
  • увести пользователя Android в экран подписок Google Play

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

  • добавь Customer Center в наше iOS-приложение
  • сделай экран управления подпиской во Flutter-проекте
  • повесь кнопку «Управление подпиской» в настройках на RevenueCat Customer Center

Как установить revenuecat-customer-center

1Через Skills CLI (Vercel)

npx skills add RevenueCat/ai-toolkit --skill revenuecat-customer-center -a claude-code

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

~/.claude/skills/revenuecat-customer-center/SKILL.md

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

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

Вопросы о revenuecat-customer-center

Как установить revenuecat-customer-center в Claude?

Выполните npx skills add RevenueCat/ai-toolkit --skill revenuecat-customer-center -a claude-code. После этого файл скилла лежит в ~/.claude/skills/revenuecat-customer-center/SKILL.md.

Что делает revenuecat-customer-center?

Проводит агента через подключение готового экрана Customer Center: определение платформы, установка нужного пакета, показ экрана и проверка колбэков.

Что нужно, чтобы Customer Center заработал?

Сначала должен отработать скилл integrate-revenuecat, а Purchases.configure(…) — завершиться успешно. Ещё нужен пользователь с покупками: у анонимного без покупок экран останется пустым.

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

SKILL.md · MIT
---
name: revenuecat-customer-center
description: "Add the RevenueCat Customer Center (self service subscription management UI) to an app. Use when the user asks to add a customer center, build a self service subscriptions screen, let users manage subscriptions in app, add a subscription management screen, present CustomerCenterView, call presentCustomerCenter, or wire a 'manage subscription' button to the RevenueCat customer center on iOS, Android, Kotlin Multiplatform, Flutter, or React Native."
---

# revenuecat-customer-center: add the RevenueCat Customer Center

Use this skill when the user wants an out of the box UI that lets their customers manage active subscriptions, request refunds, cancel, restore, or contact support, without shipping custom UI. The UI is configured in the RevenueCat dashboard and rendered by the `RevenueCatUI` SDKs.

Prerequisite: `integrate-revenuecat` has already run. `Purchases.configure(…)` must succeed before the Customer Center can load customer data.

## 1. 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. The Customer Center ships in `react-native-purchases-ui`. 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. The Customer Center ships in `purchases_ui_flutter`. Read `platforms/flutter.md`.
3. **Kotlin Multiplatform**: `build.gradle.kts` has a `kotlin { … }` multiplatform block, or depends on `com.revenuecat.purchases:purchases-kmp*`. The Customer Center composable is in `purchases-kmp-ui`. Read `platforms/kmp.md`.
4. **Android (native)**: `build.gradle(.kts)` applies `com.android.application` (and is not KMP). The Customer Center composable is in `com.revenuecat.purchases:purchases-ui`. Read `platforms/android.md`.
5. **iOS (native)**: `Package.swift`, `*.xcodeproj`, `*.xcworkspace`, or `Podfile` at the project root. `CustomerCenterView` is in `RevenueCatUI`. 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.

## 2. Shared concepts (all platforms)

- **Customer Center is a dashboard configured UI.** Actions, copy, promotional offers, refund flows, cancel survey options, and support contact details are defined in the RevenueCat dashboard under **Customer Center**. Without configuration, the view renders a minimal default layout; users will see almost nothing useful.
- **It needs an identified user with purchases** to surface anything meaningful. If the user is anonymous and has never bought anything, the Customer Center renders an empty / restore only state. If the app supports login, call `Purchases.logIn(userId)` before opening the Customer Center.
- **Customer Center is separate from paywalls.** The standard pattern: expose a "Manage subscription" row in the settings screen that opens the Customer Center. Paywalls are for new purchases; the Customer Center is for existing subscribers.
- **The UI owns the flow.** Restore, cancel, refund, and promotional offer flows run inside the component. Listen for the lifecycle callbacks (`onRestoreCompleted`, `onRefundRequestStarted`, `onManagementOptionSelected`, `onPromotionalOfferSucceeded`, etc.) to react in app code, not to drive the flow.
- **Platform availability varies.** iOS has had Customer Center longest; Android, KMP, Flutter, and React Native follow. Platform files flag any gaps. Refund requests are an iOS only action because only Apple exposes in app refund requests; on Android, the "Manage subscription" option links out to the Google Play subscriptions screen.
- **If the installed SDK version is older than Customer Center support**, the fallback is a manual subscription management screen: show the user's active entitlements from `Purchases.customerInfo()`, expose a `Purchases.restorePurchases()` button, and link to the store's subscription management URL. Point the user to upgrade the SDK if they want the full Customer Center.

## 3. 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 snippet to present the Customer Center, and the callback shape.

## 4. Verify

Do not claim the integration is complete until:

1. The project **builds** on the target platform.
2. Sign into the app with a test user that has **at least one active sandbox subscription**. Trigger the code path that opens the Customer Center. The UI loads and the subscription appears in the list.
3. At least one configured action runs end to end. The simplest check: tap **Restore purchases** and confirm the restore completed callback fires with a non-empty `customerInfo.entitlements.active` map. If the dashboard has Cancel / Refund / Support actions configured, verify the corresponding callback (`onManagementOptionSelected`, `onRefundRequestStarted`, etc.) fires when the user taps through.
4. Dismissing the Customer Center fires the `onDismiss` callback.

If the Customer Center opens but is empty, the signed in user has no purchases, or the dashboard Customer Center section is not configured. Fix in the dashboard, reload, and retry.

© RevenueCat · MIT · RevenueCat/ai-toolkit

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

Всё по теме «Мобильная разработка» →
capacitor-in-app-purchases capawesome-team Скилл ведёт агента по шагам: настройка товаров в App Store Connect и Google Play Console, выбор плагина, покупки, валидация чеков и тесты в песочнице. CX Codex +1 728установок asc-revenuecat-catalog-sync rorkai Сверяет каталог подписок и встроенных покупок App Store Connect с продуктами RevenueCat. Нужен перед запуском или при устранении расхождений между каталогами. CX Codex +1 6 100установок frontend-mobile-development-mobile-developer Seth Hobson Субагент для React Native, Flutter и нативных приложений iOS/Android: архитектура, офлайн-синхронизация, оптимизация сборки и публикация в сторах. CX Codex ★ 41 729звёзд репо mobile-design sickn33 Скилл проверяет интерфейсы iOS, Android, React Native и Flutter на удобство тачей, контраст, производительность списков и поведение без сети. CX Codex +1 3 700установок detour-onboarding software-mansion-labs Пошаговый гайд по внедрению отложенного диплинкинга Detour. Помогает настроить дашборд, Universal Links, App Links и мобильный SDK под ключ. CX Codex +1 763установок senior-mobile borghei Скилл для мобильной разработки: скаффолдинг проектов на React Native, Flutter, SwiftUI и Jetpack Compose, разбор производительности и подготовка к публикации в сторах. CX Codex +1 310установок

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

revenuecat-entitlements-gate Скилл проверяет активные entitlements в RevenueCat и решает, показывать ли платную функцию. Пригодится, когда нужно спрятать фичу за подпиской. CX Codex +1 831установок revenuecat-status Собирает отчёт по проекту RevenueCat: приложения, продукты, entitlements, offerings и вебхуки. Пригодится, когда нужно быстро понять, что настроено. CX Codex +1 825установок revenuecat-identify-user Связывает пользователей приложения с подписчиками RevenueCat: вызывает logIn и logOut в нужный момент авторизации. CX Codex +1 788установок revenuecat-charts Скилл учит агента запрашивать графики RevenueCat: сначала схему опций, потом данные, с разбором метрик подписок. CX Codex +1 757установок revenuecat-migrate Скилл помогает перевести покупки в приложении на RevenueCat или обновить SDK до новой мажорной версии. Сначала определяет платформу, потом ведёт по шагам. CX Codex +1 700установок rc-webhooks Скилл для обработки вебхуков RevenueCat на сервере: разбирает схему событий, дедупликацию по event.id и разницу между отменой, истечением и продлением. CX Codex +1 650установок rc-security Проверяет безопасность интеграции RevenueCat в Android: режим проверки подписи, ключи API, идентификацию пользователей и проверку прав на сервере. CX Codex +1 649установок rc-backend Скилл для работы с состоянием RevenueCat на сервере: чтение подписчиков, выдача и отзыв entitlements, атрибуты через REST API. CX Codex +1 635установок

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

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