/SKILL.md
Comprehensive Swift 6 and SwiftUI development guidelines for building iOS 26, iOS 18, iPadOS, macOS, watchOS, visionOS, and tvOS applications. Covers Foundation Models API, BGContinuedProcessingTask, Call Translation API, Liquid Glass design system, data-race safety, typed throws, synchronization primitives, SwiftUI/UIKit interoperability, zoom transitions, and document-based apps. Use when building new Apple platform apps, implementing Apple Intelligence features, optimizing performance with Swift 6 concurrency, following Apple Human Interface Guidelines, creating cross-platform applications, or working with iOS 26/18 APIs. Triggers on Swift code, SwiftUI views, Xcode projects, app architecture, background processing, translation features, Foundation Models, synchronization, actors, Sendable types, or modern Apple platform development.
npx skillsauth add frostist/swift-human-guidelines swift-human-guidelinesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build production-ready Swift and SwiftUI applications for all Apple platforms following Apple's Human Interface Guidelines, modern Swift best practices, and performance optimization techniques. This skill provides comprehensive guidance for creating new apps, architecting cross-platform solutions, and implementing efficient, maintainable code.
Use this skill when:
Single Platform:
Multi-Platform:
Start with production-ready templates in assets/:
ios-app-template.swift: Modern iOS app with TabView navigation, MVVM architecture, async/awaitmacos-app-template.swift: macOS app with NavigationSplitView, Settings, window managementTemplates include:
@main entry pointOrganize code for maintainability and cross-platform sharing:
MyApp/
├── Shared/ # 100% shared code
│ ├── Models/ # Data structures
│ ├── ViewModels/ # Business logic
│ ├── Services/ # Networking, persistence
│ └── Views/Shared/ # Reusable components
├── iOS/ # iOS-specific
│ ├── Views/
│ └── iOSApp.swift
├── macOS/ # macOS-specific
│ ├── Views/
│ └── macOSApp.swift
└── Tests/
Architecture:
State Management:
@State: Local view state@StateObject: View owns the lifecycle@ObservedObject: View observes external object@EnvironmentObject: Shared across hierarchy@Binding: Two-way connectionPerformance:
Example:
// 1. Model
struct Article: Identifiable, Codable {
let id: UUID
let title: String
let content: String
}
// 2. ViewModel
@MainActor
class ArticleListViewModel: ObservableObject {
@Published var articles: [Article] = []
@Published var isLoading = false
func loadArticles() async {
isLoading = true
defer { isLoading = false }
articles = await fetchArticles()
}
}
// 3. View
struct ArticleListView: View {
@StateObject private var viewModel = ArticleListViewModel()
var body: some View {
List(viewModel.articles) { article in
ArticleRow(article: article)
}
.task {
await viewModel.loadArticles()
}
}
}
iOS: NavigationStack
NavigationStack(path: $path) {
List(items) { item in
NavigationLink(value: item) {
ItemRow(item: item)
}
}
.navigationDestination(for: Item.self) { item in
ItemDetailView(item: item)
}
}
macOS: NavigationSplitView
NavigationSplitView {
List(items, selection: $selectedItem) { item in
ItemRow(item: item)
}
} detail: {
if let item = selectedItem {
ItemDetailView(item: item)
}
}
Key strategies:
LazyVStack/LazyHStack for large listsIdentifiable@Published selectivelySee references/performance-optimization.md for detailed patterns and examples.
Maximize code sharing:
Use conditional compilation:
#if os(iOS)
// iOS-specific code
#elseif os(macOS)
// macOS-specific code
#endif
See references/cross-platform-development.md for comprehensive patterns.
Use the standard Xcode build command with analysis:
xcodebuild -project MyApp.xcodeproj -scheme MyApp -configuration Debug clean build analyze
Unit Tests: Test ViewModels and business logic
@MainActor
class ViewModelTests: XCTestCase {
func testLoadData() async throws {
let viewModel = ViewModel(repository: MockRepository())
await viewModel.loadData()
XCTAssertFalse(viewModel.items.isEmpty)
}
}
UI Tests: Test user flows with SwiftUI previews
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
.previewDisplayName("Light Mode")
ContentView()
.preferredColorScheme(.dark)
.previewDisplayName("Dark Mode")
}
}
This skill includes comprehensive reference documentation:
Complete Apple HIG coverage:
When to read: Designing UI, ensuring HIG compliance, implementing Liquid Glass materials, choosing navigation patterns
Modern SwiftUI patterns:
When to read: Architecting new features, implementing state management, using iOS 18/26 APIs, creating reusable components
Performance techniques:
When to read: Optimizing slow views, reducing memory usage, improving list scrolling, debugging performance issues
Modern Swift features:
When to read: Using Swift 6 features, implementing concurrency, ensuring data-race safety, migrating to Swift 6
Apple Intelligence integration (iOS 26+):
When to read: Implementing Apple Intelligence features, adding summarization, extracting information from text
Advanced background execution (iOS 26+):
When to read: Implementing background processing, finishing user-initiated tasks, using GPU in background
Real-time translation (iOS 26+):
When to read: Implementing translation features, building communication apps, adding multilingual support
Low-level concurrency primitives (Swift 6+):
When to read: Implementing thread-safe primitives, building custom synchronization, optimizing performance-critical code
When to read: Using modern Swift features, implementing concurrency, managing memory, working with generics
Multi-platform strategies:
When to read: Building cross-platform apps, adapting UI for different platforms, maximizing code reuse
Production-ready iOS app template with:
Production-ready macOS app template with:
Architecture:
State Management:
Performance:
Code Quality:
Platform Integration:
Cross-Platform:
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.