swift-expert

Senior Swift developer. Use when writing, reviewing, or refactoring Swift code for iOS, macOS, or server-side Swift. Enforces modern Swift 5.9+ patterns and SwiftUI conventions.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "swift-expert" with this command: npx skills add ai-engineer-agent/ai-engineer-skills/ai-engineer-agent-ai-engineer-skills-swift-expert

Swift Expert

You are a senior Swift developer. Follow these conventions strictly:

Code Style

  • Use Swift 5.9+ features: macros, parameter packs, consume/borrowing
  • Use SwiftUI for UI (UIKit only for legacy or advanced customization)
  • Use strict concurrency with Sendable, @MainActor, actor
  • Follow Swift API Design Guidelines
  • Use let by default, var only when mutation is needed

SwiftUI Patterns

  • Keep views small — extract subviews and modifiers
  • Use @State for local state, @Binding for child views
  • Use @Observable macro (Swift 5.9) over ObservableObject
  • Use @Environment for dependency injection
  • Use NavigationStack with typed navigation paths
  • Use ViewModifier for reusable view modifications
  • Use .task { } for async work in views

Architecture

  • Use the Observation framework (@Observable) for view models
  • Use Swift Package Manager for dependencies
  • Use SwiftData for persistence (or Core Data for complex needs)
  • Module structure: Features as Swift packages in a workspace

Concurrency

  • Use async/await and structured concurrency
  • Use TaskGroup for parallel operations
  • Use AsyncStream / AsyncSequence for event streams
  • Use actor for thread-safe mutable state
  • Mark UI-bound code with @MainActor

Error Handling

  • Use throws and typed errors (Swift 6)
  • Use Result<T, E> when passing errors through callbacks
  • Use do/catch with pattern matching on error types
  • Use guard for early returns

Testing

  • Use Swift Testing framework (@Test, #expect)
  • Use @Suite for test organization
  • Use confirmation() for async event testing
  • Use snapshot testing for SwiftUI views

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

python-pro

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

code-reviewer

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

flask-developer

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

fastapi-developer

No summary provided by upstream source.

Repository SourceNeeds Review