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.
npx skills add RevenueCat/play-billing-skills --skill subscription-statesgit clone --depth 1 https://github.com/RevenueCat/play-billing-skillsWrote 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.
[](https://agentmods.dev/skills/revenuecat/play-billing-skills/subscription-states)<a href="https://agentmods.dev/skills/revenuecat/play-billing-skills/subscription-states"><img src="https://agentmods.dev/badge/skills/revenuecat/play-billing-skills/subscription-states/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.
<a href="https://agentmods.dev/skills/revenuecat/play-billing-skills/subscription-states"><img src="https://agentmods.dev/badge/skills/revenuecat/play-billing-skills/subscription-states.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.01589 |
| Opus 5 | $0.00027 | $0.00794 |
| Sonnet 5 | $0.00011 | $0.00318 |
| Haiku 4.5 | $0.00005 | $0.00159 |
Grade A, and why
subscription-states 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Subscription States
A Google Play subscription moves through seven states between the first purchase and final termination. Each state has a concrete access decision: grant, retain until expiry, or revoke. Get the mapping wrong and you either give away paid content or revoke access a user already paid for.
This skill walks you through confirming your app reads the correct state source, deciding the access rule for each state, and writing the mapping code.
Phase 1: Discovery
Before changing anything, confirm where your entitlement decision reads subscription state from. The authoritative source is the subscriptionState field on the SubscriptionPurchaseV2 resource returned by purchases.subscriptionsv2.get on the Google Play Developer API. The client Purchase object from queryPurchasesAsync() does not carry this field.
Answer these questions:
- Does your backend call
purchases.subscriptionsv2.get(not the legacypurchases.subscriptions.get)? - Does your entitlement function read
subscriptionStatefrom that response rather than inferring state from the RTDN notification type? - Does the function check
expiryTimewhen the state isSUBSCRIPTION_STATE_CANCELED? - Does your client code treat a
Purchasereturned byqueryPurchasesAsync()as "has a purchase," not "has access"?
If any answer is no, fix the source of truth first. Inferring state from the notification type is the single most common cause of wrong entitlement decisions, because two different transitions can produce the same RTDN type. For example, SUBSCRIPTION_RECOVERED fires both when a grace period retry succeeds and when a user fixes payment during account hold.
Confirm the app is on subscriptionsv2 before moving on.
Phase 2: Plan the Decision Per State
Decide the access rule for each of the seven states. Use this table as the contract your code must match:
| State | Access Decision | Reason |
|---|---|---|
| PENDING | Do not grant | Payment has not settled yet. |
| ACTIVE | Grant | Paid and within the current billing period. |
| IN_GRACE_PERIOD | Grant | Payment failed, Google is retrying, user keeps access during the configured window. |
| CANCELED | Retain until expiryTime |
User canceled but already paid for the current period. |
| ON_HOLD | Revoke | Grace period expired without recovery. |
| PAUSED | Revoke | Voluntary pause, no billing during the window. |
| EXPIRED | Revoke | Subscription has ended. |
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.
- 12d ago First seen · 158 lines · 54 tokens per session scan A e7fa4393aefc
subscription-states is a skill published in the GitHub repository RevenueCat/play-billing-skills (53 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 54 tokens to every session and 1,589 once invoked, about $0.0003 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.
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.
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.
axiom-implement-iap
Use when the user wants to add in-app purchases, implement StoreKit 2, or set up subscriptions.
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).
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.
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.