- Home
- Skills
- Mobile Development
- SwiftUI Modernity Assistant
Works with the AI Agents you already use
SwiftUI Modernity Assistant
Ship SwiftUI that feels native — modern state, navigation, layout, and accessibility baked in from the first generated line.
$5
SwiftUI Modernity Assistant
Example session with this skill installed
I'm migrating our task-manager app's UI layer and the code our assistant generated last sprint looks dated. Can you review all the SwiftUI files under Sources/Features/Tasks/ against current Apple guidance? Specifically, TaskListView.swift still uses NavigationView, TaskStore.swift is an ObservableObject with duplicated filtered state, and several custom cards are tappable via onTapGesture with no accessibility labels. Refactor them to the modern @Observable and NavigationStack patterns, keep behavior identical, and give me a summary of what changed and anything you deliberately left alone with the reason.
- Read your context and instructions
- Compiled the swiftui modernity assistant
Summary
Reviewed 14 SwiftUI files in Sources/Features/Tasks/ against current Apple guidance. Modernized navigation and shared state, removed duplicated derived data, and restored VoiceOver access to two custom controls. Behavior unchanged.
Refactors Applied
| Metric | Before | After |
|---|---|---|
| Navigation API | NavigationView + tag links | NavigationStack(path:) + typed Route enum |
| Shared model | ObservableObject + @Published | @Observable class, @Bindable in editor |
| Derived state | @State filteredItems copy | computed property, one source of truth |
| Row identity | ForEach(0..<count, id: \\.self) | Identifiable items, stable IDs |
| Custom cards | bare onTapGesture | Button content with label + .isButton trait |
Key change
@State private var path: [Route] = []
NavigationStack(path: $path) {
TaskListView()
.navigationDestination(for: Route.self) { route in
switch route {
case .detail(let id): TaskDetailView(itemID: id)
case .settings: SettingsView()
}
}
}
Next steps
- Profile TaskList scroll with Instruments before caching any derived work.
- Replace remaining fixed
.frame(width:height:)buttons with.controlSize(.large). - Run a VoiceOver pass at AX5 Dynamic Type on the editor sheet.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
SwiftUI apps often suffer from deprecated navigation patterns, inefficient state management that triggers unnecessary re-renders, and poor accessibility. Developers frequently struggle to keep up with modern Apple APIs like @Observable and NavigationStack.
What it does
- Generates modern SwiftUI views using
@ObservableandNavigationStackinstead of deprecated legacy patterns. - Optimizes view performance by keeping state close to consumers and preventing heavy computation inside
bodyproperties. - Implements native accessibility by default, ensuring controls have proper labels, traits, and VoiceOver behavior.
- Refactors older SwiftUI code into clean, maintainable hierarchies using
@ViewBuilderand custom modifiers.
Frameworks & tools
Swift, SwiftUI, Observation framework, SwiftData, and Apple SDKs for iOS, macOS, iPadOS, watchOS, and visionOS.
Why this beats prompting it yourself
Standard LLMs often fallback to 2019-era SwiftUI patterns like NavigationView and ObservableObject. This skill enforces strict modernity, ensuring your code uses the latest Swift concurrency, observation macros, and layout protocols without manual correction.
Use cases
- Modernizing legacy SwiftUI views to use the
@Observablemacro. - Building complex navigation flows with type-safe
NavigationStackpaths. - Debugging scroll performance and layout bottlenecks in deep view trees.
- Ensuring all UI components meet Apple's Human Interface Guidelines for accessibility.
Targets modern @Observable/NavigationStack APIs, so iOS 14-16 codebases need the legacy fallbacks noted inline. It guides correctness and structure but cannot profile runtime performance for you — ambiguous claims still need Instruments.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
8 uses
Times used to date
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 month ago
Permissions
File Scopes
Needs read and edit access to your Swift source files to review and refactor SwiftUI code; no network access or secrets required.