ios-agent-skill: Agent for Claude Code

.claude/agents/swiftui-modernization.md

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.

This is Nagarjuna2997/ios-agent-skill's own configuration. It tells Claude Code how to work on ios-agent-skill itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ios-agent-skill configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Nagarjuna2997/ios-agent-skill/main/.claude/agents/swiftui-modernization.md
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00036 $0.00603
Sonnet 5 $0.00014 $0.00241
Haiku 4.5 $0.00007 $0.00121

Measured 6d ago against content hash b52cdb6c47ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 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.

.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. 6d 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 (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.

Related

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.

fockus/skill-memory-bank · 43 tokens

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

fockus/skill-memory-bank · 39 tokens

SwiftUI Screen Builder

Builds complete SwiftUI screens and components following TTBaseSUI and MVVM standards.

tqtuan1201/TTBaseUIKit · 22 tokens

UIKit Screen Builder

Builds complete UIKit screens and full feature modules following TTBaseUIKit and MVVM standards.

tqtuan1201/TTBaseUIKit · 21 tokens

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…

patrickserrano/lacquer · 0 tokens

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.

alexmmatos/arthur-mcp · 57 tokens