swiftui-architecture

Implement SwiftUI architecture with pure data flow and AppRouter navigation.

21|6|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/mintuz/claude-plugins --skill swiftui-architecture-mintuz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-architecture
Source: https://github.com/mintuz/claude-plugins/tree/main/plugins/app/skills/swiftui-architecture
Command: npx skills add https://github.com/mintuz/claude-plugins --skill swiftui-architecture-mintuz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a clear, practical approach to building SwiftUI apps with pure data flow, avoiding traditional ViewModels and enabling clean state management via @State, @Binding, @Observable, and @Environment.

Core Features & Use Cases

  • Establishes a modular SwiftUI architecture focused on data flow and shared services.
  • Demonstrates patterns for state ownership, observable services, and dependency injection.
  • Use cases include scalable UI composition, testability, and maintainable navigation with AppRouter.

Quick Start

Start a new SwiftUI project, replace the default architecture with the SwiftUI-architecture pattern, and wire AppRouter with @Observable services as shown in the references.

Frequently Asked Questions about swiftui-architecture

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

FAQPage Schema
How do I manage SwiftUI data flow without using traditional ViewModels?

You can implement pure SwiftUI data flow by replacing ViewModels with native property wrappers like @State, @Binding, @Observable, and @Environment for explicit state ownership and observable services.

What is the best way to handle navigation and routing across multiple screens in SwiftUI?

Using an AppRouter pattern alongside @Observable services provides a clean, maintainable approach for handling navigation and explicit state ownership across multiple screens in complex SwiftUI apps.

How do I implement dependency injection for shared services in a scalable SwiftUI app?

You can establish dependency injection by wiring shared observable services through the environment, utilizing @Observable and @Environment to inject dependencies cleanly without traditional ViewModels.

Do I need Swift 5.x and AppRouter to build a scalable SwiftUI architecture?

You need SwiftUI and Swift 5.x as base requirements, while adopting the AppRouter and @Observable patterns is optional but recommended for managing complex state and navigation effectively.

Why should I avoid ViewModels and use @Observable for state management in SwiftUI?

Avoiding ViewModels in favor of @Observable establishes pure data flow, removing unnecessary abstractions to achieve modular UI composition, better testability, and clean state management.