rc-error-handling

rc-error-handling is a skill for Claude Code from RevenueCat/ai-toolkit. It costs 48 tokens per session (1,272 once invoked), scanned A, original, MIT.

Guidance for handling errors from the RevenueCat Android SDK, the library that manages purchases in an app. It explains error codes, cancelled purchases, and suitable responses.

In plain words
What is it for?
Use it to decide what to log, when to show an error or a retry button, and how to treat a purchase that the user cancelled.
Why use it?
It replaces scattered Google Play billing error handling with a consistent approach and avoids adding unnecessary retry loops.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the revenuecat-play-billing plugin — 20 skills shipped together

not rated 65repo +1 7d ago A scan Socket: passSnyk: warnSkillSpector: pass 48 tokens original MIT

Good fit Use it to decide what to log, when to show an error or a retry button, and how to treat a purchase that the user cancelled.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/revenuecat/ai-toolkit/rc-error-handling
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RevenueCat/ai-toolkit --skill rc-error-handling
Clone the repo
git clone --depth 1 https://github.com/RevenueCat/ai-toolkit

Made for: Claude Code.

Or install revenuecat-play-billing, the plugin that ships this one along with the rest of its 20 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rc-error-handling

README.md
[![agentmods](https://agentmods.dev/badge/skills/revenuecat/ai-toolkit/rc-error-handling/github.svg)](https://agentmods.dev/skills/revenuecat/ai-toolkit/rc-error-handling)
Your own site
<a href="https://agentmods.dev/skills/revenuecat/ai-toolkit/rc-error-handling"><img src="https://agentmods.dev/badge/skills/revenuecat/ai-toolkit/rc-error-handling/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rc-error-handling

Your own site · 80×15
<a href="https://agentmods.dev/skills/revenuecat/ai-toolkit/rc-error-handling"><img src="https://agentmods.dev/badge/skills/revenuecat/ai-toolkit/rc-error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,272 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 12 Jun 2026
  • Snyk warn 12 Jun 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01272
Opus 5 $0.00024 $0.00636
Sonnet 5 $0.00010 $0.00254
Haiku 4.5 $0.00005 $0.00127

Measured 10d ago against content hash c0e5c7ff7c2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

rc-error-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

revenuecat-play-billing/skills/rc-error-handling/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Error Handling

Phase 1: Understand

With raw Google Play Billing you enumerate every BillingResponseCode, split them into retriable and non retriable groups, and build backoff retry logic. RevenueCat collapses this into a single type you deal with: PurchasesError.

public class PurchasesError(
    val code: PurchasesErrorCode,
    val underlyingErrorMessage: String? = null,
) {
    val message: String // technical description, for logs
}

Key facts you rely on:

  • PurchasesErrorCode is a cross platform enum with stable, readable codes.
  • error.message is a technical string. It belongs in logs, not in the UI.
  • awaitPurchase() throws PurchasesTransactionException, which adds a userCancelled: Boolean flag.
  • Every other await* call (awaitOfferings, awaitGetProducts, awaitCustomerInfo, awaitRestore) throws PurchasesException.
  • The SDK already retries transient billing and network failures internally. Any error that reaches you has exhausted the SDK retry budget. You do not add your own backoff loop. The only retry you implement is a user triggered "Try Again" button.

Phase 2: Plan

Before writing a catch block, decide three things:

  1. Which await* call are you wrapping? That picks the exception type.
  2. Which codes have specific handling? Everything else falls into a generic branch.
  3. What user facing string does each handled code map to?

Use this table to categorize PurchasesErrorCode values and pick the UX response.

Code Meaning Handling
PurchaseCancelledError User backed out of the flow Do nothing. userCancelled is also true.
ProductAlreadyPurchasedError Product already active for the user Refresh CustomerInfo and check entitlements.
PaymentPendingError Purchase entered pending state Show a pending message. Wait for UpdatedCustomerInfoListener.
NetworkError Request failed due to connectivity Prompt the user to retry.
StoreProblemError Google Play issue Prompt to retry or update Play Store.
PurchaseNotAllowedError Device or account cannot purchase Show an explanatory message.
IneligibleError User not eligible for the offer Show the base plan instead.

Read the full file on GitHub · 140 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 140 lines · 48 tokens per session scan A c0e5c7ff7c2d

Subscribe to this mod's changes

rc-error-handling is a skill published in the GitHub repository RevenueCat/ai-toolkit (65 stars, last pushed 7d ago), licensed MIT. It adds 48 tokens to every session and 1,272 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

play-billing-library-version-upgrade

Use this skill when upgrading or migrating an Android project from any legacy Google Play Billing Library (PBL) version to the latest stable version of PBL.

android/skills · 39 tokens

asc-revenuecat-catalog-sync

Reconcile App Store Connect subscriptions and in-app purchases with RevenueCat products, entitlements, offerings, and packages using asc and RevenueCat MCP. Use when setting up or syncing subscription catalogs across ASC and RevenueCat.

rorkai/app-store-connect-cli-skills · 51 tokens

axiom-implement-iap

Use when the user wants to add in-app purchases, implement StoreKit 2, or set up subscriptions.

CharlesWiltgen/Axiom · 29 tokens

google-play

Google Play Developer API (Android Publisher) integration with managed OAuth. Manage apps, subscriptions, in-app purchases, and reviews. Use this skill when users want to interact with Google Play Console programmatically. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).

CraftOS-dev/CraftBot · 70 tokens

subscription-lifecycle

Generates StoreKit 2 subscription lifecycle management — grace periods, billing retry, offer codes, win-back offers, upgrade/downgrade paths, and subscription status monitoring. Use when user needs post-purchase subscription state handling beyond the initial paywall.

rshankras/claude-code-apple-skills · 55 tokens

subscription-offers

Generates StoreKit 2 code for all subscription offer types — introductory, promotional, offer codes, and win-back. Includes eligibility checks, offer presentation, and the preferredSubscriptionOffer modifier. Use when adding subscription offers, free trials, or promotional pricing.

rshankras/claude-code-apple-skills · 55 tokens