mcpbeat Sign in

Paywall Generator Skill for Claude

Generates StoreKit 2 subscription paywall with modern SwiftUI views. Use when user wants to add subscriptions, paywall, or in-app purchases.

9k tokens
context cost
the whole folder, loaded on every use
7
files
instructions only
0
copies elsewhere
how many repositories repackaged it
585
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/rshankras/claude-code-apple-skills --skill paywall-generator

The instruction itself

20 sections, as written by the author

Paywall Generator

Generate a complete StoreKit 2 subscription paywall with modern SwiftUI views, subscription status tracking, and proper purchase handling.

When This Skill Activates

Use this skill when the user:

  • Asks to "add subscriptions" or "add paywall"
  • Mentions "in-app purchases" or "IAP"
  • Wants "StoreKit 2" implementation
  • Asks about "subscription management"
  • Mentions "premium features" or "pro version"

Paywall Design Principles (Apple's Data)

  • Keep sign-up to 3-4 taps. Per Apple's Tech Talk: 61% conversion at 3 taps, 48% at 4 — collapsing to 7% at 9 taps.
  • Make the paywall glanceable — value proposition, price, and renewal/trial terms in one view, no scrolling to find the price.
  • Show clear renewal and trial terms everywhere you pitch the subscription, not just on the paywall.
  • Persistent entry point over pop-ups — a tasteful, always-available subscribe button (plus subscribe/manage in Settings). Pop-ups train users to dismiss.
  • Trigger the offer at moments of interest — when the user taps locked content, not on a timer.
  • Offer 3-4 duration tiers so users self-select their commitment level.
  • Let users experience value first — free trial (works best for known brands), freemium, or content sampling (e.g., N free articles per month).

Pre-Generation Checks

1. Project Context Detection

  • [ ] Check for existing StoreKit implementations
  • [ ] Check deployment target (StoreKit 2 requires iOS 15+)
  • [ ] Look for existing product IDs in codebase
  • [ ] Identify source file locations

2. Conflict Detection

Search for existing StoreKit:

Glob: **/*Store*.swift, **/*Purchase*.swift, **/*Subscription*.swift
Grep: "import StoreKit" or "Product.products"

If found, ask user:

  • Replace existing implementation?
  • Extend with additional features?

Apple Docs Reference

StoreKit subscription APIs (iOS 18.4+):

  • SubscriptionOfferView - New SwiftUI view for merchandising subscriptions
  • subscriptionStatusTask modifier for tracking subscription state
  • Transaction.currentEntitlements(for:) - per-product entitlement check (iOS 18.4+)
  • RenewalInfo enhancements for expiration reasons

Configuration Questions

Ask user via AskUserQuestion:

  • Subscription tiers? (multi-select)
  • Monthly
  • Yearly (with discount)
  • Lifetime
  • Weekly
  • Features needed?
  • Free trial
  • Family sharing
  • Promotional offers
  • UI style?
  • Full paywall screen
  • Inline subscription view
  • Both

Generation Process

Step 1: Create Core Files

Generate these files:

  • StoreKitManager.swift - Product loading and purchasing
  • SubscriptionStatus.swift - Status tracking
  • PaywallView.swift - Full paywall UI
  • SubscriptionButton.swift - Individual plan button

Step 2: Create Configuration

  • Products.swift - Product ID constants

Step 3: Determine File Location

Check project structure:

  • If Sources/ exists → Sources/Store/
  • If App/ exists → App/Store/
  • Otherwise → Store/

Product ID Setup

App Store Connect

  • Go to App Store Connect > Your App > Subscriptions
  • Create subscription group
  • Add subscription products with IDs like:
  • com.yourapp.subscription.monthly
  • com.yourapp.subscription.yearly
  • com.yourapp.subscription.lifetime

StoreKit Configuration (Testing)

Create Products.storekit for local testing:

  • File > New > File > StoreKit Configuration
  • Add products matching your IDs
  • Edit scheme > Options > StoreKit Configuration

Output Format

After generation, provide:

Files Created

Sources/Store/
├── StoreKitManager.swift        # Product loading & purchasing
├── SubscriptionStatus.swift     # Status enum & tracking
├── Products.swift               # Product ID constants
└── Views/
    ├── PaywallView.swift        # Full paywall screen
    ├── SubscriptionButton.swift # Plan selection button
    └── SubscriptionOfferCard.swift # iOS 18.4+ view

Integration Steps

App Entry Point:

@main
struct MyApp: App {
    @State private var subscriptionStatus: SubscriptionStatus = .unknown

    var body: some Scene {
        WindowGroup {
            ContentView()
                .environment(\.subscriptionStatus, subscriptionStatus)
                .subscriptionStatusTask(for: "your.group.id") { statuses in
                    subscriptionStatus = SubscriptionStatus.from(statuses)
                }
        }
    }
}

Show Paywall:

struct ContentView: View {
    @State private var showPaywall = false
    @Environment(\.subscriptionStatus) var status

    var body: some View {
        VStack {
            if status != .subscribed {
                Button("Upgrade to Pro") {
                    showPaywall = true
                }
            }
        }
        .sheet(isPresented: $showPaywall) {
            PaywallView()
        }
    }
}

SubscriptionOfferView (iOS 18.4+):

// Simple merchandising view
SubscriptionOfferView(productID: "com.app.subscription.monthly")
    .prefersPromotionalIcon(true)
    .subscriptionOfferViewDetailAction {
        showPaywall = true
    }

Testing Instructions

  • Create StoreKit Configuration:
  • File > New > StoreKit Configuration
  • Add your products
  • Edit Scheme:
  • Product > Scheme > Edit Scheme
  • Options > StoreKit Configuration > Select your file
  • Test Purchases:
  • Run in Simulator
  • Use Transaction Manager (Debug > StoreKit > Transaction Manager)
  • Test Scenarios:
  • Purchase flow
  • Restore purchases
  • Subscription expiration
  • Renewal

References

  • storekit-patterns.md - Best practices and patterns
  • templates/ - All template files
  • Apple Docs: StoreKit Updates (iOS 18.4+)

Other skills for the same job

different authors, same section of the catalogue
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

16k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

36k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

961 tokens
Executing Plans
by ZhanlinCui
×3

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

16k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

14k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

24k tokens

How to use it

Copy the folder

Take rshankras/paywall-generator from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.