بنقرة واحدة
swift
Clean Architecture, concurrency, and patterns for pure Swift modules.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Clean Architecture, concurrency, and patterns for pure Swift modules.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Git Worktree: parallel working trees for isolated branch-level execution, debugging, and safe experimentation.
Durable project-memory rules for `.agent-memory/` plus session-memory boundaries.
Review routing, independent post-implementation review gates, multi-model escalation, and targeted optimization follow-up.
Planning-track selection, epic/feature decomposition, readiness gates, and plan-delta rules.
Architecture, Jetpack Compose, Navigation3 KMP, and Koin DI rules for Android apps.
Practical rules for designing, evolving, and integrating APIs safely.
| name | swift |
| description | Clean Architecture, concurrency, and patterns for pure Swift modules. |
| user-invocable | false |
Use this skill for pure Swift modules where clean boundaries, concurrency, and testability matter.
When writing Swift business logic (Domain/Core modules):
UseCases (Interactors):
func execute() async -> Result<T, Error>.callAsFunction for this to maintain explicit naming.Result<T, Error>.Helper or Manager MUST be injected into the UseCase, not the Repository.Repositories and DataSources:
User, [Item]) via async throws, NOT Result<T, Error>. The UseCase catches compilation errors and maps them to Result.protocol for Repositories to allow easy mocking in unit tests.Dependency Graph:
UI/ViewModel -> UseCase -> Repository -> DataSourceasync/await, Task, TaskGroup) over GCD (DispatchQueue) or Combine publishers for one-shot operations.actor for shared mutable state to avoid data races.struct for models. Use class ONLY when reference semantics or Identity are strictly required.Codable.Error types directly to the View. The Result<T, Error> from a UseCase must be mapped by the ViewModel/Reducer into specific, UI-friendly State enumerations or One-Time Events.@Sendable closures and explicitly mark isolated boundaries.[weak self] in escaping closures. However, with async/await, prefer async functions over escaping closures to eliminate this risk entirely.