tca-swiftui-architecture

Implement modern TCA 1.7 patterns for SwiftUI features with @Reducer and @ObservableState.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/rusel95/MediaCleaner --skill tca-swiftui-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tca-swiftui-architecture
Source: https://github.com/rusel95/MediaCleaner/tree/main/.windsurf/skills/tca-swiftui-architecture
Command: npx skills add https://github.com/rusel95/MediaCleaner --skill tca-swiftui-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

AI tools consistently generate outdated TCA code — this skill encodes modern 1.7+ patterns for enterprise SwiftUI apps.

Core Features & Use Cases

  • Use @Reducer macro and @ObservableState for clean, testable reducers
  • Decompose features with Scope, ifLet, and ForEach for scalable architectures
  • Manage dependencies via @DependencyClient and delegate actions for parent communication
  • Navigate with tree-based (@Presents) and stack-based (StackState) navigation
  • Validate migrations from pre-1.7 patterns and guide modernization in large codebases

Quick Start

Create a minimal feature using @Reducer and @ObservableState, wire a simple dependency with @DependencyClient, and demonstrate a delegate action to parent.

Frequently Asked Questions about tca-swiftui-architecture

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

FAQPage Schema
How do I migrate outdated TCA code to the latest SwiftUI patterns?

Migrating outdated TCA code involves applying the @Reducer macro, @ObservableState, and struct-of-closures dependencies to replace deprecated patterns. This skill guides you through validating pre-1.7 migrations and modernizing large codebases for clean, testable SwiftUI reducers.

How do I implement sheet and push navigation with TCA in SwiftUI?

Implement sheet and push navigation in TCA by using tree-based @Presents and stack-based StackState. This approach enables direct store access and modern navigation structures, allowing you to manage complex routing and view presentation cleanly within your SwiftUI features.

Why does my AI assistant generate outdated TCA code for SwiftUI features?

AI tools generate outdated TCA code because they lack the latest 1.7+ enterprise patterns. This skill encodes modern conventions like @Reducer, @ObservableState, and @DependencyClient to ensure generated code satisfies current compiler requirements and architectural standards.

Can I use @DependencyClient and delegate actions for parent communication in SwiftUI?

Yes, you can manage dependencies and parent communication using @DependencyClient and delegate actions. This pattern decouples child features from their parents, allowing scalable decomposition with Scope and ifLet while maintaining comprehensive TestStore testability.

What is the best way to structure comprehensive TestStore tests for TCA reducers?

The best way to structure TestStore tests is by validating state changes and delegate actions exhaustively. This skill provides patterns to build TestStore tests that satisfy modern @Reducer macro requirements and verify dependency interactions and navigation flows.

When do I need StackState versus @Presents for SwiftUI navigation?

You need StackState for stack-based push navigation like drill-in lists, and @Presents for tree-based modal sheet presentation. This skill helps you implement both direct store access patterns to manage complex navigation routes within scalable SwiftUI architectures.