storekit · dpearson2699 — Claude Code skill: StoreKit 2 in-app purchases
Guides your agent through StoreKit 2 in-app purchases and subscriptions: paywalls, transactions, entitlement checks.
npx skills add dpearson2699/swift-ios-skills --skill storekit -a claude-codeWhat storekit 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:).
What it helps with
- build a paywall with
SubscriptionStoreViewinstead of hand-rolled UI - handle every
PurchaseResultbranch,.pendingincluded - check active entitlements via
Transaction.currentEntitlements - wire the
Transaction.updateslistener at app launch - work through Family Sharing, Ask to Buy and refunds
Example prompts for the agent
- Build a subscription screen with
SubscriptionStoreViewfor monthly and yearly plans - Add a premium entitlement check using
Transaction.currentEntitlements - Handle a consumable purchase and cover the
.pendingcase
How to install storekit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill storekit -a claude-code2Manually: put the files in place
~/.claude/skills/storekit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/storekit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill storekit -a codex2Manually: put the files in place
.agents/skills/storekit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill storekit -a cursor2Manually: put the files in place
.cursor/skills/storekit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills storekit2Manually: put the files in place
.github/skills/storekit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill storekit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/storekitManually: put the files in place
.devin/skills/storekit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill storekit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about storekit
How do I install storekit in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill storekit -a claude-code. The skill file lands at ~/.claude/skills/storekit/SKILL.md.
What does storekit do?
It helps the agent write and review StoreKit 2 code for in-app purchases and subscriptions: paywalls, transactions, entitlement checks, restore purchases.
Which APIs does the skill use?
The modern Swift ones: Product, Transaction, PurchaseAction, StoreView and SubscriptionStoreView. It advises against the older SKProduct and SKPaymentQueue APIs.
Similar skills
Everything for Mobile →storekit by other authors comes first.