skillfed

swift-development

Swift Development provides language-level guidance for writing correct, performant Swift across iOS, macOS, and other Apple platforms. It covers concurrency architecture with async/await and actors, Swift 6 strict concurrency migration, memory optimization through InlineArray and Span, and code complexity standards via SwiftLint thresholds. Use it to review code for data races, actor isolation, and modern idioms.

Swift Development reviews your code for concurrency correctness and modern Swift patterns across Apple platforms.

AI-generated summary based on this skill's SKILL.md

565 47 MIT updated by rshankras

Install

rshankras/claude-code-apple-skills/swift · repository language: Swift

CLI (skillfed)coming soon
git clone https://github.com/rshankras/claude-code-apple-skills
cp -r claude-code-apple-skills/skills/swift ~/.claude/skills/swift

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What are swift concurrency best practices?

Swift Development emphasizes structured concurrency using async/await and actors to prevent data races. Key practices include isolating mutable state within actors, using async let for concurrent tasks, TaskGroup for dynamic task collections, and @MainActor for UI thread safety. Apply Sendable constraints to ensure type-safe data sharing across isolation domains, and leverage nonisolated declarations judiciously in Swift 6 strict concurrency mode.

How does Swift Development help migrate to Swift 6 strict concurrency?

Swift Development guides Swift 6 strict concurrency migration by identifying actor isolation violations and data race errors in your codebase. It explains how to adopt Sendable protocols, resolve reentrancy issues, and use nonisolated and nonsending annotations appropriately. The skill helps you incrementally enable strict concurrency checking and refactor legacy callback-based APIs using continuations for safer async integration.

How can I optimize Swift performance by reducing allocations and memory overhead?

Swift Development covers memory optimization through low-level constructs like InlineArray and Span to eliminate heap allocations. It teaches Swift's cost model—how ARC, value semantics, and allocation patterns affect performance. The skill guides unsafe pointer replacement with safer alternatives, profiling with Instruments, and applying SwiftLint complexity thresholds to maintain efficient, maintainable code across iOS, macOS, and other Apple platforms.

What does Swift Development teach about async/await, actors, and structured concurrency?

Swift Development explains async/await as the foundation for readable, safe concurrent code, replacing callback pyramids. Actors provide isolation boundaries for mutable state, preventing data races automatically. Structured concurrency ensures tasks are scoped and cancelled predictably. The skill covers async let for concurrent bindings, TaskGroup for dynamic parallelism, and @MainActor isolation for UI safety—core patterns for modern Swift concurrency architecture.

How does Swift Development apply SwiftLint rules to code quality?

Swift Development uses SwiftLint complexity thresholds and rules to enforce consistent, maintainable code standards. It guides configuration of cyclomatic complexity limits, line length, and other metrics to catch quality regressions early. Combined with concurrency reviews and performance optimization, SwiftLint integration helps teams maintain modern Swift idioms and prevent technical debt in iOS, macOS, and cross-platform Apple development.

What modern Swift patterns and idioms does this skill cover?

Swift Development teaches modern idioms including structured concurrency with async/await and actors, Sendable protocol adoption, @MainActor and nonisolated isolation attributes, and safe bridging of legacy APIs via continuations. It emphasizes value semantics, protocol-oriented design, and efficient memory management through InlineArray and Span. These patterns ensure your Swift code is correct, performant, and aligned with Swift 6 best practices across Apple platforms.

SKILL.md

rendered from the published skill — quoted content, verbatim

Swift Development

Swift language-level guidance that applies across all Apple platforms.

When This Skill Activates

Use this skill when the user: - Asks about Swift concurrency (async/await, actors, Sendable, TaskGroup) - Needs help with Swift 6 strict concurrency migration - Has data race or actor isolation errors - Asks about InlineArray, Span, or low-level memory performance - Wants to eliminate heap allocations or replace unsafe pointers - Asks about modern Swift patterns independent of any specific platform - Wants complexity/size limits (SwiftLint thresholds) on agent-written code

Available Modules

concurrency-patterns/

Swift concurrency architecture and patterns. - Swift 6.2 approachable concurrency features (incl. nonisolated(nonsending), Apple's adoption doctrine) - Structured concurrency (async let, TaskGroup, .task modifier,

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 14 files
skills/swift/SKILL.md
skills/swift/code-size/SKILL.md
skills/swift/code-size/rules/swiftlint.yml
skills/swift/concurrency-patterns/SKILL.md
skills/swift/concurrency-patterns/actors-and-isolation.md
skills/swift/concurrency-patterns/concurrency-internals.md
skills/swift/concurrency-patterns/continuations-bridging.md
skills/swift/concurrency-patterns/migration-guide.md
skills/swift/concurrency-patterns/structured-concurrency.md
skills/swift/concurrency-patterns/swift62-concurrency.md
skills/swift/concurrency/SKILL.md
skills/swift/concurrency/rules/swiftlint.yml
skills/swift/memory/SKILL.md
skills/swift/memory/swift-performance.md

Related skills

Tags

async-await-patterns concurrency-architecture memory-optimization actor-model code-quality-metrics performance-profiling strict-safety heap-allocation language-modernization