Skip to content
Skillpedia
Mobile apps7.4k · #13248

swift-concurrency-expert

What it does

This skill diagnoses compiler errors about Swift concurrency and applies safe fixes for actors, main-thread isolation, and shared data. It is for developers working on Swift 6 apps.

When to use it

  • ✓When Swift shows errors about actors, isolation, or Sendable types.
  • ✓When you need background work moved off the main thread safely.
  • ✓When you want an existing Swift concurrency setup reviewed.

Skill link

https://github.com/steipete/agent-scripts/blob/main/skills/swift-concurrency-expert/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/steipete/agent-scripts/blob/main/skills/swift-concurrency-expert/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Xcode says my view model has a Sendable error. Fix it with the smallest safe change.”

5 new skills a week. 1 minute to read.

How it works

The agent captures the exact compiler message, finds the current actor setting, and applies the smallest fix that keeps behavior the same. It avoids unsafe shortcuts unless thread safety can be shown.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Swift Concurrency Expert

Attribution: copied from @Dimillian’s Dimillian/Skills (2025-12-31).

Overview

Review and fix Swift Concurrency issues in Swift 6.2+ codebases by applying actor isolation, Sendable safety, and modern concurrency patterns with minimal behavior changes.

Workflow

1. Triage the issue

  • Capture the exact compiler diagnostics and the offending symbol(s).
  • Identify the current actor context (@MainActor, actor, nonisolated) and whether a default actor isolation mode is enabled.
  • Confirm whether the code is UI-bound or intended to run off the main actor.

2. Apply the smallest safe fix

Prefer edits that preserve existing behavior while satisfying data-race safety.

Common fixes:

  • UI-bound types: annotate the type or relevant members with @MainActor.
  • Protocol conformance on main actor types: make the conformance isolated (e.g., extension Foo: @MainActor SomeProtocol).
  • Global/static state: protect with @MainActor or move into an actor.
  • Background work: move expensive work into a @concurrent async function on a nonisolated type or use an actor to guard mutable state.
  • Sendable errors: prefer immutable/value types; add Sendable conformance only when correct; avoid @unchecked Sendable unless you can prove thread safety.

Reference material

  • See references/swift-6-2-concurrency.md for Swift 6.2 changes, patterns, and examples.
  • See references/swiftui-concurrency-tour-wwdc.md for SwiftUI-specific concurrency guidance.
FAQ

Does it change how the app behaves?

The skill aims for minimal behavior changes while meeting data-race safety rules.

When is an unchecked Sendable allowed?

Only when thread safety can be proven, according to the skill.

Which Swift versions does it target?

Swift 6.2 and later.

Details

Original description by the author

Swift concurrency review/fix: compiler errors, Sendable, isolation, remediation.

repo: steipete/agent-scripts

Popularity

GitHub stars
7.4k
Ranking position
#13248
License
MIT
Updated
10/30/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills