migrating-to-swift-concurrency — скилл для Claude Code
Даёт агенту руководство Apple по миграции на Swift Concurrency. Пригодится при переходе на Swift 6, устранении гонок данных и настройке изоляции акторов.
npx skills add kylehughes/the-unofficial-swift-concurrency-migration-skill --skill migrating-to-swift-concurrency -a claude-codeЧто делает migrating-to-swift-concurrency
Скилл передаёт агенту документацию Apple по модели многопоточности. Внутри собраны разделы о проверке data-race safety, правилах совместимости исходного кода, поведении runtime и типовых ошибках компилятора при работе с Sendable.
В комплект входят примеры кода на Swift: изоляция границ в Boundaries.swift, глобальные переменные в Globals.swift, миграция очереди DispatchQueue и применение @preconcurrency.
Материалы ориентированы на строгий режим Swift 6. Без предварительного включения флагов проверки в проектах на Swift 5 часть предупреждений компилятора просто не появится.
Какие задачи решает
- исправить ошибки изоляции акторов и протокола Sendable
- перевести проект на режим языка Swift 6
- включить проверку data-race safety в Swift 5
- поэтапно внедрить async/await в кодовую базу
Примеры запросов агенту
- Исправь ошибку компилятора о передаче не-Sendable типа через границу изоляции
- Покажи, как перевести этот синглтон на Swift Concurrency без глобального состояния
- Как настроить постепенное включение data-race safety в проекте на Swift 5?
Как установить migrating-to-swift-concurrency
1Через Skills CLI (Vercel)
npx skills add kylehughes/the-unofficial-swift-concurrency-migration-skill --skill migrating-to-swift-concurrency -a claude-code2Вручную: положить файлы
~/.claude/skills/migrating-to-swift-concurrency/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/migrating-to-swift-concurrency/
1Через Skills CLI (Vercel)
npx skills add kylehughes/the-unofficial-swift-concurrency-migration-skill --skill migrating-to-swift-concurrency -a codex2Вручную: положить файлы
.agents/skills/migrating-to-swift-concurrency/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add kylehughes/the-unofficial-swift-concurrency-migration-skill --skill migrating-to-swift-concurrency -a cursor2Вручную: положить файлы
.cursor/skills/migrating-to-swift-concurrency/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install kylehughes/the-unofficial-swift-concurrency-migration-skill migrating-to-swift-concurrency2Вручную: положить файлы
.github/skills/migrating-to-swift-concurrency/SKILL.md1Через Skills CLI (Vercel)
npx skills add kylehughes/the-unofficial-swift-concurrency-migration-skill --skill migrating-to-swift-concurrency -a gemini-cli2Командой платформы
gemini skills install https://github.com/kylehughes/the-unofficial-swift-concurrency-migration-skill --path migrating-to-swift-concurrencyВручную: положить файлы
.devin/skills/migrating-to-swift-concurrency/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add kylehughes/the-unofficial-swift-concurrency-migration-skill --skill migrating-to-swift-concurrency -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о migrating-to-swift-concurrency
Как установить migrating-to-swift-concurrency в Claude Code?
Выполните команду npx skills add kylehughes/the-unofficial-swift-concurrency-migration-skill --skill migrating-to-swift-concurrency -a claude-code.
Что даёт этот скилл?
Он предоставляет агенту текст официального руководства Apple и практические примеры на Swift для устранения ошибок многопоточности.
Для каких версий Swift подходят эти инструкции?
Руководство ориентировано на переход к Swift 6 и активацию проверок безопасности данных в проектах на Swift 5.
Исходный текст
SKILL.md · Apache-2.0
--- name: migrating-to-swift-concurrency description: 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 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](https://github.com/swiftlang/swift-migration-guide.git), 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.
© kylehughes · Apache-2.0 · kylehughes/the-unofficial-swift-concurrency-migration-skill