agentsclimarketplace

Swift ui architect

Skill ComeOnOliver/skillshub/skills/pproenca/dot-skills/swift-ui-architect

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill swift-ui-architect

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

10.2 KB, ~2.2k tokens by cl100k_base, as published. Nobody here has run it

SwiftUI Modular MVVM-C Architecture

Opinionated architecture enforcement for SwiftUI clinic-style apps. This skill aligns to the iOS 26 / Swift 6.2 clinic architecture: modular MVVM-C in local SPM packages, concrete coordinators and route shells in the App target, pure Domain protocols, and Data as the only I/O layer.

Mandated Architecture Stack

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ App target: DependencyContainer, Coordinators, Route Shells   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Feature* SPM  β”‚ Feature* SPM  β”‚ Feature* SPM  β”‚ Feature* SPM β”‚
β”‚ View + VM     β”‚ View + VM     β”‚ View + VM     β”‚ View + VM    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Data SPM: repository impls, remote/local, retry, sync queue   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Domain SPM: models, repository protocols, coordinator protocolsβ”‚
β”‚ and ErrorRouting/AppError                                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Shared SPMs: DesignSystem, SharedKit                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Dependency Rule: Feature modules import Domain + DesignSystem only. Features never import Data or other features. App target is the only convergence point.

Clinic Architecture Contract (iOS 26 / Swift 6.2)

All guidance in this skill assumes the clinic modular MVVM-C architecture:

  • Feature modules import Domain + DesignSystem only (never Data, never sibling features)
  • App target is the convergence point and owns DependencyContainer, concrete coordinators, and Route Shell wiring
  • Domain stays pure Swift and defines models plus repository, *Coordinating, ErrorRouting, and AppError contracts
  • Data owns SwiftData/network/sync/retry/background I/O and implements Domain protocols
  • Read/write flow defaults to stale-while-revalidate reads and optimistic queued writes
  • ViewModels call repository protocols directly (no default use-case/interactor layer)

When to Apply

Reference these guidelines when:

  • Building or refactoring feature modules under local SPM packages
  • Wiring coordinators, route shells, and dependency container factories
  • Defining Domain protocols for repositories, coordinators, and error routing
  • Enforcing Data-only ownership of networking, persistence, and sync
  • Reviewing stale-while-revalidate reads and optimistic queued writes

Non-Negotiable Constraints (iOS 26 / Swift 6.2)

  • @Observable for ViewModels/coordinators, ObservableObject / @Published never
  • No dedicated use-case/interactor layer: ViewModels call Domain repository protocols directly
  • Coordinator protocols live in Domain; concrete coordinators own NavigationPath in App target
  • Route shells live in App target and own .navigationDestination mapping
  • AppError + ErrorRouting drive presentation policy; ViewModels do not hardcode global error UI
  • SwiftData / URLSession / retry / sync queue logic stays in Data package only

Rule Categories by Priority

PriorityCategoryImpactPrefixRules
1View Identity & DiffingCRITICALdiff-6
2State ArchitectureCRITICALstate-7
3View CompositionHIGHview-6
4Navigation & CoordinationHIGHnav-5
5Layer ArchitectureHIGHlayer-6
6Dependency InjectionMEDIUM-HIGHdi-4
7List & Collection PerformanceMEDIUMlist-4
8Async & Data FlowMEDIUMdata-5

Quick Reference

1. View Identity & Diffing (CRITICAL)

2. State Architecture (CRITICAL)

3. View Composition (HIGH)

4. Navigation & Coordination (HIGH)

5. Layer Architecture (HIGH)

6. Dependency Injection (MEDIUM-HIGH)

7. List & Collection Performance (MEDIUM)

8. Async & Data Flow (MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,984. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.