swift-architecture
Selects, reviews, and migrates Apple-platform app architectures across MV with Observation, MVVM, MVI, TCA, Clean Architecture, Coordinator, and legacy VIPER
Install / Use
npx skills add dpearson2699/swift-ios-skills --skill swift-architectureInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of swift-architecture
swift-architecture scores 84/100 on our quality scale, 2914th of 4,698 Development & Engineering skills we index.
Its SKILL.md is 7.3 KB long, well organised into 11 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 1,143 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-11-06 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 86/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-04. Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
swift-architecture compared with similar skills
All 4 of these similar skills score higher than swift-architecture; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| swift-architecture (this skill)by dpearson2699 | 84 | 1.1k | 4mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install swift-architecture?
- Run
npx skills add dpearson2699/swift-ios-skills --skill swift-architecture. The install tabs above show the steps for each supported agent. - Which AI agents does swift-architecture work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is swift-architecture safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 86/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is swift-architecture still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubname: swift-architecture 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."
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
- Decision Workflow
- Pattern Selection
- MV Default
- Escalation Signals
- Migration
- Common Mistakes
- Review Checklist
- 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
- Record the feature's state owner, inputs, outputs, dependencies, side effects, navigation handoffs, and current tests.
- Identify the concrete pressure: complex state machine, shared derived state, dependency control, feature composition, team ownership, or UIKit navigation.
- Select the smallest pattern that addresses that pressure; write down what it adds and what remains unchanged.
- Implement one vertical slice with injected dependencies and observable state transitions.
- 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
| Pattern | Choose when | Main cost | |---|---|---| | MV | SwiftUI feature has straightforward state and orchestration | Logic can drift into large views without decomposition | | MVVM | Presentation logic needs an independently testable adapter | Extra layer can become a forwarding shell | | MVI | A feature is best modeled as explicit state + intents + reducer/effects | Boilerplate and centralized transition design | | TCA | Many composable features need deterministic effects, dependencies, and testing | Framework learning and architectural commitment | | Clean Architecture | Large product needs strict dependency direction across domain/data/UI | Protocol and mapping overhead | | Coordinator | UIKit or hybrid navigation needs a separate flow owner | Another lifecycle and routing owner | | VIPER | Maintaining an existing UIKit module with established VIPER boundaries | Very high ceremony; poor default for new SwiftUI work |
Use Coordinator alongside another state pattern when navigation complexity is the pressure; it is not a replacement for domain/state architecture.
MV Default
Keep views as state expressions and put business operations in observable models and injected services:
@MainActor
@Observable
final class TripStore {
private let client: TripClient
var trips: [Trip] = []
var error: Error?
init(client: TripClient) { self.client = client }
func load() async {
do { trips = try await client.fetchTrips() }
catch { self.error = error }
}
}
struct TripList: View {
@State private var store: TripStore
init(client: TripClient) {
_store = State(initialValue: TripStore(client: client))
}
var body: some View {
List(store.trips) { Text($0.name) }
.task { await store.load() }
}
}
Load Architecture Pattern Recipes for MVVM, MVI, TCA, Clean Architecture, Coordinator, and VIPER structure.
Escalation Signals
- Choose MVVM when substantial presentation transformation must be tested without rendering and the adapter has real behavior.
- Choose MVI when transitions, invalid states, and effects need one auditable reducer-like path.
- Choose TCA when feature composition, dependency overrides, cancellation, and deterministic effect tests recur across modules.
- Choose Clean Architecture when independent domain rules and dependency direction matter across multiple delivery/data layers.
- Add Coordinator for UIKit/hybrid route ownership, deep flow composition, or conditional navigation outside view controllers.
- Keep VIPER for compatible legacy modules or deliberate migrations; do not start a new SwiftUI feature with it by habit.
Do not escalate merely because a view is long. First extract subviews, services, and focused observable models.
Migration
Migrate one feature boundary at a time:
- Freeze behavior with tests and a dependency/state inventory.
- Introduce the target boundary around existing operations.
- Move one state transition or dependency at a time without rewriting UI and persistence simultaneously.
- Compare behavior, navigation, cancellation, error, and persistence results after each slice.
- Remove the old path only after no callers or tests depend on it.
For ObservableObject to Observation, preserve the same owner and mutation isolation before replacing wrappers. For MVVM to MV, delete forwarding view-model members only after views bind to the same model/service behavior. For TCA adoption, wrap one feature's state/actions/effects and migrate dependencies incrementally.
Common Mistakes
| Mistake | Fix | |---|---| | Pattern chosen by popularity | Tie it to an observed feature pressure. | | View model only forwards properties | Remove it and use MV. | | One object owns navigation, networking, formatting, persistence, and UI state | Split by responsibility and dependency direction. | | TCA or Clean Architecture applied to trivial screens | Start with MV and preserve an escalation seam. | | Coordinator used as a state architecture | Keep it focused on route/lifecycle ownership. | | Multiple patterns mixed inside one feature | Define one local state/effect model and migrate at feature boundaries. | | Big-bang migration | Move one tested vertical slice and rerun the same proof matrix. |
Review Checklist
- [ ] Choice is justified by concrete feature/team pressures
- [ ] State owner, mutation path, dependencies, effects, and navigation owner are explicit
- [ ] Dependencies are injected and replaceable in tests
- [ ] Pattern cost is proportional to feature complexity
- [ ] UI mechanics, navigation APIs, isolation, and test syntax route to sibling skills
- [ ] Migration preserves behavior one vertical slice at a time
- [ ] Failure, cancellation, navigation, and persistence behavior are verified after each slice
- [ ] No forwarding-only layers or god objects remain
References
- Detailed pattern structures: references/architecture-patterns.md
- Apple: Observation · Migrating from ObservableObject to Observable
- TCA: ComposableArchitecture
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
