subscription-lifecycle

Generate StoreKit 2 subscription lifecycle code for iOS and macOS apps.

27|5|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/bocan/bocan-music --skill subscription-lifecycle-bocan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subscription-lifecycle
Source: https://github.com/bocan/bocan-music/tree/main/.claude/skills/generators/subscription-lifecycle
Command: npx skills add https://github.com/bocan/bocan-music --skill subscription-lifecycle-bocan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the manual effort of implementing robust subscription state handling in iOS and macOS apps, ensuring developers can reliably manage grace periods, billing retries, and tier transitions without building complex StoreKit 2 logic from scratch.

Core Features & Use Cases

  • Lifecycle State Management: Automatically handles active, grace period, billing retry, expired, and revoked states with proper access gating.
  • Retention & Re-engagement: Built-in support for win-back offers, offer codes, and promotional offers to reduce churn.
  • Upgrade/Downgrade Paths: Manages tier transitions with proper proration and pending change detection.
  • Use Case: Imagine you're building a fitness app with Basic, Pro, and Enterprise tiers. Use this Skill to generate the code that keeps users logged in during payment failures, shows them a warning banner, and automatically presents a win-back offer when their subscription lapses.

Quick Start

Use the subscription-lifecycle skill to generate a complete subscription monitoring system with grace period handling and win-back offers for your app's subscription group.

Frequently Asked Questions about subscription-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle StoreKit 2 subscription grace periods and billing retries?

StoreKit 2 subscription lifecycle management requires monitoring transaction updates to detect billing failures and maintaining entitlement access during grace periods while the system retries payments. This Skill generates the necessary code to automate these state transitions.

What's the best way to implement win-back offers for lapsed iOS subscriptions?

Implementing win-back offers for lapsed iOS subscriptions requires detecting when a user's subscription expires and automatically presenting a promotional offer to encourage renewal. This Skill generates code that identifies lapsed users and surfaces win-back offers within your SwiftUI interface.

How do I manage subscription tier upgrades and downgrades with proper proration?

Managing subscription tier upgrades and downgrades with proration involves detecting pending transaction changes and mapping them to the correct entitlement levels. This Skill generates the logic to handle tier transitions and ensures users receive the correct prorated access.

Does this approach support real-time transaction monitoring for macOS apps?

Yes, the generated code supports real-time transaction monitoring for both iOS and macOS applications using modern Swift concurrency. It continuously tracks StoreKit 2 transaction updates to keep entitlement mappings accurate across platforms.

How do I integrate subscription entitlement mapping with a SwiftUI dashboard?

Integrating subscription entitlement mapping with a SwiftUI dashboard uses the @Observable macro to track state changes and update the UI reactively. This Skill produces code that connects transaction monitoring directly to your SwiftUI views.

Why does my StoreKit 2 subscription state show expired when a payment fails?

A StoreKit 2 subscription state shows expired when a payment fails if the system does not actively detect the billing retry window and transition the user to a grace period state. This Skill generates the logic to intercept these failures and maintain temporary access.