# Swift Architecture

Selects, reviews, and migrates Apple-platform app architectures across MV with...

- Repository: https://github.com/dpearson2699/swift-ios-skills (1266 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-07-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -g -a claude-code -y`
Codex: `npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -g -a codex -y`
Cursor: `npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -g -a cursor -y`
Gemini CLI: `npx skills add dpearson2699/swift-ios-skills --skill swift-architecture -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add dpearson2699/swift-ios-skills`

## Description

Selects, reviews, and migrates Apple-platform app architectures across MV with Observation, MVVM, MVI, TCA, Clean Architecture, Coordinator, and legacy VIPER. Use when choosing module and dependency boundaries, escalating a feature beyond simple SwiftUI MV, planning incremental architecture migration, or auditing state ownership and test seams.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Swift Architecture

Choose the smallest architecture that makes state ownership, dependencies, side effects, and tests explicit. Default new SwiftUI features to MV; escalate only for observed complexity.

## Contents

- [Scope Boundary](#scope-boundary)
- [Decision Workflow](#decision-workflow)
- [Pattern Selection](#pattern-selection)
- [MV Default](#mv-default)
- [Escalation Signals](#escalation-signals)
- [Migration](#migration)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)

## Scope Boundary

This skill owns pattern selection, module boundaries, dependency direction, migration strategy, and architecture-level test seams. Route SwiftUI property-wrapper wiring and view composition to `swiftui-patterns`, navigation APIs and route models to `swiftui-navigation`, isolation diagnostics to `swift-concurrency`, and test syntax/fixtures to `swift-testing`.

## Decision Workflow

1. Record the feature's state owner, inputs, outputs, dependencies, side effects, navigation handoffs, and current tests.
2. Identify the concrete pressure: complex state machine, shared derived state, dependency control, feature composition, team ownership, or UIKit navigation.
3. Select the smallest pattern that addresses that pressure; write down what it adds and what remains unchanged.
4. Implement one vertical slice with injected dependencies and observable state transitions.
5. Run existing behavior tests plus state-transition and dependency-failure tests. If behavior changes, restore the fixture, fix the smallest boundary, and rerun before migrating another slice.

## Pattern Selection

The rest: https://github.com/dpearson2699/swift-ios-skills/blob/HEAD/skills/swift-architecture/SKILL.md
