play-billing-best-practices

play-billing-best-practices is a skill for Claude Code, Codex from noloman/Android-AI-skills. It costs 0 tokens per session (370 once invoked), scanned A, original, MIT.

A set of rules for Google Play Billing, the Android system for selling in-app products and subscriptions.

In plain words
What is it for?
Use it when implementing or reviewing consumable purchases, subscriptions, prepaid plans, server-side verification, testing with license testers, and alternative billing requirements.
Why use it?
It helps handle purchase verification, acknowledgement, restoration, pending payments, lifecycle events, and billing responses correctly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when implementing or reviewing consumable purchases, subscriptions, prepaid plans, server-side verification, testing with license testers, and alternative billing requirements.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/noloman/android-ai-skills/play-billing-best-practices
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 noloman/Android-AI-skills --skill play-billing-best-practices
Clone the repo
git clone --depth 1 https://github.com/noloman/Android-AI-skills

Made for: Claude Code, Codex.

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 play-billing-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/noloman/android-ai-skills/play-billing-best-practices/github.svg)](https://agentmods.dev/skills/noloman/android-ai-skills/play-billing-best-practices)
Your own site
<a href="https://agentmods.dev/skills/noloman/android-ai-skills/play-billing-best-practices"><img src="https://agentmods.dev/badge/skills/noloman/android-ai-skills/play-billing-best-practices/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 play-billing-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/noloman/android-ai-skills/play-billing-best-practices"><img src="https://agentmods.dev/badge/skills/noloman/android-ai-skills/play-billing-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 370 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.
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.00000 $0.00370
Opus 5 $0.00000 $0.00185
Sonnet 5 $0.00000 $0.00074
Haiku 4.5 $0.00000 $0.00037

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

Security

Grade A, and why

play-billing-best-practices 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 11d 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.

play-billing-best-practices/SKILL.md · 40 lines

What it actually says


name: play-billing-best-practices description: Play Billing — in-app purchases, subscriptions, server verification, testing. user-invocable: true

Play Billing Best Practices

Cross-cutting skill — always activates alongside the project-type-specific skill.

Hard Rules

  • Use Google Play Billing Library 7+ (com.android.billingclient:billing).
  • Always verify purchases server-side — never trust client-side purchase state.
  • Acknowledge all purchases within 3 days or they are refunded automatically.
  • Consume consumable purchases after delivery — non-consumed purchases block re-purchase.
  • Connect BillingClient in onResume, disconnect in onPause — match lifecycle.
  • Handle all BillingResponseCode values — not just OK.
  • Never hardcode product IDs as the sole source of truth — query from Play Console.
  • Test with license testers on real devices, not emulators.
  • Use PurchasesUpdatedListener for real-time updates, queryPurchasesAsync for restoration.
  • Handle pending purchases (PENDING state) for slow payment methods.
  • Support prepaid plans for subscriptions — not all users want auto-renewal.
  • Implement User Choice Billing where required by regulation (alternative billing).

Core Patterns

  • Wrap BillingClient in a repository with Flow-based API.
  • Retry connection with exponential backoff on SERVICE_DISCONNECTED.
  • Use queryProductDetailsAsync before launchBillingFlow — cache results.
  • Implement purchase restoration on every app start (queryPurchasesAsync).
  • Use subscription replacement (SubscriptionUpdateParams) for plan changes.
  • Log billing events for debugging — obfuscate order IDs in production logs.

References

  • references/billing_client_lifecycle.md
  • references/subscriptions.md
  • references/one_time_purchases.md
  • references/server_verification.md
  • references/testing_billing.md
Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 40 lines · 0 tokens per session scan A 79854ac8a265

Subscribe to this mod's changes

play-billing-best-practices is a skill published in the GitHub repository noloman/Android-AI-skills (6 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 370 tokens. 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-31.

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