app-store
App Store optimization and marketing skills for descriptions, screenshots, keywords, review responses, and comprehensive…
Generates state preservation and restoration infrastructure for navigation paths, tab selection, scroll positions, and form data across app launches and background termination. Use when user wants to save/restore app state, remember where the user left off, or persist UI state.
Claude Code
$ npx -y skills add rshankras/claude-code-apple-skills --skill state-restoration --agent claude-code
Codex
$ npx skills add rshankras/claude-code-apple-skills --skill state-restoration -a codex -y
Cursor
$ npx skills add rshankras/claude-code-apple-skills --skill state-restoration -a cursor -y
Gemini CLI
$ npx skills add rshankras/claude-code-apple-skills --skill state-restoration -a gemini-cli -y
GitHub Copilot
$ npx skills add rshankras/claude-code-apple-skills --skill state-restoration -a github-copilot -y
OpenCode
$ npx skills add rshankras/claude-code-apple-skills --skill state-restoration -a opencode -y
Windsurf
$ npx skills add rshankras/claude-code-apple-skills --skill state-restoration -a windsurf -y
name: state-restoration description: Generates state preservation and restoration infrastructure for navigation paths, tab selection, scroll positions, and form data across app launches and background termination. Use when user wants to save/restore app state, remember where the user left off, or persist UI state. allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion] last_verified: 2026-07-16 review_by: 2027-06-22 os_version: iOS 27 / macOS 27
Generate production state restoration infrastructure that saves and restores app state (selected tab, scroll position, navigation path, form data) across launches and background termination. Uses Codable state models, @SceneStorage, @AppStorage, and custom file-based persistence.
Use this skill when the user:
Search for existing state restoration:
Glob: **/*StateRestoration*.swift, **/*AppState*.swift, **/*SceneStorage*.swift Grep: "SceneStorage" or "NavigationPath" or "selectedTab" or "scrollPosition"
If existing state management found:
Determine which navigation pattern the app uses:
Grep: "NavigationStack" or "NavigationSplitView" or "TabView" or "NavigationLink"
This affects which restoration components to generate.
Ask user via AskUserQuestion:
1. **What state to restore?** (multi-select)
2. **Storage method?**
3. **Restore behavior?**
Read `templates.md` for production Swift code.
Generate these files: 1. `AppState.swift` — Codable struct capturing all restorable state 2. `StateRestorationManager.swift` — @Observable manager with auto-save and restore
Based on configuration: 3. `NavigationStateModifier.swift` — If navigation path selected 4. `ScrollRestorationModifier.swift` — If scroll position selected 5. `TabRestorationModifier.swift` — If tab selection selected 6. `FormDraftManager.swift` — If form data selected
Check project structure:
After generation, provide:
StateRestoration/ ├── AppState.swift # Codable state model ├── StateRestorationManager.swift # Auto-save/restore orchestrator ├── NavigationStateModifier.swift # Navigation path persistence (optional) ├── ScrollRestorationModifier.swift # Scroll position persistence (optional) ├── TabRestorationModifier.swift # Tab selection persistence (optional) └── FormDraftManager.swift # Form draft auto-save (optional)
**Basic setup in App struct:**
@main
struct MyApp: App {
@State private var stateManager = StateRestorationManager()
var body: some Scene {
WindowGroup {
ContentView()
.environment(stateManager)
}
}
}**Restore navigation path:**
struct ContentView: View {
@Environment(StateRestorationManager.self) private var stateManager
var body: some View {
@Bindable var sm = stateManager
NavigationStack(path: $sm.navigationPath) {
HomeView()
.navigationDestination(for: Route.self) { route in
RouteView(route: route)
}
}
.modifier(NavigationStateModifier(stateManager: stateManager))
}
}**Restore tab selection:**
struct MainTabView: View {
@Environment(StateRestorationManager.self) private var stateManager
var body: some View {
@Bindable var sm = stateManager
TabView(selection: $sm.selectedTab) {
HomeTab().tag(0)
SearchTab().tag(1)
ProfileTab().tag(2)
}
.modifier(TabRestorationModifier(stateManager: stateManager))
}
}**Restore scroll position:**
struct ItemListView: View {
let items: [Item]
var body: some View {
ScrollView {
LazyVStack {
ForEach(items) { item in
ItemRow(item: item)
}
}
}
.modifier(ScrollRestorationModifier(scrollViewID: "item-list"))
}
}**Auto-save form drafts:**
struct ComposeView: View {
@State private var draftManager = FormDraftManager(formID: "compose")
@State privateA collection of Claude Code skills for iOS, macOS, watchOS, visionOS, and Apple platform development. These skills help you plan and build apps, maintain code quality, ensure HIG compliance, and guide you from idea to App Store.
App Store optimization and marketing skills for descriptions, screenshots, keywords, review responses, and comprehensive…
Privacy-preserving ad measurement with AdAttributionKit (SKAdNetwork's successor) — install and re-engagement attribution,…
Generate compelling App Store descriptions that convert browsers into users. Use when writing initial descriptions, improving…
Apple Search Ads campaign strategy for indie developers — paid acquisition, keyword bidding, budget planning, and ROAS…
Take a one-time in-app purchase from MISSING_METADATA to READY_TO_SUBMIT in App Store Connect — set its price schedule and…
Optimize app title, subtitle, and keywords for maximum App Store discoverability. Use when launching a new app, improving search…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.