Skip to content
Mobile
Skill

/axiom-audit-iap

Use when the user mentions in-app purchase review, IAP audit, StoreKit issues, purchase bugs, transaction problems, or subscription management.

From plugin
axiom
1.3k71 skills44 agents18 commands1 MCP

Claude Code

$ npx -y skills add charleswiltgen/axiom --skill axiom-audit-iap --agent claude-code

SKILL.md

axiom-audit-iap.SKILL.md
name: axiom-audit-iap
description: Use when the user mentions in-app purchase review, IAP audit, StoreKit issues, purchase bugs, transaction problems, or subscription management.
license: MIT

In-App Purchase Auditor Agent

You are an expert at detecting in-app purchase issues — both known anti-patterns AND missing/incomplete patterns that cause revenue loss, App Store rejections, and customer support problems.

Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.

  • Run each Grep pattern as written; do not collapse them into one mega-regex.
  • Run the Read verifications each section calls for.
  • "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.

Files to Exclude

Skip: `*Tests.swift`, `*Previews.swift`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`

Phase 1: Map IAP Architecture

Step 1: Identify StoreKit Version and Entry Points

Glob: **/*.swift (excluding test/vendor paths)
Grep for:
  - `import StoreKit` — StoreKit usage
  - `Product.products(for:)` — StoreKit 2 product loading
  - `SKProductsRequest`, `SKPaymentQueue` — StoreKit 1 (deprecated at iOS 18.0)
  - `Transaction.updates`, `Transaction.all`, `Transaction.currentEntitlements` — StoreKit 2 lifecycle
  - `SKPaymentTransactionObserver` — StoreKit 1 transaction observer
  - `PurchaseIntent\.intents` — promoted-purchase handler (StoreKit 2)
  - `shouldAddStorePayment` — promoted-purchase handler (StoreKit 1, deprecated at iOS 18.0)

StoreKit 1 is deprecated as of iOS 18.0 — `SKPaymentQueue`, `SKProductsRequest`, `SKProduct`, `SKPaymentTransaction`, and `SKPaymentTransactionObserver` all carry `API_DEPRECATED(…, ios(x, 18.0))` and warn when compiled against a modern SDK. Note if the codebase mixes both. Also note whether the app consumes `PurchaseIntent.intents` — the promoted-purchase entry point for StoreKit 2, added in iOS 16.4 — and whether any class adopting `SKPaymentTransactionObserver` implements the optional `shouldAddStorePayment` method (the StoreKit 1 entry point for promoted purchases from the App Store product page, itself deprecated at iOS 18.0 in favour of `PurchaseIntent.intents`).

Step 2: Identify Product Types in Use

Grep for:
  - `.consumable`, `.nonConsumable` — Consumable / non-consumable IAP
  - `.autoRenewable`, `.nonRenewable` — Subscription types
  - `SubscriptionInfo`, `subscriptionGroupID` — Subscription group usage
  - `RenewalInfo`, `renewalInfo` — Renewal metadata access
  - `subscription\?\.status`, `\.subscriptionStatus`, `Product\.SubscriptionInfo\.Status` — subscription-state read sites
  - `scenePhase`, `\.onChange\(of: scenePhase`, `willEnterForegroundNotification` — foreground re-check triggers

Note where each `subscription?.status` read site lives — single read at launch vs. re-checked on app foreground / after `Transaction.updates` fires / on a timer.

Step 3: Map Purchase Flow and Architecture

Read 2-3 key IAP files to understand:

  • Where products are loaded (single StoreManager vs scattered views)
  • How `Transaction.updates` listener is wired (app launch, Task lifetime)
  • Where `.finish()` is called relative to entitlement granting
  • Whether verification (`VerificationResult.verified`) happens before granting
  • Whether server-side validation is involved (appAccountToken, server URL)
  • Whether restore purchases is wired to a UI control

Output

Write a brief **IAP Architecture Map** (5-10 lines) summarizing:

  • StoreKit version (1, 2, or mixed)
  • Product types (consumables / non-consumables / subscriptions)
  • Architecture pattern (centralized StoreManager vs scattered calls)
  • Transaction lifecycle coverage (listener present? finish() present? verify present?)
  • Restore path (present? reachable from UI?)
  • Server validation (present? via appAccountToken?)

Present this map in the output before proceeding.

Phase 2: Detect Known Anti-Patterns

Run all 13 detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.

1. Missing transaction.finish() (CRITICAL/HIGH — Revenue Impact)

**Pattern**: Transaction handling without finish() **Search**: `Transaction\.updates`, `PurchaseResult`, `handleTransaction` — Read 20 lines after each match, check for `.finish()` **Issue**: Transactions remain in queue, re-delivered on next launch, duplicate entitlements **Fix**: `await transaction.finish()` after granting entitlement

2. Missing VerificationResult Check (CRITICAL/HIGH — Security)

**Pattern**: Direct transaction use without verification **Search**: `for await .* in Transaction\.updates`, `Transaction\.currentEntitlements` — Read surrounding context, check for `VerificationResult`, `.verified`, `.unverified` **Issue**: Fraudulent receipts granted entitlements; jailbreak exploit surface **Fix**: `if case .verified(let transaction) = result` before granting

3. Missing Transaction.updates Listener (CRITICAL/HIGH — Missing Purchases)

**Pattern**: No long-running `Transaction.updates` consumer **Search**: `Transaction\.updates` — verify at least one `for await` loop exists, typically in StoreManager.init() or a Task detached at app launch **Issue**: Renewals, Family Sharing, offer codes, interrupted purchases are silently lost **Fix**: Start a Task in StoreManager init that iterates `Transaction.updates` for app lifetime

4. Missing Restore Functionality (CRITICAL/HIGH — App Store Rejection)

**Pattern**: No restore path wired to UI **Search**: `AppStore\.sync`, `Transaction\.all`, `restorePurchases`, `Restore.*Purchase` **Issue**: Guideline 3.1.1 requires restore for non-consumables and subscriptions **Fix**: Add "Restore Purchases" button calling `try await AppStore.sync()`

5. Scattered Purchase Calls (MEDIUM/MEDIUM — Arc

Read more
@charleswiltgen
Ships withaxiom

Battle-tested skills, agents, and tools for modern Apple OS development — Swift 6, SwiftUI, Liquid Glass, Apple Intelligence, and more. Supports Claude Code, Codex, and all other popular coding harnesses and AI-savvy IDEs.

1.3k71 skills44 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.3k
Star history of charleswiltgen/axiom on GitHub, a chart by star-history.com

Other skills on axiom.

axiom-accessibility

axiom-accessibility

Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance,…

axiom-ai

axiom-ai

Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation…

axiom-analyze-crash

axiom-analyze-crash

Use when the user has a crash log (.ips, MetricKit JSON, legacy .crash text, .xccrashpoint bundle, or pasted text) that needs…

More skills from other plugins.

deep-code-review

deep-code-review

In-depth design-focused code review - understands codebase context before evaluating PR changes, posts structured feedback to…

expo4d53k
@expo@expoInstall Skill
modlens

modlens

Plug-in vision for text-only models. Hard rule: when a file path or URL with an image extension (.png, .jpg, .jpeg, .webp, .gif,…

modlens3w4.6k
@liustack@liustackInstall Skill
appllama-app-design-skill

appllama-app-design-sk…

Build native-feeling, benchmark-quality mobile app screens (Expo / React Native). Use when designing or implementing any mobile…

appllama2mo3.9k
@appllama@appllamaInstall Skill

Questions about axiom-audit-iap.

Which coding agents can use axiom-audit-iap?
axiom-audit-iap installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.