home / skills / shotaiuchi / dotclaude / context-ios
This skill helps you implement iOS features and follow MVVM patterns using SwiftUI, async/await, and Combine with clean architecture guidelines.
npx playbooks add skill shotaiuchi/dotclaude --skill context-iosReview the files below or copy the command above to add this skill to your agents.
---
name: context-ios
description: >-
iOS development context. Apply when working with .swift files,
Xcode project, SwiftUI views, async/await, Combine, MVVM patterns.
user-invocable: false
---
# iOS Context Rule
Auto-applied context when working on iOS development tasks.
## When to Apply
Apply this context when:
- Implementing iOS features (ViewModel, Repository)
- Creating SwiftUI views
- Using async/await or Combine
- Applying MVVM patterns
## Reference Documents
Read and apply patterns from:
| Document | Purpose |
|----------|---------|
| [Clean Architecture](../../references/common/clean-architecture.md) | Layer separation principles |
| [Testing Strategy](../../references/common/testing-strategy.md) | Test patterns and coverage |
| [iOS Conventions](../../references/platforms/ios/conventions.md) | Naming, structure, idioms |
| [Architecture Patterns](../../references/platforms/ios/architecture-patterns.md) | MVVM/State management |
## External References
| Resource | URL |
|----------|-----|
| Swift Concurrency | https://docs.swift.org/swift-book/documentation/the-swift-programming-language/concurrency/ |
| SwiftUI | https://developer.apple.com/documentation/swiftui/ |
| Combine | https://developer.apple.com/documentation/combine/ |
This skill provides iOS development context for working with .swift files, Xcode projects, SwiftUI views, async/await, Combine, and MVVM patterns. Use it to align code, architecture, and tests with common iOS conventions and clean-architecture principles. It helps maintain consistent layering, naming, and state management across app code.
When applied, the skill guides implementation choices for ViewModels, Repositories, SwiftUI views, and async flows. It enforces patterns like separating domain, data, and presentation layers, preferring Swift Concurrency for async code and Combine where reactive streams are appropriate. It also nudges toward testable structures and consistent naming conventions used in iOS projects.
Should I always prefer async/await over Combine?
Prefer async/await for simple async flows and sequential code; use Combine for continuous streams, transformations, or when integrating with existing publisher-based APIs.
Where should state live in MVVM + SwiftUI?
Keep ephemeral UI state in the SwiftUI view, persistent or shared state in the ViewModel, and authoritative domain state in domain layer objects or repositories.