Live survey304 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Swift Concurrency 6 2

skill · affaan-m/ECCMIT licenceAudited 22 Sep 2026 · source fb3fb10d9622

★ 264,831pushed today
✓SAFEGrade B · 89/100 · 22 Sep 2026 · fb3fb10
264,831repo stars · whole affaan-m/ECC

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit fb3fb10d9622 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Swift 6.2のアクセシブルな並行処理——デフォルトはシングルスレッド、@concurrentは明示的なバックグラウンドオフロードに使用し、分離の一貫性はMainActor型に使用する。

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Swift Concurrency 6 2 (affaan-m/ECC)”. Retrieved 22 Sep 2026. https://modelsatlas.com/skills/affaan-m/swift-concurrency-6-2

2 skills are called “Swift Concurrency 6 2”. You are viewing affaan-m/ECC.

Trust audit

Audit 0.4.1 · source read 22 Sep 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha fb3fb10d9622 · 22 Sep 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

  • Publisheraffaan-m GitHub userOwner of the repository this skill is read from
  • Source folderaffaan-m/ECC/docs/ja-JP/skills/swift-concurrency-6-2The exact folder we audited
  • LicenceMITAs the repository states it
  • Commit pinned for this verdictfb3fb10d9622A new audit runs when the source changes
  • Repository statusNot archivedPushed today
  • Sandboxed runNot runSkills are read, not executed; layer L4 is skipped

What it tells the agent

Full source on GitHub ↗

Its description: Swift 6.2のアクセシブルな並行処理——デフォルトはシングルスレッド、@concurrentは明示的なバックグラウンドオフロードに使用し、分離の一貫性はMainActor型に使用する。

---
name: swift-concurrency-6-2
description: Swift 6.2のアクセシブルな並行処理——デフォルトはシングルスレッド、@concurrentは明示的なバックグラウンドオフロードに使用し、分離の一貫性はMainActor型に使用する。
---

# Swift 6.2 アクセシブルな並行処理

コードがデフォルトでシングルスレッドで実行され、並行処理が明示的に導入されるSwift 6.2の並行処理モデルを採用したパターン。パフォーマンスを犠牲にすることなく、よくあるデータ競合エラーを排除する。

## 起動条件

* Swift 5.x または 6.0/6.1 プロジェクトを Swift 6.2 に移行する場合
* データ競合安全性のコンパイラエラーを解決する場合
* MainActorベースのアプリアーキテクチャを設計する場合
* CPU集約的な処理をバックグラウンドスレッドにオフロードする場合
* MainActor分離された型にプロトコル一貫性を実装する場合
* Xcode 26で「アクセシブルな並行処理」ビルド設定を有効にする場合

## 核心的な問題:暗黙のバックグラウンドオフロード

Swift 6.1以前では、非同期関数が暗黙的にバックグラウンドスレッドにオフロードされ、一見安全に見えるコードでもデータ競合エラーを引き起こすことがあった:

```swift
// Swift 6.1: ERROR
@MainActor
final class StickerModel {
    let photoProcessor = PhotoProcessor()

    func extractSticker(_ item: PhotosPickerItem) async throws -> Sticker? {
        guard let data = try await item.loadTransferable(type: Data.self) else { return nil }

        // Error: Sending 'self.photoProcessor' risks causing data races
        return await photoProcessor.extractSticker(data: data, with: item.itemIdentifier)
    }
}
```

Swift 6.2ではこの問題が修正された:非同期関数はデフォルトで呼び出し元と同じActorに留まる。

```swift
// Swift 6.2: OK — async stays on MainActor, no data race
@MainActor
final class StickerModel {
    let photoProcessor = PhotoProcessor()

    func extractSticker(_ item: PhotosPickerItem) async throws -> Sticker? {
        guard let data = try await item.loadTransferable(type: Data.self) else { return nil }
        return await photoProcessor.extractSticker(data: data, with: item.itemIdentifier)
    }
}
```

## コアパターン——分離の一貫性

MainActor型が非分離プロトコルに安全に準拠できるようになった:

```swift
protocol Exportable {
    func export()
}

// Swift 6.1: ERROR — crosses into main actor-isolated code
// Swift 6.2: OK with isolated conformance
extension StickerModel: @MainActor Exportable {
    func export() {
        photoProcessor.exportAsPNG()
    }
}
```

コンパイラはこの一貫性がMainActor上でのみ使用されることを保証する:

```swift
// OK — ImageExporter is also @MainActor
@MainActor
struct ImageExporter {
    var items: [any Exportable]

    mutating func add(_ item: StickerModel) {
        items.append(item)  // Safe: same actor isolation
    }
}

// ERROR — nonisolated context can't use MainActor conformance
nonisolated struct ImageExporter {
    var items: [any Exportable]

    mutating func add(_ item: StickerModel) {
        items.append(item)  // Error: Main actor-isolated conformance cannot be used here
    }
}
```

## コアパターン——グローバル変数と静的変数

MainActorを使用してグローバル/静的状態を保護する:

```swift
// Swift 6.1: ERROR — non-Sendable type may have shared mutable state
final class StickerLibrary {
    static let shared: StickerLibrary = .init()  // Error
}

// Fix: Annotate with @MainActor
@MainActor
final class StickerLibrary {
    static let shared: StickerLibrary = .init()  // OK
}
```

### MainActorデフォルト推論パターン

Swift 6.2ではMainActorをデフォルトで推論するパターンが導入された——手動の注釈なし:

```swift
// With MainActor default inference enabled:
final class StickerLibrary {
    static let shared: StickerLibrary = .init()  // Implicitly @MainActor
}

final class StickerModel {
    let photoProcessor: PhotoProcessor
    var selection: [PhotosPickerItem]  // Implicitly @MainActor
}

extension StickerModel: Exportable {  // Implicitly @MainActor conformance
    func export() {
        photoProcessor.exportAsPNG()
    }
}
```

このパターンはオプトインで、アプリ、スクリプト、その他の実行可能ターゲットに推奨される。

## コアパターン——@concurrent を使ったバックグラウンド処理

真の並列処理が必要な場合、`@concurrent` を使って明示的にオフロードする:

> **重要:** この例は「アクセシブルな並行処理」ビルド設定——SE-0466 (MainActorデフォルト分離) と SE-0461 (デフォルト非分離非送信) の有効化が必要。これらの設定を有効にすると、`extractSticker` は呼び出し元のActorに留まり、可変状態へのアクセスが安全になる。**これらの設定なしでは、このコードにはデータ競合がある**——コンパイラがフラグを立てる。

```swift
nonisolated final class PhotoProcessor {
    private var cachedStickers: [String: Sticker] = [:]

    func extractSticker(data: Data, with id: String) async -> Sticker {
        if let sticker = cachedStickers[id] {
            return sticker
        }

        let sticker = await Self.extractSubject(from: data)
        cachedStickers[id] = sticker
        return sticker
    }

    // Offload expensive work to concurrent thread pool
    @concurrent
    static func extractSubject(from data: Data) async -> Sticker { /* ... */ }
}

// Callers must await
let processor = PhotoProcessor()
processedPhotos[item.id] = await processor.extractSticker(data: data, with: item.id)
```

`@concurrent` を使用するには:

1. コンテナとなる型に `nonisolated` をマークする
2. 関数に `@concurrent` を追加する
3. 関数がまだ非同期でない場合は `async` を追加する
4. 呼び出し側に `await` を追加する

## 重要な設計上の決定

| 決定 | 理由 |
|----------|-----------|
| デフォルトシングルスレッド | 最も自然なコードはデータ競合がない。並行処理はオプトイン |
| 非同期関数は呼び出し元のActorに留まる | データ競合エラーを引き起こす暗黙のオフロードを排除 |
| 分離の一貫性 | MainActor型が安全でない回避策なしにプロトコルに準拠できる |
| `@concurrent` による明示的なオプトイン | バックグラウンド実行は偶発的なものではなく意図的なパフォーマンス選択 |
| MainActorデフォルト推論 | アプリターゲットの定型的な `@MainActor` 注釈を削減 |
| オプトイン採用 | 非破壊的な移行パス——機能を段階的に有効化 |

## 移行手順

1. **Xcodeで有効化**:ビルド設定のSwift Compiler > Concurrencyセクション
2. **SPMで有効化**:パッケージマニフェストで `SwiftSettings` APIを使用
3. **移行ツールを使用**:swift.org/migrationを通じて自動コード変更
4. **MainActorデフォルトから始める**:アプリターゲットの推論モードを有効化
5. **必要な場所に `@concurrent` を追加**:まずプロファイリングし、ホットパスをオフロード
6. **徹底的にテスト**:データ競合の問題はコンパイル時エラーになる

## ベストプラクティス

* **MainActorから始める** —— まずシングルスレッドコードを書き、後で最適化する
* **CPU集約的な処理のみに `@concurrent` を使用する** —— 画像処理、圧縮、複雑な計算
* **主にシングルスレッドのアプリターゲットのMainActor推論モードを有効にする**
* **オフロード前にプロファイリングする** —— Instrumentsで実際のボトルネックを見つける
* **グローバル変数を保護するために MainActor を使用する** —— グローバル/静的な可変状態にはActor分離が必要
* **`nonisolated` 回避策や `@Sendable` ラッパーではなく分離の一貫性を使用する**
* **段階的に移行する** —— ビルド設定で一度に1つの機能を有効化する

## 避けるべきアンチパターン

* すべての非同期関数に `@concurrent` を適用する(ほとんどはバックグラウンド実行を必要としない)
* 分離を理解せずにコンパイラエラーを抑制するために `nonisolated` を使用する
* Actorが同じ安全性を提供できる場面でレガシーの `DispatchQueue` パターンを保持する
* 並行処理関連のFoundation Modelsコードで `model.availability` チェックをスキップする
* コンパイラと戦う——データ競合をレポートしている場合、コードには本当の並行処理の問題がある
* すべての非同期コードがバックグラウンドで実行されると仮定する(Swift 6.2のデフォルト:呼び出し元のActorに留まる)

## 使用場面

* すべての新しいSwift 6.2+プロジェクト(「アクセシブルな並行処理」は推奨されるデフォルト設定)
* Swift 5.x または 6.0/6.1 の並行処理から既存のアプリを移行する場合
* Xcode 26の採用中にデータ競合

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit fb3fb10

Download folder ↗
git clone https://github.com/affaan-m/ECC
git -C ECC checkout fb3fb10d9622

The author documents no install command, so this uses the repository directly. Our verdict covers commit fb3fb10d9622 only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source fb3fb10d9622

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/affaan-m/swift-concurrency-6-2/badge.svg)](https://modelsatlas.com/skills/affaan-m/swift-concurrency-6-2/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

eval-harness✓SAFE

affaan-m/everything-claude-code

Eval-driven development (EDD) framework for AI coding sessions — define capability and regression evals before coding, grade with code-based, model-based, rule, or human graders, and track pass@k and pass^k reliability.…

★ 303kGrade B
ecc-recipes✓SAFE

affaan-m/everything-claude-code

Map a described workflow to the right ECC command group with run-order and stop condition, or browse all command-group recipe families read live from the commands directory. Advisory only — never executes. Use when…

★ 302kGrade B
dynamic-workflow-mode✓SAFE

affaan-m/everything-claude-code

Design task-local harnesses, eval gates, and reusable skill extraction for Claude dynamic workflow mode and other adaptive agent harnesses. Use when building a task-local harness, adding eval gates, or extracting a…

★ 302kGrade B
django-verification!CAUTION

affaan-m/everything-claude-code

Run the full Django verification loop — environment check, mypy/ruff/black linting, migration safety, pytest with coverage targets, pip-audit and bandit security scans, settings and logging review, and diff review —…

★ 294kGrade B
django-patterns✓SAFE

affaan-m/everything-claude-code

Django architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps. Use when building or reviewing Django apps, DRF APIs, ORM queries, or caching.

★ 294kGrade B
django-security✓SAFE

affaan-m/everything-claude-code

Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations. Use when reviewing Django authentication, authorization,…

★ 294kGrade B

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/affaan-m/swift-concurrency-6-2/badge.svg)](https://modelsatlas.com/skills/affaan-m/swift-concurrency-6-2/)

Questions about Swift Concurrency 6 2

What does the Swift Concurrency 6 2 skill do?
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Is Swift Concurrency 6 2 safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Swift Concurrency 6 2 access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (fb3fb10d9622), read on 2026-09-22. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.