onboarding-generator
Generates multi-step onboarding flows with persistence for iOS/macOS apps. Use when user wants to add onboarding, welcome screens, or first-launch experience.
What this skill does
# Onboarding Generator
Generate a complete, customizable onboarding flow with persistence, animations, and accessibility support.
## When This Skill Activates
Use this skill when the user:
- Asks to "add onboarding" or "create onboarding"
- Mentions "welcome screens" or "first launch"
- Wants to "show intro on first launch"
- Asks about "onboarding flow" or "tutorial screens"
## Pre-Generation Checks
### 1. Project Context Detection
- [ ] Check for existing onboarding implementations
- [ ] Identify if SwiftUI or UIKit project
- [ ] Find App entry point location
- [ ] Check deployment target (TabView paging requires iOS 14+)
### 2. Conflict Detection
Search for existing onboarding:
```
Glob: **/*Onboarding*.swift, **/*Welcome*.swift
Grep: "hasCompletedOnboarding" or "isFirstLaunch"
```
If found, ask user:
- Replace existing onboarding?
- Keep existing, add new flow?
## Configuration Questions
Ask user via AskUserQuestion:
1. **Navigation style?**
- Paged (horizontal swipe with dots)
- Stepped (Next/Back buttons)
2. **Number of screens?**
- 2-5 screens (recommend 3-4)
3. **Skip option?**
- Allow skip button
- Mandatory completion
4. **Presentation style?**
- Full screen cover (modal)
- Inline (embedded in view hierarchy)
5. **Include animations?**
- Animated transitions
- Static transitions
## Generation Process
### Step 1: Create Core Files
Generate these files:
1. `OnboardingView.swift` - Main container
2. `OnboardingPageView.swift` - Individual page template
3. `OnboardingPage.swift` - Page data model
4. `OnboardingStorage.swift` - Persistence
5. `OnboardingModifier.swift` - View modifier for easy integration
### Step 2: Customize Based on Configuration
**Paged Navigation:**
```swift
TabView(selection: $currentPage) {
ForEach(pages) { page in
OnboardingPageView(page: page)
.tag(page.id)
}
}
.tabViewStyle(.page(indexDisplayMode: .always))
```
**Stepped Navigation:**
```swift
VStack {
OnboardingPageView(page: pages[currentPage])
HStack {
if currentPage > 0 {
Button("Back") { currentPage -= 1 }
}
Spacer()
Button(isLastPage ? "Get Started" : "Next") {
if isLastPage {
completeOnboarding()
} else {
currentPage += 1
}
}
}
}
```
### Step 3: Determine File Location
Check project structure:
- If `Sources/` exists → `Sources/Onboarding/`
- If `App/` exists → `App/Onboarding/`
- Otherwise → `Onboarding/`
## Output Format
After generation, provide:
### Files Created
```
Sources/Onboarding/
├── OnboardingView.swift # Main container
├── OnboardingPageView.swift # Page template
├── OnboardingPage.swift # Data model
├── OnboardingStorage.swift # @AppStorage persistence
└── OnboardingModifier.swift # .onboarding() modifier
```
### Integration Steps
**Option 1: View Modifier (Recommended)**
```swift
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.onboarding() // Automatically shows on first launch
}
}
}
```
**Option 2: Manual Control**
```swift
@main
struct MyApp: App {
@AppStorage("hasCompletedOnboarding") private var hasCompletedOnboarding = false
var body: some Scene {
WindowGroup {
ContentView()
.fullScreenCover(isPresented: .constant(!hasCompletedOnboarding)) {
OnboardingView()
}
}
}
}
```
### Customization
**Add Your Content:**
```swift
// In OnboardingStorage.swift or OnboardingView.swift
static let pages: [OnboardingPage] = [
OnboardingPage(
title: "Welcome",
description: "Your app description here",
imageName: "hand.wave", // SF Symbol or asset name
accentColor: .blue
),
// Add more pages...
]
```
### Testing Instructions
1. Delete app from simulator (to reset UserDefaults)
2. Run app - onboarding should appear
3. Complete onboarding
4. Relaunch app - onboarding should NOT appear
5. Reset via Settings or delete app to test again
### Debug/Testing Reset
```swift
// Add to Settings or debug menu
Button("Reset Onboarding") {
UserDefaults.standard.removeObject(forKey: "hasCompletedOnboarding")
}
```
## References
- **onboarding-patterns.md** - Best practices and design patterns
- **templates/** - All template files
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.