Swift Protocol Di Testing
テスト可能なSwiftコードのためのプロトコルベースの依存性注入——焦点を絞ったプロトコルとSwift Testingを使用してファイルシステム、ネットワーク、外部APIをモックする。
Install
/plugin marketplace add affaan-m/ECCThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add affaan-m/ECC --skill swift-protocol-di-testinggit clone --depth 1 https://github.com/affaan-m/ECC.git /tmp/ECC
mkdir -p ~/.claude/skills
cp -r /tmp/ECC/docs/ja-JP/skills/swift-protocol-di-testing ~/.claude/skills/swift-protocol-di-testingPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# プロトコルベースのSwift依存性注入テスト
外部の依存関係(ファイルシステム、ネットワーク、iCloud)を小さく焦点を絞ったプロトコルとして抽象化することで、SwiftコードをテストしやすくするパターンI/Oなしの決定論的テストをサポートする。
## 起動条件
* ファイルシステム、ネットワーク、または外部APIにアクセスするSwiftコードを書く場合
* 実際の障害を起こさずにエラー処理パスをテストする必要がある場合
* 異なる環境(アプリ、テスト、SwiftUIプレビュー)で動作するモジュールを構築する場合
* Swift並行処理(Actor、Sendable)をサポートするテスト可能なアーキテクチャを設計する場合
## コアパターン
### 1. 小さく焦点を絞ったプロトコルを定義する
各プロトコルは1つの外部関心事のみを処理する。
```swift
// File system access
public protocol FileSystemProviding: Sendable {
func containerURL(for purpose: Purpose) -> URL?
}
// File read/write operations
public protocol FileAccessorProviding: Sendable {
func read(from url: URL) throws -> Data
func write(_ data: Data, to url: URL) throws
func fileExists(at url: URL) -> Bool
}
// Bookmark storage (e.g., for sandboxed apps)
public protocol BookmarkStorageProviding: Sendable {
func saveBookmark(_ data: Data, for key: String) throws
func loadBookmark(for key: String) throws -> Data?
}
```
### 2. デフォルト(本番用)実装を作成するDetails
- Skill name
swift-protocol-di-testing- Repository
- affaan-m/ECC
- Path
docs/ja-JP/skills/swift-protocol-di-testing/SKILL.md- License
- MIT
- Repo updated
- 30 October 2026
- Listed in
- hesreallyhim/awesome-claude-code
FAQ
What does the Swift Protocol Di Testing skill do?
テスト可能なSwiftコードのためのプロトコルベースの依存性注入——焦点を絞ったプロトコルとSwift Testingを使用してファイルシステム、ネットワーク、外部APIをモックする。
How do I install the Swift Protocol Di Testing skill?
Claude Code plugin: /plugin marketplace add affaan-m/ECC. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Swift Protocol Di Testing popular?
It lives in affaan-m/ECC, which has 293,665 GitHub stars and 43,456 forks, and is included in 1 curated skill list.
Related skills
Accessibility
294kaffaan-m/ECC
WCAG 2.2 レベル AA 標準を用いてインクルーシブなデジタルプロダクトを設計・実装・監査します。Web 用のセマンティック ARIA および Web・ネイティブプラットフォーム(iOS/Android)のアクセシビリティトレイトを生成するために使用します。
Agent Architecture Audit
294kaffaan-m/ECC
エージェントおよび LLM アプリケーション向けのフルスタック診断。12 層のエージェントスタックにおけるラッパーリグレッション、メモリ汚染、ツール規律の失敗、隠れた修復ループ、レンダリング破損を監査します。重要度順の発見事項とコードファーストの修正を生成します。エージェントアプリケーション、自律ループ、または LLM を活用した機能を構築する開発者に必須です。
Agent Eval
294kaffaan-m/ECC
カスタムタスクでコーディングエージェント(Claude Code、Aider、Codex など)をヘッドツーヘッドで比較し、合格率、コスト、時間、一貫性のメトリクスを測定します
Swiftui Patterns
294kaffaan-m/ECC
@Observableを使用した状態管理、ビュー合成、ナビゲーション、パフォーマンス最適化、モダンなiOS/macOS UIのベストプラクティスを備えたSwiftUIアーキテクチャパターン。
Swift Protocol Di Testing
294kaffaan-m/ECC
Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.
Vercel React Native Skills
33kvercel-labs/agent-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
Browse the most popular Claude skills, all mobile development skills, or write your own with the skills generator.