swift-ui-architect

Enforces modular MVVM-C architecture for SwiftUI apps using @Observable and coordinators.

193|17|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/pproenca/dot-skills --skill swift-ui-architect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-ui-architect
Source: https://github.com/pproenca/dot-skills/tree/main/skills/.experimental/swift-ui-architect
Command: npx skills add https://github.com/pproenca/dot-skills --skill swift-ui-architect

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill addresses the complexity and potential inconsistencies in building large-scale SwiftUI applications by enforcing a specific, opinionated architecture. It helps prevent common pitfalls related to state management, navigation, and dependency injection, leading to more maintainable and scalable codebases.

Core Features & Use Cases

  • Architecture Enforcement: Guides developers to adhere to a modular MVVM-C pattern with strict dependency rules between layers (Domain, Data, Feature, App).
  • State Management: Mandates the use of @Observable for ViewModels and coordinators, promoting efficient, granular UI updates.
  • Navigation & Coordination: Enforces the use of coordinators to manage NavigationPath and presentation logic, enabling testable flows and deep linking.
  • Dependency Injection: Promotes environment-based injection using protocol abstractions for testability and flexibility.
  • Use Case: When starting a new SwiftUI project or refactoring an existing one, use this Skill to ensure adherence to best practices for modularity, state management, and navigation, preventing architectural drift as the project grows.

Quick Start

Apply the swift-ui-architect skill to review the current SwiftUI project's adherence to the mandated MVVM-C architecture and identify any deviations from the specified rules.

Frequently Asked Questions about swift-ui-architect

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

FAQPage Schema
How do I enforce MVVM-C architecture in a large SwiftUI codebase?

You can enforce MVVM-C architecture in SwiftUI by applying strict layer dependency rules, using @Observable for ViewModels, and centralizing navigation through coordinators to maintain consistency and scalability.

What is the best way to manage navigation paths in SwiftUI without architectural drift?

The best way to manage navigation paths in SwiftUI is by using coordinators to handle NavigationPath and presentation logic, ensuring testable flows and enabling deep linking while keeping views decoupled.

How does @Observable work for state management in SwiftUI applications?

@Observable works for state management in SwiftUI by replacing older observation patterns, allowing ViewModels and coordinators to drive efficient, granular UI updates without triggering unnecessary view redraws.

Can I use protocol-based dependency injection with SwiftUI environment values?

Yes, you can use protocol-based dependency injection with SwiftUI environment values to pass abstract dependencies, which increases testability and flexibility across your feature layers.

When should I refactor a SwiftUI project to use a modular architecture?

You should refactor a SwiftUI project to use a modular architecture when state management, navigation, and dependency injection become complex, and you need to prevent architectural drift as the codebase grows.

Does this SwiftUI architecture approach support iOS 26 and Swift 6.2?

Yes, this SwiftUI architecture approach explicitly targets iOS 26 and Swift 6.2 applications, ensuring compatibility with the latest modular MVVM-C patterns and strict dependency rules.