moai-lang-swift

Develop Swift 6+ apps with SwiftUI, Combine, and Swift Concurrency.

Updated Nov 20, 2025
One-click install
npx skills add https://github.com/soo-kate-yeon/shadowoo --skill moai-lang-swift-soo-kate-yeon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-lang-swift
Source: https://github.com/soo-kate-yeon/shadowoo/tree/main/.agents/skills/moai-lang-swift
Command: npx skills add https://github.com/soo-kate-yeon/shadowoo --skill moai-lang-swift-soo-kate-yeon

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides expert assistance for Swift development, covering everything from core language features and concurrency to UI frameworks like SwiftUI and platform-specific patterns for iOS and macOS.

Core Features & Use Cases

  • Swift 6+ Development: Expertise in the latest Swift features, including typed throws, strict concurrency, and data-race safety.
  • SwiftUI & Declarative UI: Guidance on building modern, responsive user interfaces for Apple platforms.
  • Concurrency & Asynchronicity: Deep understanding of async/await, actors, and TaskGroups for efficient background processing.
  • Platform Development: Support for iOS, macOS, and other Apple ecosystem applications.
  • Use Case: You need to implement a complex data synchronization feature in an iOS app using Swift Concurrency and SwiftUI, ensuring thread safety and efficient background updates.

Quick Start

Use the moai-lang-swift skill to generate a basic SwiftUI view with @Observable state management for a list of user profiles.

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 data-race safety in Swift 6+ using strict concurrency?

Data-race safety in Swift 6+ uses strict concurrency, actors, and async/await to isolate state and prevent concurrent access conflicts. You define actor types or use global actors to synchronize mutable state across asynchronous tasks safely.

How do I manage state in SwiftUI with the new @Observable macro?

Manage SwiftUI state with @Observable by applying the macro to your model classes to automatically track property access. SwiftUI views re-render efficiently whenever observed properties change without needing ObservableObject or @Published wrappers.

Does Swift Concurrency work well with Combine for reactive UI updates?

Swift Concurrency and Combine work together by using async/await for structured background tasks and Combine publishers for chaining reactive UI updates. You can bridge them using custom cancellables or awaiting publisher values inside Task blocks.

Can I use typed throws in Swift to handle specific error types?

Typed throws in Swift let functions specify the exact error type they throw, such as `throws(MyError)`. This provides compile-time guarantees for error handling, eliminating the need for generic catch blocks when propagating known error categories.

What's the best way to sync data in the background on iOS without blocking the UI?

Sync data in the background on iOS using TaskGroups and async/await to run operations concurrently off the main thread. This ensures your SwiftUI views remain responsive while complex data synchronization executes safely in detached tasks.

Why does my SwiftUI view not update when modifying state from an async Task?

SwiftUI views fail to update when modifying @State or @Observable variables directly from an async Task running off the main actor. You must execute state mutations using `await MainActor.run` or annotate your model with @MainActor to ensure UI updates occur on the main thread.