‹ 首页

migrating-to-swift-concurrency

@kylehughes · 收录于 1 周前

Provides the complete Swift Concurrency Migration Guide. Use when migrating to Swift 6, resolving data-race safety errors, understanding Sendable and actor isolation, or incrementally adopting async/await.

适合你,如果正在将 Swift 代码升级到 Swift 6 并解决并发安全问题

/ 下载安装
migrating-to-swift-concurrency.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add kylehughes/the-unofficial-swift-concurrency-migration-skill/migrating-to-swift-concurrency
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- kylehughes/the-unofficial-swift-concurrency-migration-skill/migrating-to-swift-concurrency
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify kylehughes/the-unofficial-swift-concurrency-migration-skill/migrating-to-swift-concurrency
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
54GitHub stars
~702最小装载
~21.9K含声明引用
~21.9K文本包总量
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · Apache-2.0 · bcb4569

Swift Concurrency Migration Guide

The complete content of the Swift Concurrency Migration Guide by Apple. This guide helps you migrate your code to take advantage of Swift's data-race safety guarantees and the Swift 6 language mode.

Documentation
  • Data Race Safety ([Guide/DataRaceSafety.md](Guide/DataRaceSafety.md)): Learn about the fundamental concepts Swift uses to enable data-race-free
  • Migration Strategy ([Guide/MigrationStrategy.md](Guide/MigrationStrategy.md)): Get started migrating your project to the Swift 6 language mode.
  • Enable data-race safety checking ([Guide/EnableDataRaceSafety.md](Guide/EnableDataRaceSafety.md)): Use Swift 6 to get full data-race safety checking or add checking to an existing Swift 5 project.
  • Common Compiler Errors ([Guide/CommonProblems.md](Guide/CommonProblems.md)): Identify, understand, and address common problems you can encounter while
  • Incremental Adoption ([Guide/IncrementalAdoption.md](Guide/IncrementalAdoption.md)): Learn how you can introduce Swift concurrency features into your project
  • Migrating to upcoming language features ([Guide/FeatureMigration.md](Guide/FeatureMigration.md)): Migrate your project to upcoming language features.
  • Source Compatibility ([Guide/SourceCompatibility.md](Guide/SourceCompatibility.md)): See an overview of potential source compatibility issues.
  • Library Evolution ([Guide/LibraryEvolution.md](Guide/LibraryEvolution.md)): Annotate library APIs for concurrency while preserving source and ABI
  • Runtime Behavior ([Guide/RuntimeBehavior.md](Guide/RuntimeBehavior.md)): Learn how Swift concurrency runtime semantics differ from other runtimes you may
Code Examples

Swift source files demonstrating migration patterns and concurrency concepts:

  • Boundaries.swift ([Examples/Boundaries.swift](Examples/Boundaries.swift)): Example code demonstrating Boundaries.
  • ConformanceMismatches.swift ([Examples/ConformanceMismatches.swift](Examples/ConformanceMismatches.swift)): Example code demonstrating ConformanceMismatches.
  • DispatchQueue_PendingWork.swift ([Examples/DispatchQueue_PendingWork.swift](Examples/DispatchQueue_PendingWork.swift)): Example code demonstrating DispatchQueue PendingWork.
  • Globals.swift ([Examples/Globals.swift](Examples/Globals.swift)): Example code demonstrating Globals.
  • IncrementalMigration.swift ([Examples/IncrementalMigration.swift](Examples/IncrementalMigration.swift)): Example code demonstrating IncrementalMigration.
  • PreconcurrencyImport.swift ([Examples/PreconcurrencyImport.swift](Examples/PreconcurrencyImport.swift)): Example code demonstrating PreconcurrencyImport.
  • main.swift ([Examples/main.swift](Examples/main.swift)): Example code demonstrating main.
Usage Notes
  • Start with Data Race Safety to understand the core concepts
  • Follow the Migration Strategy for a recommended approach
  • Refer to Common Problems for solutions to typical issues
  • Use the Code Examples as reference implementations
License & Attribution
Content License

The documentation and example code in this skill are from the Swift Concurrency Migration Guide, copyright Apple Inc. and the Swift project authors, distributed under the [Apache 2.0 License](LICENSE.txt).

Skill Structure License

The structure and organization of this skill (this index file) is copyright Kyle Hughes, distributed under the MIT License.

按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。