skills/generators/onboarding-generator/SKILL.md
Generates value-moment-first onboarding flows for iOS/macOS apps — the default architecture races a new user to the first felt experience of the app's promised outcome, branching on whether they can experience it right now or need to plan for later. The classic paged welcome-carousel tour is an explicit fallback for genuinely explain-first apps. Use when user wants to add onboarding, welcome screens, first-launch experience, or improve activation/trial conversion.
npx skillsauth add rshankras/claude-code-apple-skills onboarding-generatorInstall 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.
Generate onboarding whose job is to get a new user to the value moment — the first time they experience (never just read about) the outcome the app promises — as fast as their situation allows.
Default architecture: value-moment-first, branching on readiness. The user answers one question ("can you do this right now?"), and the path is either the shortest possible route to the value moment, or a captured plan to reach it later. Fallback architecture: the classic paged welcome carousel — generate it only when Step 0 below confirms the app is genuinely explain-first.
Read onboarding-patterns.md for the full philosophy, the nine implementation lessons (each with a code sketch), and a worked case study.
Use this skill when the user:
This is the question that decides every downstream choice — ask it before any configuration question. If the requester can't answer it, help them find it: it's the first specific instant a user feels the outcome, not a feature list. "Sees a demo of X" is not a value moment; "actually did X and saw the result" is.
Onboarding that ends before the user felt the value moment didn't finish — it just stopped.
@Observable needs iOS 17+/macOS 14+; fall back to ObservableObject below that)onboarding-patterns.md Lesson 3)Glob: **/*Paywall*.swift, **/*StoreKit*.swift, or an installed generators/paywall-generator output) — determines free-first vs paywalled-first in Configuration Question 2UNUserNotificationCenter usage already in the project — reuse the existing permission seam if one exists rather than creating a secondGlob: **/*Onboarding*.swift, **/*Welcome*.swift
Grep: "hasCompletedOnboarding" or "isFirstLaunch" or "onboardingCompleted"
If found, ask the user:
generators/quick-win-sessionIf the project already has a quick-win-session installation, don't generate a second guided-first-action system. Ask whether the existing quick-win session already is the ready-now path (often it is — fold this flow's branch question and later-path in around it) or whether the two should stay separate stages.
Ask user via AskUserQuestion:
What's the value moment? (free text) — the first specific instant the user experiences the app's promise. Push back on feature descriptions ("a calendar sync feature") until you get an outcome ("saw their two calendars merged into one").
Free-first or paywalled-first?
What's the ready-now action? — the shortest real path to the value moment when the user can experience it immediately. Must name an existing feature/screen to reuse, never a new one built just for onboarding.
What does "later" capture? — the concrete implementation intention (a specific when, e.g. "Tuesday 6pm," never "someday"), and what happens with it: a local reminder, a home-surface chip, both?
Architecture override — is this genuinely explain-first? Default is no (value-moment-first). Only say yes if Step 0's test below is met. This is the one question that routes to the carousel fallback instead.
Run this test:
Would skipping straight to the value moment leave the user unable to understand what they're looking at, in a way no amount of contextual UI (tooltips, empty-state copy, a single explainer inline) could fix — because the domain itself requires orientation (e.g., a professional tool with domain-specific jargon, a multi-role enterprise workflow)?
Read templates/value-moment/ for production Swift code, then generate:
OnboardingPhase.swift — the phase/branch state model (one enum case per screen; every case maps to exactly one decision)OnboardingStore.swift — @Observable coordinator (plain object, not a View — see onboarding-patterns.md Lesson 1's testability point). Owns phase transitions, the branch, the captured "when," and calls into instrumentation. No navigation/routing types inside it — the app's existing router/state owns side effects, this store owns only business state.OnboardingRootView.swift — the phase switch. No NavigationStack of its own (this view is a root, never a pushed destination — see the global SwiftUI-patterns rule against nesting nav containers).OnboardingBranchView.swift — screen 1: value-moment framing + the ready-now/later fork. This is the only screen every user sees.OnboardingReadyNowBridgeView.swift — the ready-now hand-off into the real feature, with resume-callback wiring (Lesson 3 + Lesson 4)OnboardingIntentionView.swift — later path: capture the concrete "when" via chips, resolved through a pure, injectable-clock function (Lesson 7)OnboardingReminderView.swift + OnboardingReminderService.swift — later path: the contextual local-notification permission ask (Lesson 6)OnboardingInstrumentation.swift — value-moment reach-rate markers (Lesson 8)Onboarding replaces the app's root view; it is never a .fullScreenCover/.sheet over the real content. Show the requester this shape and adapt it to their app's actual root:
struct ContentView: View {
@State private var onboardingStore = OnboardingStore()
private var showOnboarding: Bool {
// Phase-first (Lesson 2): check the in-memory state machine FIRST;
// the durable flag is only the survives-relaunch fallback.
if appState.onboardingCompleted { return false }
return onboardingStore.phase != .completed && onboardingStore.phase != .awaitingHandoffReturn
}
var body: some View {
Group {
if showOnboarding {
OnboardingRootView(store: onboardingStore)
} else {
RealAppRootView() // whatever the app's true root already is
}
}
.onChange(of: onboardingStore.phase) { _, newPhase in
guard newPhase == .completed else { return }
appState.onboardingCompleted = true // durable fallback catches up
}
}
}
Arm a one-shot completion callback before the hand-off, plus a wander-off safety net that completes onboarding silently if the user backs out without resolving:
func beginReadyNowHandoff() {
store.beginHandoff()
router.presetPathIntoRealFeature(...) // land straight on the feature, never Home
router.onRealFeatureFinished = { outcome in
store.handoffReturned(valueMomentReached: outcome.reachedValueMoment)
}
}
// Safety net — user backed all the way out without the callback firing.
.onChange(of: router.path) { _, newPath in
guard store.phase == .awaitingHandoffReturn, newPath.isEmpty else { return }
store.abandonToHome() // NEVER re-interrupts; completes quietly
}
Adding this flow will break the first screen of every existing UI test that assumes it lands on the app's real home screen. Before finishing generation:
ProcessInfo.processInfo.arguments), usually in a UITestSupport-style file.static var showOnboardingOverride: Bool {
ProcessInfo.processInfo.arguments.contains("-uiTestShowOnboarding")
}
// At app launch, under the existing test-mode gate:
appState.onboardingCompleted = !UITestSupport.showOnboardingOverride
-uiTestShowOnboarding to exercise the real flow.After the plan lands, surface it on the app's home surface — a small chip/badge carrying the planned date/action that reopens the flow when tapped — and prune it once the date passes:
if let plannedAt = appState.plannedIntentionDate {
PlannedIntentionChip(date: plannedAt) { /* reopen the ready-now path directly */ }
}
// Called from wherever the home surface is revisited:
func prunePlannedIntentionIfExpired(now: Date = .now) {
guard let plannedIntentionDate, plannedIntentionDate <= now else { return }
self.plannedIntentionDate = nil
}
Read templates/carousel-fallback/ and the "Carousel Fallback" section of onboarding-patterns.md. Generate:
OnboardingView.swift — main paged/stepped containerOnboardingPageView.swift — individual page templateOnboardingPage.swift — page data modelOnboardingStorage.swift — persistenceOnboardingModifier.swift — view modifier for integrationAsk the same navigation-style/skip/presentation configuration questions as before (paged vs stepped, 2–5 screens, skip option, full-screen cover vs inline). Even here: still apply the root-swap and UI-test-suppression steps above — the presentation mechanics change, the anti-flash and anti-broken-test requirements don't.
Check project structure:
Sources/ exists → Sources/Onboarding/App/ exists → App/Onboarding/Onboarding/Run this before calling generation done — on a fresh flow, and again any time onboarding is later touched. If any answer is "no," the flow needs work before it ships:
After generation, provide:
Onboarding/
├── OnboardingPhase.swift # Phase/branch state model
├── OnboardingStore.swift # @Observable coordinator (business state only)
├── OnboardingRootView.swift # Phase switch — the root-swap target
├── OnboardingBranchView.swift # Screen 1: value-moment framing + fork
├── OnboardingReadyNowBridgeView.swift # Ready-now hand-off + resume wiring
├── OnboardingIntentionView.swift # Later: concrete "when" capture
├── OnboardingReminderView.swift # Later: contextual permission ask
├── OnboardingReminderService.swift # Local-notification seam (protocol + live impl)
└── OnboardingInstrumentation.swift # Value-moment reach-rate markers
Onboarding/
├── OnboardingView.swift # Main container
├── OnboardingPageView.swift # Page template
├── OnboardingPage.swift # Data model
├── OnboardingStorage.swift # @AppStorage persistence
└── OnboardingModifier.swift # .onboarding() modifier
Root swap (both architectures):
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView() // ContentView itself performs the root swap — see Step 2
}
}
}
Value-moment: define the app's own phases and hand-offs in OnboardingPhase.swift/OnboardingStore.swift — the template ships a two-phase (ready-now / later) skeleton; add or remove phases to match the actual value moment, keeping one decision per phase.
Carousel fallback: add pages as before —
static let pages: [OnboardingPage] = [
OnboardingPage(title: "Welcome", description: "...", imageName: "hand.wave", accentColor: .blue),
]
Value-moment flow:
UserDefaults)Carousel fallback: unchanged from the classic flow — delete app, confirm it shows once, confirm it doesn't reappear after completion.
// Add to Settings or debug menu
Button("Reset Onboarding") {
UserDefaults.standard.removeObject(forKey: "hasCompletedOnboarding")
OnboardingInstrumentation.resetForTesting(defaults: .standard) // value-moment flow only
}
Track value-moment reach rate — percentage of new users who reach the value moment in their first session, time-to-reach, and per-screen drop-off — not flow completion. A user who reached the value moment and closed the app is a win; a user who tapped through every screen and never felt it is not.
This works even in apps with no analytics SDK: local-only markers (UserDefaults timestamps for startedAt/branch/valueMomentAt/completedAt) plus os.Logger, every write idempotent (first stamp wins) so re-entrant paths never overwrite a real timestamp with a later, less meaningful one. See onboarding-patterns.md Lesson 8 for the full pattern; wire into a real analytics provider (e.g. an installed generators/analytics-setup output) when one exists.
generators/quick-win-session — guided first-action UI; check for overlap before generating both (see Pre-Generation Check 3)generators/permission-priming — deeper priming patterns if the reminder step needs more than a single contextual askgenerators/paywall-generator — the pre-purchase half of the flow for paywalled-first appsgenerators/push-notifications — remote push infrastructure, distinct from this skill's local-only reminder (no server involved)development
US web checkout via the StoreKit External Purchase Link entitlement — currently 0% Apple commission (litigation ongoing), how to ship it safely, and how to architect for a commission flip so a future ruling is a config change, not a rewrite. Use when adding external purchase links, weighing web checkout vs IAP, or planning US-storefront pricing strategy.
tools
Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School & Business Manager. Use when a developer has multiple apps, a subscription worth sharing, complementary indie partners, or school/clinic/business buyers.
testing
Run a structured accessibility audit on an iOS/macOS app — automated XCUITest audits, Accessibility Inspector, manual VoiceOver/Dynamic Type passes, and App Store Accessibility Nutrition Label evaluation. Use before release, when preparing Nutrition Label declarations, or for EU Accessibility Act compliance.
tools
Stage-by-stage audit of an app's App Store growth machinery against a 54-item P0–P9 playbook — every item scored from an App Store Connect MCP call, a codebase check, or an explicit question to the user, then routed to the skill or command that fixes it. Read-only on App Store Connect. Use for a growth audit or scorecard, a pre-launch growth plan, a quarterly re-audit, or "which growth levers am I missing."