원클릭으로
moai-lang-swift
Swift 6.0 enterprise development with async/await, SwiftUI, Combine, and Swift Concurrency. Advanced patterns for iOS, macOS, server-side Swift, and enterprise mobile applications with Context7 MCP integration.
Swift 6.0 enterprise development with async/await, SwiftUI, Combine, and Swift Concurrency. Advanced patterns for iOS, macOS, server-side Swift, and enterprise mobile applications with Context7 MCP integration.
Review and design SaaS/product marketing sites and frontend interfaces end-to-end: clarify value, fix hierarchy, and implement distinctive, production-grade UI that avoids generic AI aesthetics.
Ensures modern, professional UI design across SwiftUI, Android, and web platforms. Use when building ANY user interface components including buttons, forms, cards, layouts, navigation, or complete screens. Enforces clean minimal design, neutral color palettes with one accent color, 8px grid spacing system, proper typography hierarchy, and clear interactive states. Always reference before creating or modifying UI elements.
Activate this skill when analyzing iOS app UI/UX, evaluating iOS design patterns, proposing iOS interface improvements, or creating iOS implementation specifications. Provides deep expertise in Apple Human Interface Guidelines, SwiftUI patterns, native iOS components, accessibility standards, and iOS-specific interaction paradigms.
Build professional native macOS apps in Swift with SwiftUI and AppKit. Full lifecycle - build, debug, test, optimize, ship. CLI-only, no Xcode.
Production-grade mobile app development with Swift (iOS), Kotlin (Android), React Native, and WebView patterns, including UI/UX, navigation, state management, networking, local storage, push notifications, and App Store deployment.
Comprehensive analysis of Swift 6 ownership, concurrency safety, and systems programming foundations.
| name | moai-lang-swift |
| version | 4.0.0 |
| created | "2025-10-22T00:00:00.000Z" |
| updated | "2025-11-12T00:00:00.000Z" |
| status | stable |
| description | Swift 6.0 enterprise development with async/await, SwiftUI, Combine, and Swift Concurrency. Advanced patterns for iOS, macOS, server-side Swift, and enterprise mobile applications with Context7 MCP integration. |
| keywords | ["swift","swiftui","async-await","swift-concurrency","combine","ios","macos","server-side-swift","context7"] |
| allowed-tools | ["Read","Bash","mcp__context7__resolve-library-id","mcp__context7__get-library-docs"] |
| Field | Value |
|---|---|
| Skill Name | moai-lang-swift |
| Version | 4.0.0 (2025-11-12) |
| Allowed tools | Read, Bash, Context7 MCP |
| Auto-load | On demand when keywords detected |
| Tier | Language Enterprise |
| Context7 Integration | ✅ Swift/SwiftUI/Vapor/Combine |
Swift 6.0 enterprise development featuring modern concurrency with async/await, SwiftUI for declarative UI, Combine for reactive programming, server-side Swift with Vapor, and enterprise-grade patterns for scalable, performant applications. Context7 MCP integration provides real-time access to official Swift and ecosystem documentation.
Key capabilities:
Automatic triggers:
Manual invocation:
| Component | Version | Purpose | Status |
|---|---|---|---|
| Swift | 6.0.1 | Core language | ✅ Current |
| SwiftUI | 6.0 | Declarative UI | ✅ Current |
| Combine | 6.0 | Reactive programming | ✅ Current |
| Vapor | 4.102.0 | Server-side framework | ✅ Current |
| Xcode | 16.2 | Development environment | ✅ Current |
| Swift Concurrency | 6.0 | Async/await & actors | ✅ Current |
| Swift Testing | 0.10.0 | Modern testing framework | ✅ Current |
import Foundation
// Swift 6.0 with async/await
actor GreeterService {
func greet(name: String) -> String {
"Hello, \(name)!"
}
}
// Usage
Task {
let service = GreeterService()
let greeting = await service.greet(name: "Swift")
print(greeting)
}
Async/Await - Modern concurrency without callbacks
async - Suspends for I/Oawait - Waits for resultthrowsSwiftUI - Declarative UI framework
@State for local state@StateObject for ViewModelsCombine - Reactive programming
.catchActors - Thread-safe state isolation
@MainActor for UI threadVapor - Server-side Swift
MyApp/
├── Sources/
│ ├── App.swift # Entry point
│ ├── Models/ # Data types
│ ├── Services/ # Business logic
│ ├── ViewModels/ # UI state management
│ └── Views/ # SwiftUI components
├── Tests/
│ ├── UnitTests/
│ └── IntegrationTests/
└── Package.swift # Dependencies
import Foundation
// Structured async function
func fetchData() async throws -> String {
let url = URL(string: "https://api.example.com/data")!
let (data, _) = try await URLSession.shared.data(from: url)
return String(data: data, encoding: .utf8) ?? ""
}
// Concurrent operations with TaskGroup
func loadMultipleResources() async throws -> (String, String) {
try await withThrowingTaskGroup(of: (String, String).self) { group in
group.addTask { ("users", try await fetchUsers()) }
group.addTask { ("posts", try await fetchPosts()) }
var results: [String: String] = [:]
for try await (key, value) in group {
results[key] = value
}
return (results["users"] ?? "", results["posts"] ?? "")
}
}
import SwiftUI
@MainActor
class ContentViewModel: ObservableObject {
@Published var items: [String] = []
@Published var isLoading = false
func loadItems() async {
isLoading = true
defer { isLoading = false }
do {
items = try await fetchItems()
} catch {
items = []
}
}
}
struct ContentView: View {
@StateObject private var viewModel = ContentViewModel()
var body: some View {
NavigationView {
VStack {
if viewModel.isLoading {
ProgressView()
} else {
List(viewModel.items, id: \.self) { item in
Text(item)
}
}
}
.navigationTitle("Items")
.task {
await viewModel.loadItems()
}
}
}
}
// Thread-safe counter
actor CounterService {
private var count: Int = 0
func increment() { count += 1 }
func decrement() { count -= 1 }
func getCount() -> Int { count }
}
// Usage (automatically thread-safe)
Task {
let counter = CounterService()
await counter.increment()
let value = await counter.getCount()
}
import Vapor
func routes(_ app: Application) throws {
// GET /api/users
app.get("api", "users") { req async -> [String: String] in
return ["status": "success"]
}
// POST /api/users
app.post("api", "users") { req async -> HTTPStatus in
// Save user
return .created
}
}
Get latest Swift documentation on-demand:
# Access Swift documentation via Context7
from context7 import resolve_library_id, get_library_docs
# Swift Language Documentation
swift_id = resolve_library_id("swift")
docs = get_library_docs(
context7_compatible_library_id=swift_id,
topic="structured-concurrency",
tokens=5000
)
# SwiftUI Documentation
swiftui_id = resolve_library_id("swiftui")
swiftui_docs = get_library_docs(
context7_compatible_library_id=swiftui_id,
topic="state-management",
tokens=4000
)
# Vapor Framework Documentation
vapor_id = resolve_library_id("vapor")
vapor_docs = get_library_docs(
context7_compatible_library_id=vapor_id,
topic="routing",
tokens=3000
)
Language Integration:
Quality & Testing:
Security & Performance:
Official Resources:
Problem: Sendable conformance error
Solution: Implement Sendable protocol or use @Sendable closure
Problem: Actor isolation violation
Solution: Use nonisolated for safe properties or proper await calls
Problem: Memory leaks in closures
Solution: Capture [weak self] to break retain cycles
Problem: SwiftUI view not updating
Solution: Ensure state changes happen on @MainActor
For working examples: See examples.md
For API reference: See reference.md
For advanced patterns: See full SKILL.md in documentation archive
Last updated: 2025-11-12 | Maintained by moai-adk team