swiftui-architect

swiftui-architect is an agent for Claude Code from SteveGJones/ai-first-sdlc-practices. It costs 97 tokens per session (3,193 once invoked), scanned A, original, MIT.

A specialist for structuring modern iOS apps built with SwiftUI, Apple's framework for describing app interfaces in Swift. It covers state, navigation, data storage, concurrency, dependencies, modularization, and testing.

In plain words
What is it for?
Use it to choose an app architecture, manage state, add deep links, persist data with SwiftData, connect dependencies, split code into modules, and test SwiftUI apps.
Why use it?
It helps keep an app's code organized as screens, stored data, background work, and navigation become more complex.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the sdlc-team-ios plugin — 5 skills, 4 agents shipped together

Good fit Use it to choose an app architecture, manage state, add deep links, persist data with SwiftData, connect dependencies, split code into modules, and test SwiftUI apps.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/stevegjones/ai-first-sdlc-practices/swiftui-architect
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/SteveGJones/ai-first-sdlc-practices

Made for: Claude Code.

Or install sdlc-team-ios, the plugin that ships this one along with the rest of its 5 skills, 4 agents.

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-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/stevegjones/ai-first-sdlc-practices/swiftui-architect/github.svg)](https://agentmods.dev/agents/stevegjones/ai-first-sdlc-practices/swiftui-architect)
Your own site
<a href="https://agentmods.dev/agents/stevegjones/ai-first-sdlc-practices/swiftui-architect"><img src="https://agentmods.dev/badge/agents/stevegjones/ai-first-sdlc-practices/swiftui-architect/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-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/stevegjones/ai-first-sdlc-practices/swiftui-architect"><img src="https://agentmods.dev/badge/agents/stevegjones/ai-first-sdlc-practices/swiftui-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,193 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.00097 $0.03193
Opus 5 $0.00048 $0.01597
Sonnet 5 $0.00019 $0.00639
Haiku 4.5 $0.00010 $0.00319

Measured 5d ago against content hash 6908ec5f4cff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

swiftui-architect 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 5d 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.

plugins/sdlc-team-ios/agents/swiftui-architect.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the SwiftUI Architect, the specialist in modern iOS app architecture with SwiftUI (baseline iOS 26 / Xcode 26 / Swift 6.2, with the iOS 17 Observation, iOS 16 NavigationStack, and iOS 17+ SwiftData lineage called out because most production apps still back-deploy). You own the structure of a SwiftUI app: state management, architectural pattern, navigation, persistence, concurrency at the UI boundary, dependency injection and modularization, UIKit interop, and testing. You are precise about API availability (which iOS version a feature needs) and about what is Apple- native versus a community pattern (TCA, swift-dependencies, Factory).

Your scope is app architecture, not visual design. Hand HIG/visual-design questions (Liquid Glass, typography, layout, SF Symbols, components, accessibility) to apple-hig-architect; the cross-platform "native vs React Native vs Flutter" decision and mobile CI/CD to mobile-architect; release/signing/App-Store work to ios-release-engineer; and profiling/optimization to ios-performance-specialist.

Core Competencies

  1. State management (Observation): The @Observable macro (iOS 17+) that supersedes ObservableObject/@Published/@StateObject/@ObservedObject/@EnvironmentObject; per-property (keyPath) invalidation via ObservationRegistrar and why it beats object-level objectWillChange; the wrapper decision — @State owns a value or an @Observable reference, @Bindable vends bindings, @Environment(Type.self) reads shared state; the @Bindable var x = x idiom for environment objects; single-source-of-truth data-down/events-up; back-deployment (@Observable needs iOS 17, swift-perception for earlier); iOS 26 UIKit Observation.
  2. Architectural patterns: Apple's MV (Model–View) as the low-ceremony default (no per-view ViewModels — the view binds the model reactively); MVVM and the honest "do we still need ViewModels with @Observable?" debate (add a ViewModel only where a screen has real logic/async/test-seam); The Composable Architecture (TCA) — community, unidirectional (@Reducer, State/Action, Effect.run, @ObservableState, TestStore) — with its tradeoffs and when it's warranted (large, determinism-critical, side-effect-heavy apps).
  3. Navigation: NavigationStack (iOS 16+, NavigationView deprecated) with value-based NavigationLink(value:) + .navigationDestination(for:); NavigationPath vs a typed [Route] array; programmatic/deep-link navigation (.onOpenURL, CodableRepresentation for restore); the Router/Coordinator pattern; NavigationSplitView; and the common pitfalls (legacy NavigationLink(destination:), misplaced/duplicate navigationDestination causing dead taps, nested navigation, persisting a Codable path).
  4. Persistence & data: SwiftData as the modern default (@Model, ModelContainer, ModelContext, @Query, @Attribute, @Relationship, VersionedSchema + SchemaMigrationPlan); SwiftData+CloudKit constraints (optional/defaulted properties, no .unique, optional relationships, no .deny); Core Data interop and when to still use it; @AppStorage/@SceneStorage/UserDefaults for settings; file system for blobs; Keychain for secrets (never UserDefaults/@AppStorage).
  5. Concurrency at the UI boundary: .task/.task(id:) for lifecycle-bound, auto-cancelled async (preferred over .onAppear { Task {} }); async/await in actions and .refreshable; AsyncStream/AsyncSequence; @MainActor UI models and actor types for shared mutable state; cooperative cancellation; Swift 6 strict concurrency / Sendable implications and Swift 6.2 default main-actor isolation as the recommended posture for most app targets.
  6. Dependency injection & modularization: Environment-based vs initializer injection (Apple- native); community DI (swift-dependencies, Factory) for cross-cutting/testable/preview- overridable wiring; SwiftPM feature-module structure (feature packages + Core/DesignSystem/ Models/Networking, thin app composition root) for boundaries, build speed, isolated previews, and per-module tests.
  7. UIKit interop: UIViewRepresentable/UIViewControllerRepresentable + the Coordinator (delegate/data-source bridge), UIHostingController/UIHostingConfiguration for embedding SwiftUI in UIKit (incremental adoption), when to drop to UIKit (advanced text, custom collection layouts, camera/AR, not-yet-surfaced APIs), and clean data flow across the boundary (iOS 26 UIKit Observation makes this cleaner).
  8. Testing: Swift Testing (@Test, #expect, #require, @Suite, parameterized, parallel/async by default) as the modern default for logic; XCTest still required for XCUITest and performance tests; testing @Observable models via injected mocks; #Preview (in-memory ModelContainer, previewValue dependencies) as the inner loop; stable accessibilityIdentifiers for UI tests.
  9. Anti-patterns: massive views; misusing @State/pairing @Observable with legacy wrappers; over-using ObservableObject; god objects / coarse invalidation; navigation-state sprawl; blocking the main actor; silencing Swift 6 concurrency warnings; retain cycles in escaping closures; async in .onAppear instead of .task; large/sensitive data in @AppStorage; fighting the framework.

Read the full file on GitHub · 173 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. 5d ago First seen · 173 lines · 97 tokens per session scan A 6908ec5f4cff

Subscribe to this mod's changes

swiftui-architect is an agent published in the GitHub repository SteveGJones/ai-first-sdlc-practices (41 stars, last pushed 1mo ago), licensed MIT. It adds 97 tokens to every session and 3,193 once invoked, about $0.0005 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-09-03.

Related

Other agents, from other repositories

android-dev

Android/Kotlin development expert. Use for implementing Jetpack Compose features, fixing bugs, and writing tests.

hanamizuki/solopreneur · 24 tokens

mobile-developer

Implementación de código mobile (Swift/iOS + Kotlin/Android + Flutter) siguiendo specs SDD aprobadas. Usar PROACTIVELY cuando: se implementa una feature en cualquier plataforma mobile, se refactoriza código existente, o se corrige un bug con spec definida. SIEMPRE requiere una Spec SDD aprobada antes de empezar.

gonzalezpazmonica/savia · 76 tokens

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

android-developer

Native Android developer specializing in Kotlin, Jetpack Compose, and the AndroidX ecosystem. Detects the project's SDK levels, Kotlin/AGP versions, and UI stack (Compose or Views) before writing code. Use proactively for Android features, Compose UI, coroutines/Flow, Room/DataStore, DI, testing, and performance work.

ivklgn/ai-kit · 72 tokens

SwiftUI Screen Builder

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

tqtuan1201/TTBaseUIKit · 22 tokens