swift-development

Swift language patterns and best practices including concurrency, performance, and modern idioms. Use for Swift language-level code review or architecture guidance.

149 stars

Best use case

swift-development is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Swift language patterns and best practices including concurrency, performance, and modern idioms. Use for Swift language-level code review or architecture guidance.

Teams using swift-development should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/swift/SKILL.md --create-dirs "https://raw.githubusercontent.com/rshankras/claude-code-apple-skills/main/skills/swift/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/swift/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How swift-development Compares

Feature / Agentswift-developmentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Swift language patterns and best practices including concurrency, performance, and modern idioms. Use for Swift language-level code review or architecture guidance.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 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

## Available Modules

### concurrency-patterns/
Swift concurrency architecture and patterns.
- Swift 6.2 approachable concurrency features
- Structured concurrency (async let, TaskGroup, .task modifier)
- Actors, isolation, reentrancy, @MainActor
- Continuations for bridging legacy APIs
- Swift 6 strict concurrency migration guide

### memory/
Swift 6.2 InlineArray and Span for low-level memory performance.
- InlineArray: fixed-size, stack-allocated collections with zero heap overhead
- Span family: safe, non-escapable access to contiguous memory
- Lifetime dependencies and non-escapable type constraints
- Performance guidance: when to use InlineArray/Span vs Array/UnsafePointer

## How to Use

1. Identify user's need from their question
2. Read relevant module files from subdirectories
3. Apply the guidance to their specific context
4. Cross-reference with platform-specific skills (ios/, macos/) as needed

Related Skills

swift-concurrency-updates

149
from rshankras/claude-code-apple-skills

Swift 6.2 concurrency updates including default MainActor inference, @concurrent for background work, isolated conformances, and approachable concurrency migration. Use when adopting Swift 6.2 concurrency features or fixing data-race errors.

product-development

149
from rshankras/claude-code-apple-skills

End-to-end product development for iOS/macOS apps. Covers market research, competitive analysis, PRD generation, architecture specs, UX design, implementation guides, testing, and App Store release. Use for product planning, validation, or generating specification documents.

swiftui-debugging

149
from rshankras/claude-code-apple-skills

Diagnose SwiftUI performance issues including unnecessary re-renders, view identity problems, and slow body evaluations. Use when SwiftUI views are slow, janky, or re-rendering too often.

swiftdata-architecture

149
from rshankras/claude-code-apple-skills

Deep dive into SwiftData design patterns and best practices. Covers schema design, query patterns, repository pattern, and performance optimization. Use when designing data models or improving SwiftData usage.

appkit-swiftui-bridge

149
from rshankras/claude-code-apple-skills

Expert guidance for hybrid AppKit-SwiftUI development. Covers NSViewRepresentable, hosting controllers, and state management between frameworks. Use when bridging AppKit and SwiftUI.

macos-development

149
from rshankras/claude-code-apple-skills

Comprehensive macOS development guidance including Swift 6+, SwiftUI, SwiftData, architecture patterns, AppKit bridging, and macOS 26 Tahoe APIs. Use for macOS code review, best practices, UI review, or platform-specific features.

ios-development

149
from rshankras/claude-code-apple-skills

Comprehensive iOS development guidance including Swift best practices, SwiftUI patterns, UI/UX review against HIG, and app planning. Use for iOS code review, best practices, accessibility audits, or planning new iOS apps.

watchOS

149
from rshankras/claude-code-apple-skills

watchOS development guidance including SwiftUI for Watch, Watch Connectivity, complications, and watch-specific UI patterns. Use for watchOS code review, best practices, or Watch app development.

visionos-widgets

149
from rshankras/claude-code-apple-skills

visionOS widget patterns including mounting styles, glass/paper textures, proximity-aware layouts, and spatial widget families. Use when creating or adapting widgets for visionOS.

test-data-factory

149
from rshankras/claude-code-apple-skills

Generate test fixture factories for your models. Builder pattern and static factories for zero-boilerplate test data. Use when tests need sample data setup.

test-contract

149
from rshankras/claude-code-apple-skills

Generate protocol/interface test suites that any implementation must pass. Define the contract once, test every implementation. Use when designing protocols or swapping implementations.

tdd-refactor-guard

149
from rshankras/claude-code-apple-skills

Pre-refactor safety checklist. Verifies test coverage exists before AI modifies existing code. Use before asking AI to refactor anything.