What problem does it solve? Shared mutable state in Swift apps is prone to data races when accessed concurrently, and manual synchronization with locks or DispatchQueues is error-prone. This Skill provides a reusable actor-based repository pattern that guarantees serialized access at compile time while combining fast in-memory reads with durable file-backed storage. ## Core Features & Use Cases - Generic Actor Repository: A LocalRepository<T: Codable & Identifiable> actor providing save, delete, find, and loadAll operations with O(1) dictionary lookups. - Atomic File Persistence: JSON-encoded writes using .atomic options to prevent data corruption on crashes, with synchronous loading during initialization. - SwiftUI Integration: Patterns for combining the repository with @Observable ViewModels for reactive UI updates. - Use Case: Building an offline-first iOS app that caches user data locally — the actor handles all concurrent access safely while persisting changes to disk automatically. ## Quick Start Ask the AI to create a thread-safe Swift actor repository for persisting Codable models to a local JSON file with an in-memory cache.