swift-best-practices

Solid

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 168 stars 27 forks Updated 4 weeks ago MIT

Install

View on GitHub

Quality Score: 92/100

Stars 20%
74
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
7 months ago
Last Updated
4 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category