swift-concurrency

Guide Swift Concurrency implementation with async/await, actors, and Sendable conformance.

41|4|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/michaelversus/SwiftFindRefs --skill swift-concurrency-michaelversus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-concurrency
Source: https://github.com/michaelversus/SwiftFindRefs/tree/main/.claude/skills/swift-concurrency
Command: npx skills add https://github.com/michaelversus/SwiftFindRefs --skill swift-concurrency-michaelversus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write safer, more performant, and more maintainable concurrent Swift code by leveraging Swift's modern concurrency features like async/await, actors, and structured concurrency.

Core Features & Use Cases

  • Guidance on Swift Concurrency: Provides best practices, patterns, and implementation details for async/await, actors, tasks, Sendable conformance, and migration to Swift 6.
  • Data Race Prevention: Helps developers identify and fix data races and thread safety issues.
  • Migration Assistance: Guides users through migrating to Swift 6 and adopting modern concurrency patterns.
  • Use Case: A developer is struggling with a "Main actor-isolated property cannot be used from a nonisolated context" error. This Skill can analyze the code, explain the isolation boundary, and suggest appropriate fixes using actors or nonisolated access.

Quick Start

Use the swift-concurrency skill to understand how to protect shared mutable state using actors.

Frequently Asked Questions about swift-concurrency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix the "Main actor-isolated property cannot be used from a nonisolated context" error in Swift?

Fix this Swift concurrency error by analyzing the code's isolation boundary and applying actors or `nonisolated` access modifiers. Adjusting actor isolation ensures thread-safe access to main actor properties from nonisolated contexts.

What is the best way to prevent data races using Swift concurrency?

Prevent data races in Swift concurrency by using actors to protect shared mutable state. Actors serialize access to their data, ensuring thread safety and eliminating concurrent modification issues.

How do I migrate my codebase to Swift 6 concurrency?

Migrate to Swift 6 by adopting modern concurrency patterns, ensuring Sendable conformance, and resolving compiler warnings. This process guides you through updating async/await and structured concurrency implementations.

When should I use Sendable conformance in Swift async/await code?

Use Sendable conformance to mark types as safe for concurrent execution across actor boundaries. It guarantees thread safety during async/await operations by preventing shared mutable state isolation issues.

Why does my Swift structured concurrency task trigger a thread safety warning?

Your structured concurrency task triggers a thread safety warning due to potential data races or missing actor isolation. Resolve this by applying Swift concurrency best practices and verifying Sendable compliance.