swiftui-modernization

swiftui-modernization is an agent for Claude Code from Nagarjuna2997/ios-agent-skill. It costs 71 tokens per session (1,206 once invoked), scanned A, original, MIT.

A guide for updating older SwiftUI and UIKit code to current Apple APIs while keeping the app’s behavior unchanged. It covers changes such as replacing older navigation, observation, and callback patterns.

In plain words
What is it for?
Use it to modernize an existing iPhone, iPad, or Apple-platform codebase, remove deprecated API usage, and report cases where an update would require changing behavior.
Why use it?
Older APIs produce deprecation warnings and can become harder to maintain. This keeps the same app behavior by checking tests before and after each type of change.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to modernize an existing iPhone, iPad, or Apple-platform codebase, remove deprecated API usage, and report cases where an update would require changing behavior.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/nagarjuna2997/ios-agent-skill/swiftui-modernization
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Nagarjuna2997/ios-agent-skill

Made for: Claude Code.

Wrote 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.

agentmods badge for swiftui-modernization

README.md
[![agentmods](https://agentmods.dev/badge/agents/nagarjuna2997/ios-agent-skill/swiftui-modernization/github.svg)](https://agentmods.dev/agents/nagarjuna2997/ios-agent-skill/swiftui-modernization)
Your own site
<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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swiftui-modernization

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,206 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.01206
Opus 5.5 $0.00028 $0.00482
Sonnet 5.5 $0.00014 $0.00241
Haiku 4.5 $0.00007 $0.00121

Measured 3mo ago against content hash b52cdb6c47ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo 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.

.claude/agents/swiftui-modernization.md · 106 lines

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

  1. Baseline. Run the tests and record the output. Red baseline → stop and report; you cannot prove preservation against it.
  2. One migration kind per pass. Do not mix an @Observable conversion with a navigation rewrite. Each is separately reviewable and revertible.
  3. Re-run the same command. Same test count, same green.
  4. 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

Read the full file on GitHub · 106 lines

Changes

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.

  1. 3mo ago First seen · 106 lines · 71 tokens per session scan A b52cdb6c47ca

Subscribe to this mod's changes

swiftui-modernization is an agent published in the GitHub repository Nagarjuna2997/ios-agent-skill (43 stars, last pushed yesterday), licensed MIT. It adds 71 tokens to every session and 1,206 once invoked, about $0.0003 per session on Opus 5.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.

Related

swiftui-modernization compared with agents from other repositories

swiftui-modernization next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
swiftui-modernizationNagarjuna2997/ios-agent-skillAgent43yesterdayMITA71Claude Code
SwiftUI Screen Buildertqtuan1201/TTBaseUIKitAgent234mo agoMITA22Claude Code
UIKit Screen Buildertqtuan1201/TTBaseUIKitAgent234mo agoMITA21Claude Code
ios-swift-engineerpatrickserrano/lacquerAgent53d agoMITA555Claude Code
Code Formattertqtuan1201/TTBaseUIKitAgent234mo agoMITA23Claude Code
code-auditorKasempiternal/axiom-v2Agent49mo agoMITA236Claude Code
swift-developerhmohamed01/swift-developerAgent510mo agononeA415Claude Code