swift-development
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSwift Development
Swift开发
Swift language-level guidance that applies across all Apple platforms.
适用于所有Apple平台的Swift语言层面指导。
When This Skill Activates
技能触发场景
Use this skill when the user:
- Asks about Swift concurrency (async/await, actors, Sendable, TaskGroup)
- Needs help with Swift 6 strict concurrency migration
- Has data race or actor isolation errors
- Asks about InlineArray, Span, or low-level memory performance
- Wants to eliminate heap allocations or replace unsafe pointers
- Asks about modern Swift patterns independent of any specific platform
当用户出现以下需求时,启用本技能:
- 询问Swift并发相关内容(async/await、actors、Sendable、TaskGroup)
- 需要Swift 6严格并发迁移的帮助
- 遇到数据竞争或actor隔离错误
- 询问InlineArray、Span或底层内存性能相关问题
- 希望消除堆分配或替换不安全指针
- 询问独立于特定平台的现代Swift编程模式
Available Modules
可用模块
concurrency-patterns/
concurrency-patterns/
Swift concurrency architecture and patterns.
- Swift 6.2 approachable concurrency features
- Structured concurrency (async let, TaskGroup, .task modifier)
- Actors, isolation, reentrancy, @MainActor
- Continuations for bridging legacy APIs
- Swift 6 strict concurrency migration guide
Swift并发架构与模式。
- Swift 6.2易上手的并发特性
- 结构化并发(async let、TaskGroup、.task修饰器)
- Actors、隔离机制、可重入性、@MainActor
- 用于桥接遗留API的Continuations
- Swift 6严格并发迁移指南
memory/
memory/
Swift 6.2 InlineArray and Span for low-level memory performance.
- InlineArray: fixed-size, stack-allocated collections with zero heap overhead
- Span family: safe, non-escapable access to contiguous memory
- Lifetime dependencies and non-escapable type constraints
- Performance guidance: when to use InlineArray/Span vs Array/UnsafePointer
用于底层内存性能优化的Swift 6.2 InlineArray与Span。
- InlineArray:固定大小、栈分配的集合,无堆内存开销
- Span系列:对连续内存的安全、非逃逸访问
- 生命周期依赖与非逃逸类型约束
- 性能指导:何时使用InlineArray/Span而非Array/UnsafePointer
How to Use
使用方法
- Identify user's need from their question
- Read relevant module files from subdirectories
- Apply the guidance to their specific context
- Cross-reference with platform-specific skills (ios/, macos/) as needed
- 从用户问题中识别其需求
- 读取子目录中的相关模块文件
- 将指导内容应用到用户的具体场景中
- 必要时结合特定平台技能(ios/、macos/)进行交叉参考