PlugWiki

swift-concurrency Skill (AvdLee): Swift 6 Data Race Fixes

Helps your agent fix Swift concurrency errors and migrate to Swift 6 safely, by checking your project settings before it suggests a fix.

Installs
17.2K
on skills.sh
Stars
1.7K
on GitHub
Files
19
besides SKILL.md
Updated
Sep 2026
last repo commit

swift-concurrency makes the agent check before it fixes. It reads Package.swift or the Xcode project for language mode, strict concurrency level, default isolation and upcoming features, then captures the exact diagnostic and decides which actor the code belongs to. It avoids blanket fixes: no @MainActor everywhere, and no @unchecked Sendable without a written safety reason.

It has a Quick Fix Mode for one-file problems, a table of common compiler diagnostics with the smallest safe fix, a tool-selection table (async let, task groups, actors) and a migration loop of build, fix, rebuild, test. 16 reference files cover actors, tasks, Sendable, streams, testing, Core Data and more. The skill bundles no scripts. It is based on Antoine van der Lee's Swift Concurrency Course.

Good for

  • iOS and Mac developers moving a project to Swift 6 or strict concurrency
  • Developers stuck on Sendable, actor isolation or @MainActor compiler errors
  • Teams with flaky async tests or SwiftLint async warnings

Install swift-concurrency

Claude Code

  1. 1

    Copy this prompt.

    Install the swift-concurrency skill in Claude Code. Run this command:
    
    npx skills add https://github.com/avdlee/swift-concurrency-agent-skill --skill swift-concurrency
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when working with tasks, actors, @MainActor, Sendable, data races, thread safety, or concurrency-related compiler and linter warnings.

Sections in SKILL.md

  1. Fast Path
  2. Quick Fix Mode
  3. Common Diagnostics
  4. When Quick Fixes Fail
  5. Smallest Safe Fixes
  6. Concurrency Tool Selection
  7. Common Scenarios
  8. Task entry isolation
  9. Swift 6 Migration Quick Guide
  10. Migration Validation Loop
  11. Reference Router
  12. Verification Checklist

Key facts

Installs on skills.sh
17,242 (Nov 2, 2026)
Last commit
2026-09-14

What it includes

  • Read project settings, capture the diagnostic, find the isolation boundary, then fix

    Checks language mode, strict concurrency, default isolation and upcoming features first. If any are unknown it asks you instead of guessing.

    Read · Fast Path

  • For one-file, clear-boundary problems that take one or two behaviour-preserving steps

    Skipped when build settings are unknown, the issue crosses modules, or the fix would need unsafe escape hatches.

    Write · Quick Fix Mode

  • Maps compiler and linter messages to a first check and the smallest safe fix

    Covers actor-isolation errors, non-Sendable transfers, SwiftLint async_without_await, XCTest wait, Core Data, @Observable and Thread.current.

    Common diagnostics

  • Isolate UI state to @MainActor, move shared state into actors, prefer immutable values

    Task.detached only with a clear reason; @preconcurrency and nonisolated(unsafe) need a documented safety reason and a removal plan.

    Write · Smallest safe fixes

  • async/await, async let, task groups, Task, actor or @MainActor, by need

    With two worked scenarios: a network call with a UI update and parallel processing of an array.

    Concurrency tool selection

  • Build, fix one error category, rebuild, test, then move on

    Runs swift build or an Xcode build and the test suite after each change. Keeps commits small.

    Runs code · Swift 6 migration loop

  • Opens the smallest of 16 reference files that matches your question

    Foundations, streams, testing, performance, memory, Core Data, Observation, migration, linting and a glossary.

    Read · Reference router

  • Re-check settings, build, run tests, profile with Instruments, check cancellation

    Also says to avoid semaphores and ad hoc locks in async code.

    Runs code · Verification checklist

From the official docs

Permissions

Low risk

The skill edits your Swift code and has the agent run your build and tests as it migrates. Work on a branch and review each change.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It edits code and runs your build and tests

    The migration loop runs swift build or an Xcode build and your tests after each change, and the migration guide shows swift package migrate commands. Work on a branch and review each commit. github.com

Questions

What does the swift-concurrency skill do?

It guides the agent through Swift concurrency problems: data races, actor isolation, Sendable errors, callback-to-async conversion and Swift 6 migration. It checks your project settings first and prefers the smallest safe fix.

How do I install it?

Use the install box above. The README recommends the skills CLI with --skill swift-concurrency, and also lists the OpenAI Plugins Directory for ChatGPT and Codex and a Claude Code plugin.

Does it work in Claude Code, Codex and Cursor?

The README says the repo is a portable Agent Plugin with manifests for Claude Code, Cursor, Codex and pi, and that it is published in the OpenAI Plugins Directory for ChatGPT and Codex.

How should I ask for it?

The README suggests: "Use the swift concurrency skill and analyze the current project for Swift Concurrency improvements".

Do I need an API key or scripts?

No key is mentioned and the skill bundles no scripts. During migration it tells the agent to run your normal build and test commands.

Will it just add @MainActor everywhere?

No. A guardrail says not to recommend @MainActor as a blanket fix. It must justify why the code is UI-bound. Unsafe escape hatches need a written safety reason and a plan to remove them.

Does it cover SwiftUI and Core Data?

It covers concurrency in Core Data and @Observable. The author lists SwiftUI Expert, Core Data Expert and Swift Testing Expert as separate skills.

Is it safe?

It edits your Swift code and, during migration, runs your build and test commands. Work on a branch, keep commits small as the skill advises, and review each change.

Information

updated Nov 2, 2026

Folder
skills/swift-concurrency

avdlee/swift-concurrency-agent-skillskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 5
  1. swift-concurrency SKILL.md · github.com
  2. Swift-Concurrency-Agent-Skill README · github.com
  3. skills.sh listing · skills.sh
  4. avdlee/swift-concurrency-agent-skill · github.com
  5. migration.md · github.com

Updated Nov 2, 2026.