.claude/skills/inappkit-integration/SKILL.md
Integrate InAppKit for in-app purchases in iOS/macOS SwiftUI apps. Provides subscription management, paywall UI, and purchase gating. Use when: (1) Adding in-app purchases to a SwiftUI app, (2) Creating subscription tiers (monthly/yearly/lifetime), (3) Gating features behind purchases, (4) Building custom paywall UI, (5) User asks about InAppKit integration or subscription setup.
npx skillsauth add tddworks/inappkit inappkit-integrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
InAppKit is a SwiftUI framework for in-app purchases with declarative configuration.
Tuist (Project.swift):
packages: [
.local(path: "/path/to/InAppKit"),
]
// In target dependencies:
.external(name: "InAppKit"),
Create AppNameStore.storekit in Resources with products:
com.company.app.pass.monthly, com.company.app.pass.yearlycom.company.app.pass.lifetimeimport SwiftUI
import InAppKit
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.withPurchases(products: [
Product(AppConstants.Products.monthly),
Product(AppConstants.Products.yearly)
.withRelativeDiscount(comparedTo: AppConstants.Products.monthly, style: .percentage)
.withBadge("Popular", color: .orange),
Product(AppConstants.Products.lifetime)
])
.withPaywallHeader { PaywallHeaderView() }
.withPaywallFeatures { PaywallFeaturesView() }
.withTerms(url: AppConstants.URLs.termsOfUse)
.withPrivacy(url: AppConstants.URLs.privacyPolicy)
}
}
}
| Modifier | Purpose |
|----------|---------|
| .withPurchases(products:) | Configure products to sell |
| .withPaywallHeader { } | Custom paywall header view |
| .withPaywallFeatures { } | Custom features list view |
| .withTerms(url:) | Terms of service URL |
| .withPrivacy(url:) | Privacy policy URL |
| Modifier | Purpose |
|----------|---------|
| .requiresPurchase() | Gate behind any purchase |
| .requiresPurchase("productId") | Gate behind specific product |
| .requiresPurchase(when: condition) | Conditional gating |
| .requiresPurchase(whenItemCount: n, exceeds: limit) | Usage-based gating |
Product("com.app.monthly") // Basic product
.withBadge("Popular", color: .orange) // Add badge
.withRelativeDiscount(comparedTo: "com.app.monthly", style: .percentage)
.withMarketingFeatures(["Feature 1", "Feature 2"])
.withPromoText("Best value!")
| Property | Type | Description |
|----------|------|-------------|
| hasAnyPurchase | Bool | User has any active purchase |
| availableProducts | [Product] | Loaded StoreKit products |
| isPurchasing | Bool | Purchase in progress |
| purchaseError | Error? | Last purchase error |
| Method | Description |
|--------|-------------|
| isPurchased(_ productId:) | Check specific product |
| purchase(_ product:) | Purchase a product |
| restorePurchases() | Restore previous purchases |
struct SubscriptionButton: View {
@Binding var presentingPassSheet: Bool
var isSubscribed: Bool
var body: some View {
Button {
presentingPassSheet = true
} label: {
Image(systemName: "crown.fill")
.foregroundStyle(
isSubscribed
? LinearGradient(colors: [.yellow, .orange], startPoint: .top, endPoint: .bottom)
: LinearGradient(colors: [.gray, .gray.opacity(0.7)], startPoint: .top, endPoint: .bottom)
)
}
}
}
// Usage in toolbar:
ToolbarItem(placement: .primaryAction) {
SubscriptionButton(
presentingPassSheet: $presentingPassSheet,
isSubscribed: InAppKit.shared.hasAnyPurchase
)
}
.sheet(isPresented: $presentingPassSheet) {
PaywallView()
}
// Limit free users to 3 items
Button("Add Item") { }
.requiresPurchase(whenItemCount: items.count, exceeds: 3)
if InAppKit.shared.hasAnyPurchase {
// Premium feature code
} else {
// Free tier fallback
}
PaywallHeaderView:
struct PaywallHeaderView: View {
var body: some View {
VStack(spacing: 16) {
Image("AppIcon")
.resizable()
.frame(width: 80, height: 80)
.clipShape(RoundedRectangle(cornerRadius: 18))
Text("App Pro")
.font(.title.bold())
Text("Unlock all features")
.foregroundStyle(.secondary)
}
}
}
PaywallFeaturesView:
struct PaywallFeaturesView: View {
var body: some View {
VStack(alignment: .leading, spacing: 16) {
FeatureRow(icon: "infinity", title: "Unlimited Items", description: "No limits")
FeatureRow(icon: "sparkles", title: "Pro Features", description: "Exclusive access")
}
.padding()
}
}
private struct FeatureRow: View {
let icon: String
let title: String
let description: String
var body: some View {
HStack(alignment: .top, spacing: 12) {
Image(systemName: icon)
.font(.title2)
.foregroundStyle(.mint)
.frame(width: 32)
VStack(alignment: .leading, spacing: 4) {
Text(title).font(.headline)
Text(description).font(.subheadline).foregroundStyle(.secondary)
}
}
}
}
enum AppConstants {
enum URLs {
static let privacyPolicy = URL(string: "https://...")!
static let termsOfUse = URL(string: "https://www.apple.com/legal/internet-services/itunes/dev/stdeula/")!
}
enum Products {
static let monthly = "com.company.app.pass.monthly"
static let yearly = "com.company.app.pass.yearly"
static let lifetime = "com.company.app.pass.lifetime"
}
}
.withPurchases() chain to app entry point.requiresPurchase()development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.