This teaches protocol-based dependency injection for Swift, the kind you actually need when testing file system operations, network calls, or iCloud sync without hitting real I/O. You define small, focused protocols for each external boundary (file reading, bookmark storage), inject them with default parameters so production code stays clean, and swap in mocks for tests. The pattern works well with actors and Sendable requirements. It's straightforward and avoids the common mistakes like creating giant protocols or mocking everything. If you're writing Swift code that needs deterministic tests for error paths or works across app, test, and preview contexts, this is the standard approach done right.
npx -y skills add affaan-m/everything-claude-code --skill swift-protocol-di-testing --agent claude-codeInstalls into .claude/skills of the current project.
Select a file.
wshobson/agents
dbt-labs/dbt-agent-skills
github/awesome-copilot