Agent skill

Kmp Starter Feature Purchases

by DevAtrii in DevAtrii/Kmp-Starter-Template

The KMP Starter Template purchases system (RevenueCat) — setup, PurchasesViewModel vs PurchasesLogics, paywall navigation + customization, publish/purchases.json metadata, and entitlement checks.

MITAuto-check passedMobile

Install Kmp Starter Feature Purchases

skills CLI
$ npx skills add DevAtrii/Kmp-Starter-Template --skill kmp-starter-feature-purchases -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DevAtrii/Kmp-Starter-Template kmp-starter-feature-purchases --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DevAtrii/Kmp-Starter-Template.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/kmp-starter/starter-features/purchases .claude/skills/kmp-starter-feature-purchases && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kmp-starter-feature-purchases
GitHub stars
167
Token cost
~2.5k tokens
SKILL.md length
679 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

The KMP Starter Template purchases system (RevenueCat) — setup, PurchasesViewModel vs PurchasesLogics, paywall navigation + customization, publish/purchases.json metadata, and entitlement checks.

  • Works in 8 steps: Setup RevenueCat → Check entitlement (Compose) → Navigate to the paywall → …
  • Tasks that involve Project scaffolding
  • SKILL.md covers Where things live, 1. Setup RevenueCat, 2. Check entitlement (Compose) and 3. Navigate to the paywall, plus 7 more sections
  • Reaches starter.atherio.dev; needs DISCOUNT_OFFER_IDENTIFIER_KEY and RC_TEST_STORE_API_KEY

What it does

Kmp Starter Feature Purchases is an agent skill from DevAtrii/Kmp-Starter-Template. The KMP Starter Template purchases system (RevenueCat) — setup, PurchasesViewModel vs PurchasesLogics, paywall navigation + customization, publish/purchases.json metadata, and entitlement checks.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Project scaffolding. It works with RevenueCat. The repository describes itself as: Starter template is a multi-module KMP boilerplate for Android & iOS with clean architecture and high-quality code. It handles basics like remote config, in-app purchases, and… The licence is MIT.

When your agent uses it

  • Tasks that involve Project scaffolding

Example prompts

  • “/kmp-starter-feature-purchases”

Requirements

  • A credential in RC_TEST_STORE_API_KEY
  • A credential in RC_PROD_API_KEY

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Setup RevenueCat
  2. Check entitlement (Compose)
  3. Navigate to the paywall
  4. Customize the paywall
  5. Paywall metadata — publish/purchases.json
  6. Custom ViewModel — PurchasesLogics
  7. Pro-gating — recommend what to lock
  8. Domain models

What it can do on your machine

Read from SKILL.md and the folder at commit a8f7b27. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • starter.atherio.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • DISCOUNT_OFFER_IDENTIFIER_KEY
    • RC_TEST_STORE_API_KEY
    • RC_PROD_API_KEY
    • REVENUE_CAT_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kmp Starter Feature Purchases loads about 2.5k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 679 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DevAtrii/Kmp-Starter-Template at commit a8f7b27, republished under its MIT licence (© DevAtrii). 679 words, ~2,492 tokens.

Download SKILL.mdSave it as .claude/skills/kmp-starter-feature-purchases/SKILL.md (or your agent's skills folder).
name
kmp-starter-feature-purchases
description
The KMP Starter Template purchases system (RevenueCat) — setup, PurchasesViewModel vs PurchasesLogics, paywall navigation + customization, publish/purchases.json metadata, and entitlement checks.
author
DevAtrii
license
MIT

Purchases (RevenueCat)

Subscriptions, one-time purchases, dynamic paywalls, and remote metadata via RevenueCat. Clean Architecture, fully integrated with Analytics and Navigation.

Where things live

PieceModulePath
PurchasesRepository (interface)purchases domainfeatures/purchases/domain/.../repositories/PurchasesRepository.kt
Product, PaywallMetadata, Faq, Review, ProductBadgepurchases domainfeatures/purchases/domain/.../models/*.kt
PurchasesLogics (+ per-action logics)purchases domainfeatures/purchases/domain/.../logics/*.kt
RevenueCatPurchasesRepositorypurchases datafeatures/purchases/data/.../RevenueCatPurchasesRepository.kt
PurchasesViewModelpurchases presentationfeatures/purchases/presentation/.../PurchasesViewModel.kt
rememberIsProUser / rememberActiveProductspurchases presentationfeatures/purchases/presentation/.../PurchasesRememberUtils.kt

1. Setup RevenueCat

Add API keys in composeApp/.../core/AppConstants.kt (debug/prod split, Android vs iOS):

kotlin
object AppConstants {
    private const val RC_TEST_STORE_API_KEY = "test_api_key"

    private val RC_PROD_API_KEY = when (platform) {
        is Platform.Android -> "goog_android_api_key"
        is Platform.Ios -> "apple_api_key"
    }

    val REVENUE_CAT_API_KEY =
        if (platform.debug) RC_TEST_STORE_API_KEY else RC_PROD_API_KEY
}

In the RevenueCat dashboard: create products (weekly/yearly/...), create an Offering (make it default), and add Store Listing Metadata (FAQs, reviews, paywall version, product titles/descriptions/badges/discount labels).

2. Check entitlement (Compose)

kotlin
val isPro = rememberIsProUser()              // Boolean — any active entitlement
val products = rememberActiveProducts().value // List<Product> — active products

if (!isPro) AdBanner()

rememberIsProUser() = rememberActiveProducts().value.isNotEmpty().

3. Navigate to the paywall

Navigate to AppScreens.Purchases — registered in composeApp/src/commonMain/kotlin/<your-package>/core/navigation/AppScreens.kt (e.g. data object Purchases : AppScreens()). Do not invent StarterScreens.Purchases.

kotlin
navigator.navigateTo(AppScreens.Purchases)

The screen auto-handles: loading products, starting purchase, restoring purchases, loading discount product, loading paywall metadata, and showing the discount dialog.

4. Customize the paywall

composeApp/src/commonMain/kotlin/<your-package>/core/navigation/StarterPaywallDefaults.kt is the single place to edit paywall strings, hero image, and feature list:

  • starterDefaultPaywallV1() — builds Paywalls.V1 from Res.string.paywall_v1_* + Res.drawable.*.
  • starterDefaultPaywallV1Features() — the List<PurchaseFeature> (icon + string) shown.
  • Swap the referenced Res.string.paywall_v1_* / drawable for your own resources (see resources-theme skill; regenerate accessors with :features:resources:generateAccessors).

5. Paywall metadata — publish/purchases.json

publish/purchases.json is the source you update for your project's RevenueCat offering metadata. RevenueCatPurchasesRepository reads these keys from the current offering, decoded against the domain models:

  • paywall_meta_data → PaywallMetadata (faqs, reviews, version). GetPaywallMetadataLogic feeds PurchasesViewModel.
  • products_meta_data → per-product metadata keyed by store product id (title, description, badge, badgeBg, discountPercentage, isTrial), decoded into Product/ProductBadge.
  • discountOffer → identifier of the discount offering (maps to DISCOUNT_OFFER_IDENTIFIER_KEY).
  • Product ids in products_meta_data must match your Google Play / App Store SKUs (e.g. kmp_pro.weekly, kmp_pro.yearly).

So: edit publish/purchases.json to reflect your products/FAQs/reviews, then mirror that JSON into the RevenueCat offering's metadata. %price% placeholders are formatted via Product.formatValues().

Example:

json
{
  "discountOffer": "kmp_starter_early_bird_discount",
  "paywall_meta_data": {
    "version": 1,
    "faqs": [
      { "question": "Does it support Android & iOS?", "answer": "Yes, fully shared KMP setup." }
    ],
    "reviews": [
      { "author": "Alex", "rating": 5.0, "review": "Saved weeks of setup time." }
    ]
  },
  "products_meta_data": {
    "kmp_pro.weekly": { "title": "Weekly Pro", "description": "Full access for %price%.", "badge": null },
    "kmp_pro.yearly": { "title": "Yearly Pro", "description": "Best value for %price%.", "badge": "Save 50%" }
  }
}

6. Custom ViewModel — PurchasesLogics

If you don't want PurchasesViewModel, inject PurchasesLogics and build your own VM. It bundles:

  • getProducts, startPurchase, restorePurchases, getPaywallMetadata, getCurrentPurchaseStatus, getDiscountProduct, signInToPurchase

Call signIn(userId) (via SignInToPurchaseLogic) right after the user logs in so entitlements are tied to the account and restorable across devices.

7. Pro-gating — recommend what to lock

When planning a paid tier, look at the app and recommend features that can be Pro-gated. Keep the core experience free; gate the power/advanced features that only engaged users want.

Heuristics:

  • Free (core): the primary value — the thing that gets a user hooked and makes the app usable on day one.
  • Pro (gate): advanced controls, higher limits, power features, saving/export, customization, and any feature users "level up" into.

Example — a web-to-PDF app gates: extra page sizes (A3/A2/A1/A0), custom margins, custom CSS/JS, orientation, image/JS/cache/user-agent web settings, char + bookmark limits. The basic A4 convert stays free.

Only implement pro-gating when the user asks. When they do, propose the split first (free vs Pro), get agreement, then implement.

Show full SKILL.md (223 more words)Show less
Remote-config-driven gating (only if asked)

You can combine Purchases + Remote Config so the set of gated features is remotely tunable — change what's locked without a release. Do this only when the user explicitly asks for remote-config gating; recommend it, but don't build it unprompted.

Pattern (from a real Starter project):

  1. Define the gate config as RemoteConfigKeys in features/core/domain/.../ConfigKeys.kt — a serializable model describing what non-Pro users are limited on, plus paywall trigger positions:
kotlin
@Serializable
enum class NonProWebSettings { LOAD_IMAGES, JAVASCRIPT, CACHE, USER_AGENT }

@Serializable
data class NonProUserLimits(
    val htmlCharLimit: Int = 1_000,
    val lockedWebSettings: List<NonProWebSettings> = listOf(
        NonProWebSettings.LOAD_IMAGES,
        NonProWebSettings.JAVASCRIPT,
        NonProWebSettings.CACHE,
        NonProWebSettings.USER_AGENT,
    ),
    val orientationLocked: Boolean = true,
)

sealed class ConfigKeys<T>(
    key: String,
    defaultValue: T,
    serializer: KSerializer<T>? = null,
) : RemoteConfigKey<T>(key = key, defaultValue = defaultValue, serializer = serializer) {

    data object NonProLimits : ConfigKeys<NonProUserLimits>(
        key = "non_pro_limits",
        defaultValue = NonProUserLimits(),
        serializer = NonProUserLimits.serializer(),
    )
}
  1. Centralize the decision in a pure ProFeatureGate object (features/core/domain/.../pro/ProFeatureGate.kt) that takes isPro + the remote limits and returns a boolean/enum — keeps gating logic out of every screen:
kotlin
object ProFeatureGate {
    fun htmlCharLimit(isPro: Boolean, limits: NonProUserLimits): Int =
        if (isPro) Int.MAX_VALUE else limits.htmlCharLimit

    fun requiresProWebSetting(
        isPro: Boolean,
        limits: NonProUserLimits,
        setting: NonProWebSettings,
    ): Boolean = !isPro && setting in limits.lockedWebSettings
}
  1. Read at the call site: isPro from rememberIsProUser() and limits from rememberRemoteConfig(ConfigKeys.NonProLimits()), then route through ProFeatureGate. When a gated feature is hit, navigate to AppScreens.Purchases.

This keeps the paywall trigger and the gate list both remotely configurable (change limits or lock/unlock features from Firebase without shipping).

8. Domain models

kotlin
@Serializable
data class Product(
    val id: ProductId,            // typealias ProductId = String (SKU)
    val title: String,
    val description: String,
    val badge: ProductBadge,
    val price: String,
    val isTrial: Boolean,
    val discountPercentage: Int = 0,
) {
    fun formatValues(): Product  // replaces %price% in title/description/badge
}

@Serializable
data class PaywallMetadata(
    val faqs: Set<Faq> = emptySet(),
    val reviews: Set<Review> = emptySet(),
    val version: Int = 1,        // remotely control layout / A/B test
)

Rules

  • Products must be configured in Google Play Console, App Store Connect, and RevenueCat.
  • UI is modular — modify paywall UI freely without touching purchase logic.
  • Register purchasesDataModule + purchasesDomainModule + purchasesPresentationModule in InitKoin (see koin skill).
  • Don't duplicate the purchase system.
  • Keep the core free; recommend pro-gating only advanced/power features.
  • Recommend remote-config gating, but only implement it (Purchases + Remote Config pro-gating) when explicitly asked.

Reference

  • Docs: https://starter.atherio.dev/features/ → Purchases, https://starter.atherio.dev/features/ → Remote Config
  • Source: features/purchases/*, composeApp/.../core/navigation/StarterPaywallDefaults.kt, publish/purchases.json

© DevAtrii, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/kmp-starter/starter-features/purchases of DevAtrii/Kmp-Starter-Template.

Open the folder on GitHubat commit a8f7b27

Compare with similar skills

Kmp Starter Feature Purchases next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kmp Starter Feature Purchases compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kmp Starter Feature Purchases this skillDevAtrii/Kmp-Starter-Template167—~2.5kAutomated safety check: PassMIT
Compose FeatureMeet-Miyani/compose-skill302—~3.6kAutomated safety check: PassMIT
Core API Changelibnativeapi/nativeapi164—~2.5kAutomated safety check: PassMIT
Revenuecat Testingevanca/flutter-ai-rules650—~1.4kAutomated safety check: PassMIT
External AgentsBuilderIO/agent-native7.1k—~7.2kAutomated safety check: NotesNone
Init Tauri Appglebis/claude-skills391—~1.5kAutomated safety check: PassMIT

Similar skills

  • Compose Feature

    Meet-Miyani/compose-skill

    Adds, changes, or reviews a screen, sheet, dialog, or destination slice (endpoint to repository to ViewModel to UI to navigation to DI to tests) in a Compose or CMP project.

    302 GitHub stars~3.6k tokensUpdated 3 days ago
    MobileAuto-check passed
  • Core API Change

    libnativeapi/nativeapi

    Carry a change to the C++ public API in core/ all the way downstream — design check, header edit, six platform implementations, C ABI + Rust/Dart/C/JS/Python regeneration, per-binding verification…

    164 GitHub stars~2.5k tokensUpdated today
    MobileAuto-check passed
  • Revenuecat Testing

    evanca/flutter-ai-rules

    A skill your agent uses when testing RevenueCat purchases/subscriptions, setting up sandbox testing, debugging a purchase/restore/trial, verifying entitlements or events, or writing an IAP QA plan.

    650 GitHub stars~1.4k tokensUpdated 26 days ago
    MobileAuto-check passed
  • External Agents

    BuilderIO/agent-native

    Connect external agents and MCP hosts (Claude, Claude Desktop, Claude Code, ChatGPT custom MCP apps, Codex, Cursor, Claude Cowork, VS Code GitHub Copilot, Goose, Postman, MCPJam) to an agent-native…

    7.1k GitHub stars~7.2k tokensUpdated today
    MobileAuto-check: notes
  • Init Tauri App

    glebis/claude-skills

    Scaffold a new Tauri v2 project with the cenno/cull house conventions — delegates boilerplate to npm create tauri-app, then layers an opinionated core plus opt-in modules (CLI+MCP, SQLite…

    391 GitHub stars~1.5k tokensUpdated 2 days ago
    MobileAuto-check passed
  • Snapshot Test Setup

    gustavscirulis/snapgrid

    Set up SwiftUI visual regression testing with swift-snapshot-testing.

    116 GitHub starsUsed in 1 repo~2.3k tokens
    MobileAuto-check: notes

More from DevAtrii/Kmp-Starter-Template

All 23 skills in this repo
  • Kmp Starter

    DevAtrii/Kmp-Starter-Template

    Build production Android & iOS apps on the KMP Starter Template (Clean Architecture, MVI, Koin, Compose Multiplatform).

    167 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Memory

    DevAtrii/Kmp-Starter-Template

    Persistent per-project memory for KMP Starter Template apps.

    167 GitHub stars~963 tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Architecture

    DevAtrii/Kmp-Starter-Template

    Clean Architecture module and package layout for KMP Starter Template features — data/domain/presentation layers, core dependency rule, screen-based package organization, the Screen vs Content…

    167 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Create Fresh App

    DevAtrii/Kmp-Starter-Template

    Research and plan a brand-new app before scaffolding it on the KMP Starter Template.

    167 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Data

    DevAtrii/Kmp-Starter-Template

    Data layer on the KMP Starter Template — repositories and data sources, Logics guidance, DataStore persistence, Room database, StarterFileManager, and the Calf file picker.

    167 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Kmp Starter Feature Analytics

    DevAtrii/Kmp-Starter-Template

    The KMP Starter Template analytics system — AppEvent/EventsTracker, Analytics routing, Mixpanel + Firebase providers, combining providers, and runtime swaps.

    167 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Kmp Starter Feature Purchases

What does Kmp Starter Feature Purchases do?

The KMP Starter Template purchases system (RevenueCat) — setup, PurchasesViewModel vs PurchasesLogics, paywall navigation + customization, publish/purchases.json metadata, and entitlement checks. Kmp Starter Feature Purchases is an agent skill from DevAtrii/Kmp-Starter-Template.json metadata, and entitlement checks.

When should I use Kmp Starter Feature Purchases?

Kmp Starter Feature Purchases fits situations like: tasks that involve Project scaffolding.

How do I install Kmp Starter Feature Purchases in Claude Code?

Run `npx skills add DevAtrii/Kmp-Starter-Template --skill kmp-starter-feature-purchases -a claude-code`. Or copy the skill folder (.agents/skills/kmp-starter/starter-features/purchases in DevAtrii/Kmp-Starter-Template) into .claude/skills/kmp-starter-feature-purchases in your project. Claude Code loads it when a task matches its description.

How do I install Kmp Starter Feature Purchases in Codex?

Run `npx skills add DevAtrii/Kmp-Starter-Template --skill kmp-starter-feature-purchases -a codex`. Or copy the skill folder (.agents/skills/kmp-starter/starter-features/purchases in DevAtrii/Kmp-Starter-Template) into .agents/skills/kmp-starter-feature-purchases in your project. Codex loads it when a task matches its description.

Can I use Kmp Starter Feature Purchases in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DevAtrii/Kmp-Starter-Template --skill kmp-starter-feature-purchases -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kmp-starter-feature-purchases, .gemini/skills/kmp-starter-feature-purchases, .github/skills/kmp-starter-feature-purchases and .opencode/skills/kmp-starter-feature-purchases in your project.

What does Kmp Starter Feature Purchases need to run?

Going by SKILL.md and its folder, Kmp Starter Feature Purchases needs credentials named DISCOUNT_OFFER_IDENTIFIER_KEY, RC_TEST_STORE_API_KEY, RC_PROD_API_KEY and REVENUE_CAT_API_KEY. Our summary lists: A credential in RC_TEST_STORE_API_KEY; A credential in RC_PROD_API_KEY.

Does Kmp Starter Feature Purchases access the network?

SKILL.md names 1 domain. In commands or code: starter.atherio.dev; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Kmp Starter Feature Purchases safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kmp Starter Feature Purchases use?

Kmp Starter Feature Purchases is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kmp Starter Feature Purchases use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Kmp Starter Feature Purchases?

Skills that share tags, products or a category with Kmp Starter Feature Purchases: Compose Feature (Meet-Miyani/compose-skill, 302 stars), Core API Change (libnativeapi/nativeapi, 164 stars), Revenuecat Testing (evanca/flutter-ai-rules, 650 stars) and External Agents (BuilderIO/agent-native, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kmp Starter Feature Purchases?

DevAtrii (a GitHub user) maintains it in DevAtrii/Kmp-Starter-Template, which has 167 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on September 1, 2026.

Source: DevAtrii/Kmp-Starter-Template on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.