This gives you a generic actor-based repository pattern for thread-safe local persistence in Swift. It wraps an in-memory dictionary cache with file-backed JSON storage, so reads are fast and writes are durable. The actor isolation means no manual locks or dispatch queues, and the compiler enforces thread safety at build time. You get synchronous loading during init to avoid async initialization hell, atomic file writes to prevent corruption on crashes, and it works with any Codable type that has a string ID. Solid choice for offline-first iOS apps or anywhere you need shared mutable state without the usual concurrency footguns. The ViewModel integration example shows how it composes cleanly with SwiftUI's Observable macro.
npx -y skills add affaan-m/ecc --skill swift-actor-persistence --agent claude-codeInstalls into .claude/skills of the current project.
Select a file.
sickn33/antigravity-awesome-skills
wshobson/agents