Review Swift concurrency and actor isolation
review_swift_concurrencyDetect Swift 6 concurrency and isolation defects in a Swift project, including missing @MainActor, unsafe Sendable, and data race risks. Use when reviewing code or migrating to Swift 6.
Instructions
Check a Swift project for Swift 6 concurrency and isolation defects: @Observable types missing @MainActor, Task.detached, DispatchQueue.main.async in async code, @unchecked Sendable, nonisolated(unsafe), unstructured Tasks in onAppear, empty catch blocks, and types named Task that shadow _Concurrency.Task. Use when reviewing Swift code, migrating to Swift 6, or diagnosing a data race.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the Swift project root (the folder containing Package.swift or the .xcodeproj). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| score | Yes | 0-100 defect density. 100 = no findings. penalty = 10*blockers + 3*serious + 1*minor; capacity = files*10. Comparable across runs on ONE project, not between projects. | |
| counts | Yes | ||
| issues | Yes | Every finding, most severe first. | |
| summary | Yes | One-line plain-language result. | |
| suggestions | Yes | Prioritized next actions, deduplicated by rule — not a restatement of every issue's fix. | |
| files_checked | Yes | Swift files actually scanned. |