重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
swift-optimise by pproenca/dot-skills
npx skills add https://github.com/pproenca/dot-skills --skill swift-optimise适用于 Swift 和 SwiftUI 性能优化的综合指南。包含 3 个类别共 19 条规则,涵盖现代并发、渲染性能和动画性能。目标平台为 iOS 26 / Swift 6.2,采用 @Observable 和 Swift 6 严格并发。
本技能中的所有指南均假设采用诊所模块化 MVVM-C 架构:
Domain + DesignSystem(绝不导入 Data,也绝不导入同级功能模块)DependencyContainer、具体协调器和路由外壳连接Domain 保持纯 Swift 并定义模型以及仓库、*Coordinating、ErrorRouting 和 AppError 约定广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Data在以下情况下参考这些指南:
| 优先级 | 类别 | 影响 | 前缀 |
|---|---|---|---|
| 1 | 并发与异步 | 关键 | conc- |
| 2 | 渲染与滚动性能 | 高 | perf- |
| 3 | 动画性能 | 中 | anim- |
conc-combine-to-async - 用 async/await 替换 Combine 发布者conc-mainactor-isolation - 使用 @MainActor 替代 DispatchQueue.mainconc-swift6-sendable - 采用 Sendable 和 Swift 6 严格并发conc-task-id-pattern - 使用 .task(id:) 进行响应式数据加载conc-actor-for-shared-state - 用 actor 替换基于锁的共享状态conc-asyncsequence-streams - 用 AsyncSequence 替换 NotificationCenter 观察者perf-view-decomposition - 分解视图以限制状态失效的影响范围perf-instruments-profiling - 在优化前使用 SwiftUI Instruments 进行分析perf-lazy-containers - 对大型集合使用惰性容器perf-canvas-timeline - 使用 Canvas 和 TimelineView 进行高性能渲染perf-drawinggroup - 对复杂图形使用 drawingGroupperf-equatable-views - 添加 Equatable 一致性以防止不必要的重绘perf-task-modifier - 使用 .task 修饰符替代 .onAppear 进行异步工作perf-async-image - 对远程图像使用带缓存策略的 AsyncImageanim-spring - 默认使用弹簧动画anim-matchedgeometry - 使用 matchedGeometryEffect 实现共享过渡anim-gesture-driven - 使动画由手势驱动anim-with-animation - 使用 withAnimation 实现状态驱动的过渡anim-transition-effects - 对视图插入和移除应用过渡效果阅读各个参考文件以获取详细解释和代码示例:
| 文件 | 描述 |
|---|---|
| references/_sections.md | 类别定义和排序 |
| assets/templates/_template.md | 新规则模板 |
每周安装次数
53
代码仓库
GitHub 星标数
90
首次出现
2026年2月8日
安全审计
安装于
codex48
github-copilot47
gemini-cli47
kimi-cli46
opencode46
claude-code45
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 actorsperf-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 graphicsanim-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 |
Weekly Installs
53
Repository
GitHub Stars
90
First Seen
Feb 8, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex48
github-copilot47
gemini-cli47
kimi-cli46
opencode46
claude-code45
TanStack Query v5 完全指南:React 数据管理、乐观更新、离线支持
2,500 周安装
Codex Brainstorm-With-File:AI并行头脑风暴工作流,记录思维演进,提升创意与决策效率
62 周安装
Dojo Token:在Cairo中实现ERC20/ERC721代币,与Dojo世界集成部署
62 周安装
commit-smart:智能Git提交工具,自动生成规范提交消息,提升代码管理效率
62 周安装
Python PDF处理指南:合并拆分、文本表格提取、PDF创建全攻略
62 周安装
海报设计师技能:AI驱动的智能海报生成工具,支持布局优先与图像优先策略
45 周安装
OpenAI代码变更验证技能 - 自动化构建、测试、代码检查全流程保障
63 周安装
conc-asyncsequence-streamsperf-equatable-viewsperf-task-modifier - Use .task modifier instead of .onAppear for async workperf-async-image - Use AsyncImage with caching strategy for remote images