moai-lang-swift

Implement Swift 6+ apps with SwiftUI, actors, and @Observable patterns.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/yarang/fastapi-error-code --skill moai-lang-swift-yarang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-lang-swift
Source: https://github.com/yarang/fastapi-error-code/tree/main/.claude/skills/moai-lang-swift
Command: npx skills add https://github.com/yarang/fastapi-error-code --skill moai-lang-swift-yarang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Skill helps developers design and implement Swift 6+ apps using SwiftUI, Combine, and concurrency patterns with an emphasis on @Observable and actor-based architectures to improve safety and scalability.

Core Features & Use Cases

  • Modern Swift 6+ features: typed throws, Sendable, Actors, and @Observable usage for UI state management.
  • MVVM & UI patterns: SwiftUI views, programmatic navigation, and a robust data flow scaffold.
  • Use Case: Build cross-platform iOS/macOS apps with concurrent data loading and resilient error handling.

Quick Start

Initialize a SwiftPM package with a minimal SwiftUI view, an @Observable-based ViewModel, and a small actor-based cache example.

Frequently Asked Questions about moai-lang-swift

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

FAQPage Schema
How do I implement safe concurrency in Swift 6 using actors and Sendable?

Safe concurrency in Swift 6 uses actors for isolated state and Sendable to ensure data is safely transferred across async/await boundaries, preventing data races. This Skill provides actor-based architectures and Sendable patterns for robust concurrent data loading.

What is the best way to manage SwiftUI state with @Observable in Swift 6?

Managing SwiftUI state with @Observable tracks property changes directly within view models, replacing older ObservableObject patterns. This Skill implements @Observable for UI state management and MVVM data flow scaffolds.

How do I handle errors in Swift 6 with typed throws?

Typed throws in Swift 6 specifies exact error types in function signatures, allowing resilient error handling and compile-time safety. This Skill includes practical code patterns for resilient error handling and network layer integration.

Can I build cross-platform iOS and macOS apps using SwiftPM and SwiftUI?

Building cross-platform iOS and macOS apps uses SwiftPM for package setup and SwiftUI for interfaces to share code. This Skill initializes SwiftPM packages with minimal SwiftUI views and actor-based cache examples for both platforms.

How do I structure a Swift 6 app with MVVM and programmatic navigation?

Structuring a Swift 6 app with MVVM separates UI logic from views, using programmatic navigation for routing control. This Skill provides SwiftUI view patterns and a robust data flow scaffold for clean architecture.