state-restoration
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.
npx skills add rshankras/claude-code-apple-skills --skill state-restoration --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# State Restoration Generator 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. ## When This Skill Activates Use this skill when the user: - Asks to "add state restoration" or "restore state" - Wants to "save app state" or "persist UI state" - Mentions "preserve navigation" or "remember navigation path" - Asks to "remember scroll position" or "restore scroll position" - Wants the app to "resume where left off" or "remember where I was" - Asks about "saving form drafts" or "preserve form data" - Mentions "tab selection persistence" or "remember selected tab" ## Pre-Generation Checks ### 1. Project Context Detection - [ ] Check Swift version (requires Swift 5.9+) - [ ] Check deployment target (iOS 17+ / macOS 14+ for @Observable) - [ ] Check for existing state saving code - [ ] Identify source file locations ### 2. Conflict Detection Search for existing state restoration: ``` Glob: **/*StateRestoration*.swift, **/*AppState*.swift, **/*SceneStorage*.swift Gr
- When This Skill Activates
- Pre-Generation Checks
- 1. Project Context Detection
- 2. Conflict Detection
- 3. Navigation Pattern Detection
- Configuration Questions
- Generation Process
- Step 1: Read Templates
- Step 2: Create Core Files
- Step 3: Create Feature Files
- Step 4: Determine File Location
- Output Format
- Files Created
- Integration Steps
What does the state-restoration skill do?
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.
How do I install it?
Run `npx skills add rshankras/claude-code-apple-skills --skill state-restoration --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From rshankras/claude-code-apple-skills, a repository with 589 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
