agentsclimarketplace

Swift optimise

Skill ComeOnOliver/skillshub/skills/pproenca/dot-skills/swift-optimise

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.From the repository description

Install
npx -y skills add ComeOnOliver/skillshub --skill swift-optimise

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

4.6 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it

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 26 / Swift 6.2 with @Observable and Swift 6 strict concurrency.

Clinic Architecture Contract (iOS 26 / Swift 6.2)

All guidance in this skill assumes the clinic modular MVVM-C architecture:

  • Feature modules import Domain + DesignSystem only (never Data, never sibling features)
  • App target is the convergence point and owns DependencyContainer, concrete coordinators, and Route Shell wiring
  • Domain stays pure Swift and defines models plus repository, *Coordinating, ErrorRouting, and AppError contracts
  • Data owns SwiftData/network/sync/retry/background I/O and implements Domain protocols
  • Read/write flow defaults to stale-while-revalidate reads and optimistic queued writes
  • ViewModels call repository protocols directly (no default use-case/interactor layer)

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

PriorityCategoryImpactPrefix
1Concurrency & AsyncCRITICALconc-
2Render & Scroll PerformanceHIGHperf-
3Animation PerformanceMEDIUManim-

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

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.