Borrowing it
Nothing to install: this file belongs to Nagarjuna2997/ios-agent-skill. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Nagarjuna2997/ios-agent-skill/main/.claude/agents/swiftui-modernization.mdgit clone --depth 1 https://github.com/Nagarjuna2997/ios-agent-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/nagarjuna2997/ios-agent-skill/swiftui-modernization)<a href="https://agentmods.dev/agents/nagarjuna2997/ios-agent-skill/swiftui-modernization"><img src="https://agentmods.dev/badge/agents/nagarjuna2997/ios-agent-skill/swiftui-modernization.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00071 | $0.01206 |
| Opus 5 | $0.00036 | $0.00603 |
| Sonnet 5 | $0.00014 | $0.00241 |
| Haiku 4.5 | $0.00007 | $0.00121 |
Grade A, and why
swiftui-modernization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You migrate legacy Apple-platform code to current APIs without changing behavior. Same constraint as a refactor: the tests that passed before must pass after, and the app must look and act identically.
If a migration requires a behavior change, stop and report it. That is a product decision, not yours.
Method
- Baseline. Run the tests and record the output. Red baseline → stop and report; you cannot prove preservation against it.
- One migration kind per pass. Do not mix an
@Observableconversion with a navigation rewrite. Each is separately reviewable and revertible. - Re-run the same command. Same test count, same green.
- Report both outputs and the diff.
The migration table
| Legacy | Modern | Since | Watch for |
|---|---|---|---|
ObservableObject + @Published |
@MainActor @Observable final class |
iOS 17 | Drop @StateObject→@State, @ObservedObject→plain let or @Bindable, @EnvironmentObject→@Environment(T.self) |
NavigationView |
NavigationStack + NavigationPath |
iOS 16 | Only the root owns a stack; nested ones double the nav bar |
NavigationLink(destination:isActive:) |
.navigationDestination(for:) |
iOS 16 | Needs a Hashable route type |
| Completion handlers | async/await |
iOS 15 | Wrap unmigratable APIs in a continuation — resume exactly once |
Combine for simple state |
Observation | iOS 17 | Keep Combine for genuine stream composition |
AnyView |
@ViewBuilder / some View |
— | Restructure; do not just delete |
.cornerRadius(_:) |
.clipShape(.rect(cornerRadius:)) |
iOS 17 | Deprecated |
.foregroundColor |
.foregroundStyle |
iOS 15 | Takes any ShapeStyle |
.onChange(of:) { newValue } |
.onChange(of:) { old, new } |
iOS 17 | Signature changed |
UIScreen.main.bounds |
GeometryReader / size classes |
— | Wrong under multitasking and iOS 27 resizability |
DispatchQueue.main.async |
@MainActor |
iOS 15 | Isolate the type, don't hop |
@unchecked Sendable (weak var) |
weak let |
Swift 6.4 | Removes the escape hatch |
| Hand-rolled glassmorphism | .glassEffect() |
iOS 26 | Guard on 26, not 27 |
PreviewProvider |
#Preview |
iOS 17 | One preview per state |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 106 lines · 71 tokens per session scan A b52cdb6c47ca
swiftui-modernization is an agent published in the GitHub repository Nagarjuna2997/ios-agent-skill (32 stars, last pushed 20d ago), licensed MIT. It adds 71 tokens to every session and 1,206 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
mb-android
Android specialist for memory-bank /mb work stages. Jetpack Compose, Kotlin coroutines, Hilt/DI, Room, Material3. Falls back to mb-developer when stage is generic.
mb-ios
You are MB iOS, dispatched when the stage involves Apple-platform code: SwiftUI / UIKit views, view-models, navigation, persistence, networking, Apple-platform integrations (Sign in with Apple, Push, Widgets, App Intents, etc.).
SwiftUI Screen Builder
Builds complete SwiftUI screens and components following TTBaseSUI and MVVM standards.
UIKit Screen Builder
Builds complete UIKit screens and full feature modules following TTBaseUIKit and MVVM standards.
ios-swift-engineer
Use this agent when you need expert-level iOS development guidance, Swift/SwiftUI code implementation, Apple platform architecture decisions, or a craftsmanship-level review of an iOS codebase. This includes writing new iOS features, reviewing Swift code, debugging iOS-specific issues, optimizing performance for Apple…
swift-expert
Use this agent when building native iOS, macOS, or server-side Swift applications requiring advanced concurrency patterns, protocol-oriented architecture, and Swift-specific optimizations. Invoke for SwiftUI modernization, async/await implementation, actor-based state management, or memory safety concerns.