swift-optimise

📁 pproenca/dot-skills 📅 5 days ago
28
总安装量
5
周安装量
#13296
全站排名
安装命令
npx skills add https://github.com/pproenca/dot-skills --skill swift-optimise

Agent 安装分布

claude-code 5
amp 4
gemini-cli 4
github-copilot 4
codex 4
kimi-cli 4

Skill 文档

Apple Swift/SwiftUI Performance Optimization Best Practices

Comprehensive guide for Swift and SwiftUI performance optimization. Contains 19 rules across 3 categories covering modern concurrency, render performance, and animation performance. Targets iOS 17+ with @Observable and Swift 6 strict concurrency.

When to Apply

Reference these guidelines when:

  • Migrating to Swift 6 strict concurrency (Sendable, actor isolation)
  • Replacing Combine publishers with async/await
  • Implementing @MainActor isolation and actor-based concurrency
  • Decomposing views to reduce state invalidation blast radius
  • Optimizing scroll and render performance with lazy containers
  • Using Canvas/TimelineView for high-performance rendering
  • Profiling with SwiftUI Instruments before optimizing
  • Building performant spring animations and transitions

Rule Categories by Priority

Priority Category Impact Prefix
1 Concurrency & Async CRITICAL conc-
2 Render & Scroll Performance HIGH perf-
3 Animation Performance MEDIUM anim-

Quick Reference

1. Concurrency & Async (CRITICAL)

2. Render & Scroll Performance (HIGH)

3. Animation Performance (MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

File Description
references/_sections.md Category definitions and ordering
assets/templates/_template.md Template for new rules