# storekit

Guides your agent through StoreKit 2 in-app purchases and subscriptions: paywalls, transactions, entitlement checks.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4000 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/storekit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/storekit

## What it does

The skill steers the agent toward the modern Swift StoreKit 2 surface: `Product`, `Transaction`, `PurchaseAction`, `StoreView` and `SubscriptionStoreView`. It tells you to leave the original `SKProduct` and `SKPaymentQueue` APIs alone unless an older OS version forces your hand.

Covered inside: product types (consumable, non-consumable, auto-renewable, non-renewing), fetching items with `Product.products(for:)`, every `PurchaseResult` branch, the `Transaction.updates` listener, and entitlement checks through `Transaction.currentEntitlements`. Separate sections handle restore purchases, subscription status, Family Sharing, Ask to Buy, refunds and billing retry.

Start the `Transaction.updates` listener when the app launches, not when a paywall appears. A purchase made on another device, or an Ask to Buy approval, will otherwise slip past. For custom SwiftUI buttons the skill reaches for `PurchaseAction` from the environment; on watchOS it uses `product.purchase(options:)`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill storekit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/storekit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/storekit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill storekit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/storekit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill storekit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/storekit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills storekit
```

2. **Manually: put the files in place**
- File: `.github/skills/storekit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill storekit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/storekit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/storekit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill storekit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/storekit/SKILL.md

## When to use it
- build a paywall with `SubscriptionStoreView` instead of hand-rolled UI
- handle every `PurchaseResult` branch, `.pending` included
- check active entitlements via `Transaction.currentEntitlements`
- wire the `Transaction.updates` listener at app launch
- work through Family Sharing, Ask to Buy and refunds

## Example prompts
- Build a subscription screen with `SubscriptionStoreView` for monthly and yearly plans
- Add a premium entitlement check using `Transaction.currentEntitlements`
- Handle a consumable purchase and cover the `.pending` case

## Similar
- [vercel-react-native-skills](https://affpapa.org/en/nevibecode/skills/vercel-react-native-skills.md) — skill · 255200 installs
- [animate-expo](https://affpapa.org/en/nevibecode/skills/animate-expo.md) — skill · 137900 installs
- [mobile-native](https://affpapa.org/en/nevibecode/skills/mobile-native.md) — skill · 86600 installs
- [aso](https://affpapa.org/en/nevibecode/skills/aso.md) — skill · 75400 installs
- [swiftui-pro](https://affpapa.org/en/nevibecode/skills/swiftui-pro.md) — skill · 35200 installs
- [orca-emulator](https://affpapa.org/en/nevibecode/skills/orca-emulator.md) — skill · 5800 installs

## Other versions with the same name
- [storekit · prisma-labs-dev](https://affpapa.org/en/nevibecode/skills/prisma-labs-dev-storekit.md) — 490 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
