swift-actor-persistence — community swift-actor-persistence, claude-code-learned-skills, community, ide skills, Claude Code, Cursor, Windsurf

v1.0

このスキルについて

iOS/Swiftエージェントがスレッドセーフなデータ永続化とasync/await機能を必要とする場合に最適です。 Use when building a thread-safe data persistence layer in Swift using actors with in-memory cache and file storage.

shimo4228 shimo4228
[0]
[0]
Updated: 3/12/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 9/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review
Review Score
9/11
Quality Score
53
Canonical Locale
ja
Detected Body Locale
ja

iOS/Swiftエージェントがスレッドセーフなデータ永続化とasync/await機能を必要とする場合に最適です。 Use when building a thread-safe data persistence layer in Swift using actors with in-memory cache and file storage.

このスキルを使用する理由

Swift Actorsを使用して、エージェントが信頼性の高いデータストレージを実装し、レースコンディションを回避し、iOS/Swiftアプリとのシームレスなasync/await統合を確実にし、DispatchQueuesとロックの代替品を利用します。

おすすめ

iOS/Swiftエージェントがスレッドセーフなデータ永続化とasync/await機能を必要とする場合に最適です。

実現可能なユースケース for swift-actor-persistence

iOSアプリケーションでスレッドセーフなデータ永続化を実装する
並行データアクセスのシナリオでレースコンディションを回避する
Swiftでasync/awaitを使用して信頼性の高いデータストレージを確実にする

! セキュリティと制限

  • iOS/Swift開発環境が必要
  • Swift Actorsのサポートが必要
  • async/awaitの互換性が必要

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is swift-actor-persistence?

iOS/Swiftエージェントがスレッドセーフなデータ永続化とasync/await機能を必要とする場合に最適です。 Use when building a thread-safe data persistence layer in Swift using actors with in-memory cache and file storage.

How do I install swift-actor-persistence?

Run the command: npx killer-skills add shimo4228/claude-code-learned-skills/swift-actor-persistence. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for swift-actor-persistence?

Key use cases include: iOSアプリケーションでスレッドセーフなデータ永続化を実装する, 並行データアクセスのシナリオでレースコンディションを回避する, Swiftでasync/awaitを使用して信頼性の高いデータストレージを確実にする.

Which IDEs are compatible with swift-actor-persistence?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for swift-actor-persistence?

iOS/Swift開発環境が必要. Swift Actorsのサポートが必要. async/awaitの互換性が必要.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add shimo4228/claude-code-learned-skills/swift-actor-persistence. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use swift-actor-persistence immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

swift-actor-persistence

Install swift-actor-persistence, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Swift Actors for Thread-Safe Persistence

スレッドセーフな永続化のためのSwift Actor

Extracted / 抽出日: 2026-02-05 Context / コンテキスト: iOS/Swift apps requiring thread-safe data persistence with async/await async/awaitを使用したスレッドセーフなデータ永続化が必要なiOS/Swiftアプリ


Problem / 課題

Data persistence layers often face race conditions when multiple parts of an app read/write simultaneously. Traditional approaches (DispatchQueues, locks) are error-prone and verbose.

データ永続化レイヤーは、アプリの複数の部分が同時に読み書きする際にレースコンディションに直面することが多い。従来のアプローチ(DispatchQueues、ロック)はエラーが発生しやすく、冗長になりがち。


Solution / 解決策

Use Swift actors to isolate all persistence state and operations. The actor model guarantees:

  • No data races (compiler-enforced)
  • Automatic serialization of access
  • Async-first API that integrates with structured concurrency

Swift actorを使用して、すべての永続化状態と操作を分離する。actorモデルは以下を保証:

  • データ競合なし(コンパイラによる強制)
  • アクセスの自動シリアライズ
  • 構造化並行性と統合されたasyncファーストAPI
swift
1public actor LocalRepository { 2 private var cache: [String: Record] = [:] 3 private let cacheFileURL: URL 4 5 public init(directory: URL = .documentsDirectory) { 6 self.cacheFileURL = directory.appendingPathComponent("cache.json") 7 // Synchronous cache load during init (actor isolation not yet active) 8 // init中の同期キャッシュ読み込み(actor分離がまだアクティブでないため) 9 self.cache = Self.loadCacheSynchronously(from: cacheFileURL) 10 } 11 12 public func save(_ record: Record) throws { 13 cache[record.id] = record 14 try persistToFile() 15 } 16 17 public func loadAll() -> [Record] { 18 Array(cache.values) 19 } 20 21 public func find(by id: String) -> Record? { 22 cache[id] 23 } 24 25 private func persistToFile() throws { 26 let data = try JSONEncoder().encode(Array(cache.values)) 27 try data.write(to: cacheFileURL) 28 } 29 30 private static func loadCacheSynchronously(from url: URL) -> [String: Record] { 31 guard let data = try? Data(contentsOf: url), 32 let records = try? JSONDecoder().decode([Record].self, from: data) else { 33 return [:] 34 } 35 return Dictionary(uniqueKeysWithValues: records.map { ($0.id, $0) }) 36 } 37}

Key Patterns / 主要パターン

  1. In-memory cache + file persistence / インメモリキャッシュ + ファイル永続化: Fast reads from cache, durable writes to disk / キャッシュからの高速読み取り、ディスクへの永続書き込み
  2. Synchronous init loading / 同期的な初期化読み込み: Avoids async initialization complexity / 非同期初期化の複雑さを回避
  3. Dictionary keying / Dictionary型によるキー管理: O(1) lookups by ID / IDによるO(1)の検索
  4. Private persistence / プライベートな永続化: External callers only see domain operations / 外部呼び出し元はドメイン操作のみを参照

Usage / 使用方法

swift
1let repository = LocalRepository() 2 3// All calls are async due to actor isolation 4// actor分離により、すべての呼び出しは非同期 5let records = await repository.loadAll() 6try await repository.save(newRecord) 7let found = await repository.find(by: "question-1")

When to Use / 使用すべき場面

  • Building a data persistence layer in Swift 5.5+ / Swift 5.5以降でデータ永続化レイヤーを構築する場合
  • Need thread-safe access to shared state / 共有状態へのスレッドセーフなアクセスが必要な場合
  • Want to avoid manual synchronization (locks, queues) / 手動同期(ロック、キュー)を避けたい場合
  • Building offline-first apps with local storage / ローカルストレージを使用したオフラインファーストアプリを構築する場合

  • Combine with @Observable ViewModels for UI binding / UIバインディング用に@Observable ViewModelと組み合わせる
  • Use Sendable types for data crossing actor boundaries / actor境界を越えるデータにはSendable型を使用
  • Consider FileBasedSyncManager actor for cloud sync operations / クラウド同期操作にはFileBasedSyncManager actorを検討

関連スキル

Looking for an alternative to swift-actor-persistence or another community skill for your workflow? Explore these related open-source skills.

すべて表示

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

カスタマイズ可能なウィジェットプラグインをprompts.chatのフィードシステム用に生成する

149.6k
0
AI

flags

Logo of vercel
vercel

React フレームワーク

138.4k
0
ブラウザ

pr-review

Logo of pytorch
pytorch

Pythonにおけるテンソルと動的ニューラルネットワーク(強力なGPUアクセラレーション)

98.6k
0
開発者