swift-best-practices

Featured

This skill should be used when writing or reviewing Swift code for iOS or macOS projects. Apply modern Swift 6+ best practices, concurrency patterns, API design guidelines, and migration strategies. Covers async/await, actors, MainActor, Sendable, typed throws, and Swift 6 breaking changes. Keywords: concurrency, async-await, actors, Sendable, typed-throws, Swift-6, migration, data-races, MainActor, nonisolated, isolated, iOS, macOS, SwiftUI, Combine, Swift-concurrency, actor-isolation, strict-concurrency, Swift-migration, modern-Swift, Swift-evolution, code-review, Swift-patterns, Apple-platforms, Xcode, iOS-development, macOS-development

Code & Development 250 stars 36 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
80
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Swift Best Practices Skill ## Overview Apply modern Swift development best practices focusing on Swift 6+ features, concurrency safety, API design principles, and code quality guidelines for iOS and macOS projects targeting macOS 15.7+. ## When to Use This Skill Use this skill when: - Writing new Swift code for iOS or macOS applications - Reviewing Swift code for correctness, safety, and style - Implementing Swift concurrency features (async/await, actors, MainActor) - Designing Swift APIs and public interfaces - Migrating code from Swift 5 to Swift 6 - Addressing concurrency warnings, data race issues, or compiler errors related to Sendable/isolation - Working with modern Swift language features introduced in Swift 6 and 6.2 ## SwiftLens MCP Integration (Claude Code) This skill complements **SwiftLens MCP server** for semantic-level Swift code analysis. **What SwiftLens Provides:** - 15 tools for semantic Swift analysis using Apple's SourceKit-LSP - Symbol lookup, cross-file references, type information - Safe code modification and refactoring - Compiler-grade understanding of Swift code structure **What This Skill Provides:** - Swift 6+ design patterns and best practices - Concurrency strategies (async/await, actors, MainActor) - API design guidelines and naming conventions - Migration guidance (Swift 5 → Swift 6) **Setup for Claude Code CLI:** Create `.claude/mcps/swiftlens.json` in your Swift project: ```json { "mcpServers": { "swiftlens": { "desc...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
1 years ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

neo-swift

Use this skill when writing, reviewing, debugging, or modernizing Swift code for iOS, macOS, server-side Swift, or shared packages. Trigger for Swift 5+ language features, structured concurrency, memory safety, protocols/generics, SwiftUI integration, and performance-sensitive code.

7 Updated yesterday
Benknightdark
Code & Development Listed

swift-concurrency

Expert guidance on Swift Concurrency best practices, patterns, and implementation. Use when developers mention: (1) Swift Concurrency, async/await, actors, or tasks, (2) "use Swift Concurrency" or "modern concurrency patterns", (3) migrating to Swift 6, (4) data races or thread safety issues, (5) refactoring closures to async/await, (6) @MainActor, Sendable, or actor isolation, (7) concurrent code architecture or performance optimization.

487 Updated today
aiskillstore
Code & Development Listed

swiftui-expert

This skill should be used when the user is building, reviewing, or debugging SwiftUI/Swift code for iOS, macOS, or visionOS apps. It detects the project's iOS and Swift version and covers MV architecture (no per-screen ViewModels by default), @Observable state, NavigationStack typed routes, view lifecycle, Approachable Concurrency, persistence (SwiftData / Core Data / SQLiteData / GRDB), design tokens, selective Liquid Glass adoption, iOS and macOS platform capabilities, accessibility, performance with Instruments SwiftUI, and Swift Testing. Trigger phrases include "review my SwiftUI code", "my @State isn't updating", "should I adopt Liquid Glass", "fix my Swift concurrency warning", "set up SwiftData", "what should App.swift own", "ObservableObject to @Observable", "should I use MVVM in SwiftUI", "do I need TCA", and "AppKit or SwiftUI for my Mac app". For driving/screenshotting a RUNNING app use the peekaboo validator; for dead-code hunts use the dead-code plugin.

11 Updated 1 weeks ago
johnkozaris