Agent skill
win-back-offers
Generates the complete win-back offer flow for churned subscribers — StoreKit Message API handling, eligibility verification, offer sheet presentation, and analytics. Use when implementing win-back campaigns or re-engagement for lapsed subscribers.
Install this agent skill to your Project
npx add-skill https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/generators/win-back-offers
SKILL.md
Win-Back Offers Generator
Generate a complete win-back flow for recovering churned subscribers using StoreKit 2's win-back offer APIs (iOS 18+), Message API handling, and fallback promotional offers for older OS versions.
When This Skill Activates
Use this skill when the user:
- Asks to "win back" or "re-engage" churned subscribers
- Mentions "lapsed subscribers" or "subscriber recovery"
- Wants to implement "win-back offers" (iOS 18+)
- Asks about "subscription churn" reduction
- Mentions "Message API" for subscription offers
- Wants to reduce subscriber attrition
Minimum Eligibility
Win-back offers involve meaningful engineering and ASC configuration. Check these thresholds before proceeding:
| Churned Subscribers | Recommendation |
|---|---|
| Under 50 | Not worth the setup effort. Use personal email outreach instead — write individual messages to churned users. Focus energy on preventing churn (improve onboarding, engagement). |
| 50-500 | Implement basic win-back via promotional offers (simpler than full win-back flow). Use offer codes distributed via email. |
| 500+ | Full win-back implementation justified. Native iOS 18+ win-back offers, Message API handling, automated pipeline. |
If you don't know your churn numbers: Check App Store Connect > Subscriptions > Retention metrics. If your total subscriber base is under 200, you likely don't have enough churn volume to justify this skill yet.
Pre-Generation Checks
1. Project Context Detection
- Check for existing StoreKit implementation
- Check deployment target (iOS 18+ for native win-back, iOS 16+ for promotional offer fallback)
- Look for existing subscription management code
- Check if
subscription-offersskill was already used - Check churn volume — is the number of churned subscribers worth automating?
2. Conflict Detection
Glob: **/*WinBack*.swift, **/*Reengag*.swift
Grep: "winBackOffers" or "Message.messages" or "presentWinBackOffer"
Configuration Questions
Ask user via AskUserQuestion:
-
Win-back approach
- Native win-back offers only (iOS 18+ required)
- Promotional offer fallback (supports iOS 16+)
- Both (recommended)
-
Message handling
- Handle App Store messages in-app (recommended)
- Let system handle messages
- Custom message presentation
-
Analytics integration
- Basic (print logging)
- Custom analytics protocol
- Specific SDK (specify which)
Generation Process
Step 1: Read Templates
Read templates.md for all win-back implementation code.
Step 2: Create Core Files
- WinBackOfferManager.swift — Win-back offer detection, eligibility, and presentation
- WinBackMessageHandler.swift — StoreKit Message API integration for in-app offer display
- WinBackEligibility.swift — Churn detection and eligibility logic
- WinBackOfferView.swift — Custom win-back offer presentation UI
Step 3: Create Optional Files
- WinBackAnalytics.swift — Track win-back funnel metrics
- WinBackFallback.swift — Promotional offer fallback for iOS < 18
Step 4: Determine File Location
- If Sources/Store/ exists → Sources/Store/WinBack/
- If Store/ exists → Store/WinBack/
- Otherwise → WinBack/
Output Format
Files Created
Store/WinBack/
├── WinBackOfferManager.swift # Core win-back logic
├── WinBackMessageHandler.swift # Message API handling
├── WinBackEligibility.swift # Churn detection
├── WinBackOfferView.swift # Custom offer UI
├── WinBackAnalytics.swift # Funnel tracking (optional)
└── WinBackFallback.swift # iOS < 18 fallback (optional)
Integration Steps
App Entry Point — Message Handling:
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.storeMessagesTask { message in
// Handle win-back messages from App Store
await WinBackMessageHandler.shared.handle(message)
}
}
}
}
Check Win-Back Eligibility:
let manager = WinBackOfferManager()
let winBackOffer = await manager.checkWinBackAvailability(
productID: "com.app.subscription.monthly"
)
if let offer = winBackOffer {
// Show win-back UI
showWinBackSheet(offer: offer)
}
Present Win-Back Offer:
// Native (iOS 18+)
SubscriptionStoreView(groupID: groupID)
.preferredSubscriptionOffer { product, subscription, offers in
offers.first { $0.type == .winBack }
}
Testing Instructions
- Sandbox Account: Create a subscriber, cancel, wait for expiry
- StoreKit Testing: Use Transaction Manager to simulate churn
- Message Testing: Test App Store message presentation
- Verify flow: Churned → Offer shown → Purchase → Active subscriber
App Store Connect Setup
- Go to Subscriptions > Your Group > Win-Back Offers
- Create offer with pricing and duration
- Set eligibility criteria (days since churn, previous subscription duration)
- Configure offer priority if multiple offers exist
References
- templates.md — All production Swift templates
- Related:
generators/subscription-offers— All offer types including win-back - Related:
generators/paywall-generator— Full paywall implementation - Related:
app-store/marketing-strategy— Win-back campaign planning
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
legal
Legal document generation and compliance guidance for indie Apple developers. Covers privacy policies, terms of service, EULAs, GDPR/CCPA/DPDP compliance, and Apple App Store legal requirements. Use when user needs legal documents or compliance guidance.
privacy-policy
Generate privacy policies, terms of service, and EULAs for Apple platform apps. Detects data collection patterns, third-party SDKs, and generates region-specific legal documents with Apple Privacy Nutrition Label mapping. Use when user needs legal documents or data collection disclosure for App Store submission.
ios-development
Comprehensive iOS development guidance including Swift best practices, SwiftUI patterns, UI/UX review against HIG, and app planning. Use for iOS code review, best practices, accessibility audits, or planning new iOS apps.
assistive-access
Assistive Access implementation for cognitive accessibility including simplified scenes, navigation icons, runtime detection, and design principles. Use when optimizing apps for Assistive Access mode.
ui-review
Review SwiftUI code for iOS/watchOS Human Interface Guidelines compliance, font usage, Dynamic Type support, and accessibility. Use when user mentions UI review, HIG, accessibility audit, font checks, or wants to verify interface design against Apple standards.
navigation-patterns
SwiftUI navigation architecture patterns including NavigationStack, NavigationSplitView, TabView, programmatic navigation, and custom transitions. Use when reviewing or building navigation, fixing navigation bugs, or architecting app flow.
Didn't find tool you were looking for?