What problem does it solve?
SwiftUI code often breaks down through unclear state ownership, unstable view identity, unstructured async tasks, and missed accessibility requirements. This Skill provides focused implementation guidance for refactoring and building SwiftUI surfaces safely without changing product behavior or API contracts.
Core Features & Use Cases
- State and identity guidance: Establishes single sources of truth, stable ForEach IDs, value-driven NavigationStack routes, and narrow observation ownership.
- Concurrency correctness: Applies structured async/await, task cancellation, stale-result suppression, and main-actor UI mutation boundaries.
- Accessibility and performance hardening: Covers Dynamic Type, VoiceOver labels, Reduce Motion and Reduce Transparency, lazy collections, and avoiding expensive work in view bodies.
- Use Case: When a chat screen's polling publishes stale results after navigation, use this Skill to redesign state ownership, add version guards and cancellation, and keep session logic in the shared model layer.
Quick Start
Ask the agent to refactor a SwiftUI view so its state ownership, navigation, cancellation, and accessibility states are correct without changing the API contract.