ios-architecture
Apply MVVM, Coordinators, and Clean Architecture (VIP/VIPER) in iOS apps. Use when applying MVVM, Coordinators, or VIP/VIPER architecture in iOS apps. (triggers: **/*ViewModel.swift, **/*Coordinator.swift, **/*ViewController.swift, MVVM, Coordinator, ViewState, Output, Input)
Best use case
ios-architecture is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Apply MVVM, Coordinators, and Clean Architecture (VIP/VIPER) in iOS apps. Use when applying MVVM, Coordinators, or VIP/VIPER architecture in iOS apps. (triggers: **/*ViewModel.swift, **/*Coordinator.swift, **/*ViewController.swift, MVVM, Coordinator, ViewState, Output, Input)
Teams using ios-architecture should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ios-architecture/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ios-architecture Compares
| Feature / Agent | ios-architecture | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Apply MVVM, Coordinators, and Clean Architecture (VIP/VIPER) in iOS apps. Use when applying MVVM, Coordinators, or VIP/VIPER architecture in iOS apps. (triggers: **/*ViewModel.swift, **/*Coordinator.swift, **/*ViewController.swift, MVVM, Coordinator, ViewState, Output, Input)
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# iOS Architecture Standards ## **Priority: P0 (CRITICAL)** ## Implementation Guidelines ### MVVM (Model-View-ViewModel) - **ViewModel Responsibility**: Handle business logic, formatting, and state. No UIKit imports (except for platform types like `UIImage` if strictly necessary). - **ViewState**: Use a single state object or discrete `@Published` properties for UI updates. **Expose state as `private(set)` or using publishers**. - **Inputs/Outputs**: Define explicit protocols or nested types for inputs (events from View) and outputs (state for View). ### Coordinator Pattern - **Navigation Logic**: Decouple ViewControllers from navigation logic. The **Coordinator handles instantiation and push/present**. **Do NOT use `navigationController` directly in the ViewController for screen transitions.** - **Dependency Injection**: **Pass dependencies** (Services, Repositories) through the **Coordinator into the ViewModels**. - **Child Coordinators**: Maintain a hierarchy; **correctly remove child coordinators** from the parent's collection when their flow is finished. ### Clean Architecture (VIP/VIPER) - **VIP (Clean Swift)**: Use Interactor for logic, Presenter for UI formatting, and ViewController for display. - **Unidirectional Flow**: Data flows: **View -> Interactor -> Presenter -> View**. - **VIPER**: (View, Interactor, Presenter, Entity, Router) — another common architectural pattern for iOS apps. ## Anti-Patterns - **No Logic in VC**: Move business logic to ViewModel/Interactor. - **No Public ViewModel State**: Keep state **private(set)** or using publishers. - **No Direct Navigation**: Use a Coordinator for screen transitions. Never use `navigationController` directly. ## Verification Checklist (Mandatory) - [ ] **Pure ViewModel**: Does the ViewModel have any `UIKit` imports? (Prohibited) - [ ] **Navigation**: Is `navigationController` used directly in the VC for transitions? (Use Coordinator) - [ ] **State Access**: Is ViewModel state exposed as `public var`? (Use `private(set)` or publishers) - [ ] **Deallocation**: Are child coordinators correctly removed from the parent's collection on finish? - [ ] **VIP Unidirection**: Is the data flow unidirectional (View -> Interactor -> Presenter -> View)? ## References - [MVVM-C & VIP Implementation](references/implementation.md)
Related Skills
spring-boot-architecture
Structure Spring Boot 3+ projects with feature packaging and clean layering. Use when structuring Spring Boot 3 projects, defining layers, or applying architecture patterns. (triggers: pom.xml, build.gradle, structure, layering, dto, controller, @RestController, @Service, @Repository, @Entity, @Bean, @Configuration)
react-native-architecture
Structure React Native projects with feature-first organization and separation of concerns. Use when structuring a React Native project or applying clean architecture patterns. (triggers: src/**/*.tsx, src/**/*.ts, app.json, feature, module, directory structure, separation of concerns, Expo, React Navigation, StyleSheet.create, react-native, mobile architecture)
nextjs-architecture
Structure Next.js projects with Feature-Sliced Design layers, domain-grouped slices, and strict import hierarchy. Use when organizing features into FSD layers, enforcing slice boundaries, or keeping page.tsx thin. (triggers: src/features/**, src/entities/**, src/widgets/**, FSD, Feature Sliced Design, slices, segments)
nestjs-architecture
Design decoupled, testable NestJS module boundaries with feature, core, and shared modules. Use when structuring module imports, creating feature modules, or enforcing separation of concerns in NestJS. (triggers: **/*.module.ts, main.ts, NestFactory, Module, Controller, Injectable)
laravel-clean-architecture
Implement Domain-Driven Design with typed DTOs, repository interfaces, and single-responsibility Action classes in Laravel. Use when creating domain folders, binding repository contracts in providers, or passing DTOs between layers. (triggers: app/Domains/**/*.php, app/Providers/*.php, domain, dto, repository, contract, adapter)
laravel-architecture
Enforce core architectural standards for scalable Laravel applications. Use when structuring controllers, service layers, action classes, Form Requests, or Service Container bindings in Laravel projects. (triggers: app/Http/Controllers/**/*.php, routes/*.php, controller, service, action, request, container)
golang-architecture
Structure Go projects with Clean Architecture and standard layout conventions. Use when structuring Go projects or applying Clean Architecture in Go. (triggers: go.mod, internal/**, architecture, structure, folder layout, clean arch, dependency injection)
flutter-layer-based-clean-architecture
Enforce inward dependency flow, pure domain layers, and DTO-to-entity mapping in Flutter DDD architecture. Use when structuring lib/domain/, lib/infrastructure/, lib/application/, or lib/presentation/ layers, defining repository interfaces, or wiring BLoCs with get_it. (triggers: lib/domain/**, lib/infrastructure/**, lib/application/**, dto, mapper, Either, Failure)
flutter-feature-based-clean-architecture
Organize Flutter apps with modular feature-based clean architecture. Use when creating or modifying any file under lib/features/ including domain entities, repositories, data sources, or screens. (triggers: lib/features/**, feature, domain, infrastructure, application, presentation)
common-architecture-diagramming
Standards for creating clear, audience-appropriate C4 and UML architecture diagrams with Mermaid. Use when producing system context diagrams, container views, sequence diagrams, or updating ARCHITECTURE.md files. (triggers: ARCHITECTURE.md, **/*.mermaid, **/*.drawio, diagram, architecture, c4, system design, mermaid)
common-architecture-audit
Audit structural debt, logic leakage, and monolithic components across Web, Mobile, and Backend codebases. Use when reviewing architecture, assessing tech debt, detecting logic in wrong layers, or identifying God classes. (triggers: package.json, pubspec.yaml, go.mod, pom.xml, nest-cli.json, architecture audit, code review, tech debt, logic leakage, refactor)
android-architecture
Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up Android project structure, placing code in Clean Architecture layers, configuring feature/core modules, or implementing UDF patterns. (triggers: build.gradle.kts, settings.gradle.kts, clean-architecture, module, layers, domain, UDF, unidirectional, feature module, core module, presentation layer, data layer)