swift-architecture-skill

Guides selection and implementation of Swift architecture patterns for SwiftUI and UIKit codebases.

1|Updated Aug 9, 2026
One-click install
npx skills add https://github.com/OMIXEC/all-in-one-swift-skills --skill swift-architecture-skill-omixec
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: swift-architecture-skill
Source: https://github.com/OMIXEC/all-in-one-swift-skills/tree/main/skills/swift-architecture-skill
Command: npx skills add https://github.com/OMIXEC/all-in-one-swift-skills --skill swift-architecture-skill-omixec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Choosing and applying the right architecture for a Swift feature is hard: MVVM, MVI, TCA, Clean Architecture, VIPER, MVP, Coordinator, and Reactive patterns each fit different constraints, and picking wrong leads to painful refactors. This Skill analyzes your task constraints and produces concrete, architecture-specific guidance instead of generic advice. ## Core Features & Use Cases - Architecture Fit Routing: Captures task type, UI stack, deployment target, scope, and state complexity, then runs a fit check to recommend the best-fit pattern or flag a mismatch with a closest-fit alternative. - Eight Architecture Playbooks: Ships reference playbooks for MVVM, MVI, TCA, Clean Architecture, VIPER, MVP, Coordinator, and Reactive patterns, each with file structure, state modeling, concurrency, testing strategy, anti-patterns, and a PR review checklist. - Two Delivery Modes: Quick Recommendation Mode for single-feature guidance, and Deep Refactor Mode for migrations, mixed architectures, and module boundary changes with incremental migration paths. - Use Case: Ask for help refactoring a UIKit profile screen into MVVM with a Coordinator, and receive a concrete file layout, protocol-based dependency injection, cancellation-safe async code, and a review checklist tailored to that feature. ## Quick Start Ask the agent to recommend and scaffold the best architecture for a new SwiftUI feed feature targeting iOS 17 with async network loading.

Frequently Asked Questions about swift-architecture-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between MVVM, MVI, and TCA for a SwiftUI feature?▼

Choose MVVM for moderate screen-level state with low boilerplate, MVI for deterministic reducer-style state machines without a framework dependency, and TCA for complex composable features with strict effect orchestration. The selection-guide reference maps your constraints to the best fit.

How to migrate a UIKit screen from MVC to MVVM or MVP?▼

Use Deep Refactor Mode to assess the current state, then follow an incremental migration path: extract presentation logic into a ViewModel or Presenter, inject repositories via protocols, and add cancellation-safe async loading. MVP suits passive UIKit views; MVVM fits observable state binding.

Does this Swift architecture guidance support iOS 16 and iOS 17?▼

Yes. Playbooks provide both modern iOS 17+ patterns using the @Observable macro and legacy iOS 16 patterns using ObservableObject with @Published. The deployment target is captured up front to select the correct variant.

When should I use the Coordinator pattern in Swift?▼

Use Coordinator when navigation logic is complex, such as deep linking, multi-step flows, or reusable screens across flows. It decouples routing from view controllers and ViewModels, and pairs with MVVM or MVP as a navigation layer rather than a standalone architecture.

Can I combine Clean Architecture with MVVM in one Swift app?▼

Yes. Clean Architecture typically owns the app and module layering with use cases and repository boundaries, while MVVM or MVP handles the presentation layer. The skill names one primary and one secondary pattern and assigns each boundary explicitly.

What are common MVVM anti-patterns in SwiftUI?▼

Common issues include god ViewModels mixing networking and state, duplicated state between View and ViewModel, stale async overwrites without cancellation, and UIKit navigation types inside ViewModels. Each playbook lists anti-patterns with concrete fixes and a PR review checklist.