Peter Steinberger

Swift Concurrency Expert

開發程式設計v1.0.0
作者:Peter Steinberger更新於 2026-05-11swift-concurrency-expert@clawhub_steipete/swift-concurrency-expert
程式碼審查Bug 修復

據 AlphaMoat 統計,截至 2026-09,Swift Concurrency Expert 累計下載 4,056 次、獲 5 個星標,在全部 5,078 個 AI 技能中排名第 2,510 位,在「開發程式設計」分類(577 個)中排名第 327 位。

累計安裝
340
累計下載
4056
星標
5
全站排名
#2,510
全站前 50% · 「開發程式設計」前 57%
平台累計安裝累計下載星標評論
ClawHub ↗13340155-
SkillHub ↗34040565—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

先確認編譯診斷、actor 上下文與已啟用的隔離模式,再考慮主 actor 隔離、狀態保護、後台任務及正確的 Sendable 一致性。優先減少行為變化,避免未經證明的安全斷言。部署前需審查修改並編譯、測試專案。

資料釋出於 2026-10-27

可以用來做什麼

  • 診斷 Swift 併發錯誤

什麼時候用

  • actor 隔離或 Sendable 診斷需要修復時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

根據這個診斷提出儘量保留行為的最小併發修復。

月度資料趨勢

累計下載4056
2845349641462026-03 · 累計下載 29352026-05 · 累計下載 33462026-06 · 累計下載 34952026-07 · 累計下載 37382026-08 · 累計下載 38762026-09 · 累計下載 405626-0326-09
星標5
4562026-03 · 星標 52026-05 · 星標 52026-06 · 星標 52026-07 · 星標 52026-08 · 星標 52026-09 · 星標 526-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-094056—5
2026-083876+3.7%5
2026-073738+7.0%5
2026-063495+4.5%5
2026-053346—5
2026-032935—5

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

1.8 KB · ClawHub v1.0.0
---
name: swift-concurrency-expert
description: Swift Concurrency review and remediation for Swift 6.2+. Use when asked to review Swift Concurrency usage, improve concurrency compliance, or fix Swift concurrency compiler errors in a feature or file.
---

# Swift Concurrency Expert

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

## Overview
展開全部(共 38 行)

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.

「開發程式設計」分類下的熱門技能

Peter Steinberger 的其他技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。