swift-concurrency

Diagnose data races and convert callback-based Swift code to async/await.

2|Updated Sep 13, 2022
One-click install
npx skills add https://github.com/horizontalsystems/solana-kit-ios --skill swift-concurrency-horizontalsystems
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-concurrency
Source: https://github.com/horizontalsystems/solana-kit-ios/tree/main/.agents/skills/swift-concurrency
Command: npx skills add https://github.com/horizontalsystems/solana-kit-ios --skill swift-concurrency-horizontalsystems

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Swift developers often struggle with concurrency pitfalls, including data races, incorrect actor isolation, and Sendable conformance gaps while migrating to Swift 6. This Skill provides structured guidance to diagnose these issues, refactor callback-based code to async/await, and align code with modern concurrency patterns.

Core Features & Use Cases

  • Diagnose data races and identify isolation boundaries across modules.
  • Convert callback-based code to async/await and implement actor isolation best practices.
  • Resolve Sendable conformance issues and guide migration to Swift 6 with safe, incremental changes.
  • Provide migration playbooks and lint guidance for concurrency-related warnings (e.g. async_without_await, actor isolation, MainActor lint).

Quick Start

Describe your Swift project and paste the relevant code snippet, and I will diagnose concurrency issues and propose concrete migration steps.

Frequently Asked Questions about swift-concurrency

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

FAQPage Schema
How do I convert callback-based Swift code to async/await?

Resolving Sendable conformance issues requires identifying isolation boundaries across modules, validating Swift language mode settings, and applying migration-safe recommendations to ensure safe data passing across concurrency domains.

What is the best way to diagnose data races in Swift?

Diagnosing data races involves identifying incorrect actor isolation boundaries, evaluating strict concurrency settings, and analyzing code snippets to detect concurrent access faults and propose structural refactoring steps.

How do I migrate my project to Swift 6 strict concurrency?

Migrating to Swift 6 involves validating default actor isolation settings, resolving lint warnings like async_without_await, and applying an incremental migration playbook to align existing code with Swift 6 language modes.

Why does my Swift actor isolation show lint warnings during async tasks?

Actor isolation lint warnings occur when async tasks violate isolation boundaries or lack proper MainActor annotations. Resolving them requires validating strict concurrency settings and providing migration-safe recommendations for actor boundaries.

Can I implement actor isolation incrementally without breaking existing modules?

Yes, you can implement actor isolation incrementally by validating project settings, identifying isolation boundaries across modules, and applying migration-safe step-by-step changes to resolve Sendable conformance without breaking existing code.