🎯

moai-lang-swift

🎯Skill

from modu-ai/moai-rank

VibeIndex|
What it does

Enables advanced Swift 6+ development for iOS and macOS apps with SwiftUI, Combine, and modern concurrency patterns.

πŸ“¦

Part of

modu-ai/moai-rank(43 items)

moai-lang-swift

Installation

Install ScriptRun install script
curl -LsSf https://modu-ai.github.io/moai-adk/install.sh | sh
Install ScriptRun install script
curl -LsSf https://astral.sh/uv/install.sh | sh
git cloneClone repository
git clone https://github.com/your-org/moai-rank.git
BunRun with Bun
bun install
BunRun with Bun
bun run db:generate

+ 4 more commands

πŸ“– Extracted from docs: modu-ai/moai-rank
6Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

>

Overview

# Swift 6+ Development Specialist

Swift 6.0+ development expert for iOS/macOS with SwiftUI, Combine, and Swift Concurrency.

Auto-Triggers: Swift files (.swift), iOS/macOS projects, Xcode workspaces

Quick Reference

Core Capabilities

  • Swift 6.0: Typed throws, complete concurrency, data-race safety by default
  • SwiftUI 6: @Observable macro, NavigationStack, modern declarative UI
  • Combine: Reactive programming with publishers and subscribers
  • Swift Concurrency: async/await, actors, TaskGroup, isolation
  • XCTest: Unit testing, UI testing, async test support
  • Swift Package Manager: Dependency management

Version Requirements

  • Swift: 6.0+
  • Xcode: 16.0+
  • iOS: 17.0+ (recommended), minimum 15.0
  • macOS: 14.0+ (recommended)

Project Setup

Package.swift Configuration: Begin with swift-tools-version comment set to 6.0. Import PackageDescription. Define let package with Package initializer. Set name, platforms array with .iOS and .macOS minimum versions, products array with library definitions, dependencies array with package URLs and version requirements, and targets array with target and testTarget entries including dependencies.

Essential Patterns

Basic @Observable ViewModel: Import Observation framework. Apply @Observable and @MainActor attributes to final class. Declare private(set) var properties for state. Create async functions that set isLoading true, use defer to set false, and assign fetched data with try? await and nil coalescing.

Basic SwiftUI View: Define struct conforming to View. Declare @State private var for viewModel. In body computed property, use NavigationStack containing List iterating over viewModel items. Add .task modifier calling await on viewModel.load and .refreshable modifier for pull-to-refresh.

Basic Actor for Thread Safety: Define actor type with private dictionary for cache. Create get function returning optional Data for key lookup. Create set function taking key and data parameters for cache storage.

Module Index

Swift 6 Features

[modules/swift6-features.md](modules/swift6-features.md)

  • Typed throws for precise error handling
  • Complete concurrency checking
  • Data-race safety by default
  • Sendable conformance requirements

SwiftUI Patterns

[modules/swiftui-patterns.md](modules/swiftui-patterns.md)

  • @Observable macro and state management
  • NavigationStack and navigation patterns
  • View lifecycle and .task modifier
  • Environment and dependency injection

Swift Concurrency

[modules/concurrency.md](modules/concurrency.md)

  • async/await fundamentals
  • Actor isolation and @MainActor
  • TaskGroup for parallel execution
  • Custom executors and structured concurrency

Combine Framework

[modules/combine-reactive.md](modules/combine-reactive.md)

  • Publishers and Subscribers
  • Operators and transformations
  • async/await bridge patterns
  • Integration with SwiftUI

Context7 Library Mappings

Core Swift

  • /apple/swift - Swift language and standard library
  • /apple/swift-evolution - Swift evolution proposals
  • /apple/swift-package-manager - SwiftPM documentation
  • /apple/swift-async-algorithms - Async sequence algorithms

Popular Libraries

  • /Alamofire/Alamofire - HTTP networking
  • /onevcat/Kingfisher - Image downloading and caching
  • /realm/realm-swift - Mobile database
  • /pointfreeco/swift-composable-architecture - TCA architecture
  • /Quick/Quick - BDD testing framework
  • /Quick/Nimble - Matcher framework

Testing Quick Start

Async Test with MainActor: Apply @MainActor attribute to test class extending XCTestCase. Define test function with async throws. Create mock API and set mock data. Initialize system under test with mock. Call await on async method. Use XCTAssertEqual for count verification and XCTAssertFalse for boolean state checks.

Works Well With

  • moai-lang-kotlin - Android counterpart for cross-platform projects
  • moai-lang-flutter - Flutter/Dart for cross-platform mobile
  • moai-domain-backend - API integration and backend communication
  • moai-foundation-quality - iOS security best practices
  • moai-workflow-testing - Xcode debugging and profiling

Resources

  • [reference.md](reference.md) - Architecture patterns, network layer, SwiftData
  • [examples.md](examples.md) - Production-ready code examples

More from this repository10

🎯
moai-lang-csharp🎯Skill

Enables comprehensive C# 12 and .NET 8 development with advanced support for ASP.NET Core, Entity Framework, and modern enterprise solutions.

🎯
moai-domain-backend🎯Skill

Designs and implements robust backend architectures with comprehensive API development, microservices, authentication, and modern server-side patterns across multiple frameworks.

🎯
moai-lang-javascript🎯Skill

Develops modern JavaScript projects with comprehensive support for Node.js, Bun, Deno, testing, linting, and backend frameworks across ES2024+ ecosystem.

🎯
moai-platform-firestore🎯Skill

Enables seamless Firebase Firestore integration, providing real-time sync, offline caching, security rules, and mobile-first NoSQL database management.

🎯
moai-workflow-testing🎯Skill

Orchestrates comprehensive software testing workflows with DDD testing, performance profiling, code review, and quality assurance across multiple development stages.

🎯
moai-foundation-quality🎯Skill

Enforces enterprise-grade code quality standards through TRUST 5 validation, proactive analysis, and automated best practices across multiple programming languages.

🎯
moai-lang-flutter🎯Skill

Enables advanced Flutter/Dart development with modern cross-platform patterns, Riverpod state management, and comprehensive mobile/desktop app capabilities.

🎯
moai-tool-ast-grep🎯Skill

Performs AST-based structural code search, security scanning, and refactoring across 40+ programming languages using syntax-aware pattern matching and transformations.

🎯
moai-lang-typescript🎯Skill

Enables advanced TypeScript development with React 19, Next.js 16, type-safe APIs using tRPC, Zod validation, and modern TypeScript patterns.

🎯
moai-domain-frontend🎯Skill

Develops modern web UIs with React 19, Next.js 16, Vue 3.5, implementing advanced component architectures and performance optimizations.