generators-state-restoration
CommunityPersist and restore app UI state
System Documentation
What problem does it solve?
When users leave an app or the system terminates a scene, the app can lose navigation context, selected tabs, scroll offsets, and in-progress form data; rebuilding that state manually is error-prone and leads to a poor user experience. This skill provides a repeatable, production-ready approach to capture and restore UI state so apps resume exactly where users left off.
Core Features & Use Cases
- Navigation path persistence: Encode and restore NavigationStack paths so deep-linked or multi-step flows return to the correct screen.
- Tab selection and scene-aware storage: Persist TabView selection across launches and support per-scene @SceneStorage or shared UserDefaults/file backends.
- Scroll position and form draft autosave: Track top-visible items and debounce form drafts to Application Support or UserDefaults with clear-on-submit behavior.
- Restore policies and safety: Time-limited restores, ask-before-restore prompts, state versioning and graceful fallbacks for schema changes.
- Use Case: Resume a multi-window iPad app with each window restoring its own navigation stack, selected tab, and unsaved draft text after an update or background termination.
Quick Start
Ask the skill to generate a StateRestorationManager, AppState model, and optional modifiers for NavigationStack, TabView, scroll views, and form drafts targeted to your SwiftUI app.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: generators-state-restoration Download link: https://github.com/AutisticAF/claude-code-apple-dev-plugin/archive/main.zip#generators-state-restoration Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.