技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
swift-optimise【数据与研究】Swift 6.2 and SwiftUI performance optimization for iOS 26 clinic architecture codebases. Covers async/await concurrency patterns, Sendable/actor isolation, view/render performance, and animation performance while preserving modular MVVM-C boundaries across App, Feature, Domain, and Data layers. Use when profiling or optimizing Swift/SwiftUI behavior …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Comprehensive guide for Swift and SwiftUI performance optimization. Contains 19 rules across 3 categories covering modern concurrency, render performance, and animation performance. Targets iOS 26 / Swift 6.2 with @Observable and Swift 6 strict concurrency.
All guidance in this skill assumes the clinic modular MVVM-C architecture:
Domain + DesignSystem only (never Data, never sibling features)DependencyContainer, concrete coordinators, and Route Shell wiringDomain stays pure Swift and defines models plus repository, *Coordinating, ErrorRouting, and AppError contractsData owns SwiftData/network/sync/retry/background I/O and implements Domain protocolsReference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Concurrency & Async | CRITICAL | conc- |
| 2 | Render & Scroll Performance | HIGH | perf- |
| 3 | Animation Performance | MEDIUM | anim- |
conc-combine-to-async - Replace Combine publishers with async/awaitconc-mainactor-isolation - Use @MainActor instead of DispatchQueue.mainconc-swift6-sendable - Adopt Sendable and Swift 6 strict concurrencyconc-task-id-pattern - Use .task(id:) for reactive data loadingconc-actor-for-shared-state - Replace lock-based shared state with actorsconc-asyncsequence-streams - Replace NotificationCenter observers with AsyncSequenceperf-view-decomposition - Decompose views to limit state invalidation blast radiusperf-instruments-profiling - Profile with SwiftUI Instruments before optimizingperf-lazy-containers - Use lazy containers for large collectionsperf-canvas-timeline - Use Canvas and TimelineView for high-performance renderingperf-drawinggroup - Use drawingGroup for complex graphicsperf-equatable-views - Add Equatable conformance to prevent spurious redrawsperf-task-modifier - Use .task modifier instead of .onAppear for async workperf-async-image - Use AsyncImage with caching strategy for remote imagesanim-spring - Use spring animations as defaultanim-matchedgeometry - Use matchedGeometryEffect for shared transitionsanim-gesture-driven - Make animations gesture-drivenanim-with-animation - Use withAnimation for state-driven transitionsanim-transition-effects - Apply transition effects for view insertion and removalRead individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |