arisguimera/mobiai-core/mobiai-ios-architecture

Claude Code and agent skill by arisguimera/mobiai-core

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when creating features, refactoring, or navigating an iOS codebase — understand project structure, find where to make changes, follow existing patterns.

Install

npx vskill@latest install arisguimera/mobiai-core/mobiai-ios-architecture

SKILL.md

iOS Architecture

Community contribution welcome! Help improve this skill with your architecture insights, patterns, and real-world examples.

Common architecture patterns in iOS apps.

When to Use

  • Navigating an unfamiliar iOS codebase
  • Understanding where to make changes
  • Writing code that follows existing patterns

Detecting the Architecture

bash
# Check for SwiftUI vs UIKit
grep -r "import SwiftUI" --include="*.swift" -l | wc -l
grep -r "import UIKit" --include="*.swift" -l | wc -l
# Check for architecture indicators
grep -r "ViewModel\|UseCase\|Repository\|Interactor\|Presenter\|Store\|Reducer" --include="*.swift" -l | head -20
# Check for Combine usage
grep -r "import Combine\|@Published\|AnyPublisher" --include="*.swift" -l | wc -l
# Check for TCA (The Composable Architecture)
grep -r "import ComposableArchitecture\|ReducerOf\|Store<" --include="*.swift" -l | head -10

MVVM + SwiftUI (Most Common Modern Pattern)

Structure
Feature/
Views/
MyView.swift # SwiftUI View
MyDetailView.swift
ViewModels/
MyViewModel.swift # ObservableObject with @Published
Models/
MyModel.swift # Data models
Services/
MyService.swift # API/data access
Patterns
swift
// ViewModel
@MainActor
class MyViewModel: ObservableObject {
@Published var items: [Item] = []
@Published var isLoading = false
@Published var error: Error?
private let repository: ItemRepository
init(repository: ItemRepository) {
self.repository = repository
}
func loadItems() async {
isLoading = true
defer { isLoading = false }
do {
items = try await repository.fetchItems()
} catch {
self.error = error
}
}
}
// View
struct MyView: View {
@StateObject private var viewModel = MyViewModel(repository: .live)
var body: some View {
List(viewModel.items) { item in
Text(item.name)
}
.task { await viewModel.loadItems() }
}
}

MVVM + UIKit + Combine

Structure
Feature/
MyViewController.swift # UIViewController
MyViewModel.swift # ViewModel with Combine publishers
MyCoordinator.swift # Navigation coordinator (optional)
Patterns
swift
class MyViewModel {
@Published var items: [Item] = []
private let repository: ItemRepository
private var cancellables = Set<AnyCancellable>()
func loadItems() {
repository.fetchItems()
.receive(on: DispatchQueue.main)
.sink(
receiveCompletion: { _ in },
receiveValue: { [weak self] items in
self?.items = items
}
)
.store(in: &cancellables)
}
}

The Composable Architecture (TCA)

Structure
Feature/
MyFeature.swift # Reducer + State + Action
MyView.swift # View with Store
Patterns
swift
@Reducer
struct MyFeature {
@ObservableState
struct State: Equatable {
var items: [Item] = []
var isLoading = false
}
enum Action {
case loadItems
case itemsLoaded([Item])
}
@Dependency(\.itemClient) var itemClient
var body: some ReducerOf<Self> {
Reduce { state, action in
switch action {
case .loadItems:
state.isLoading = true
return .run { send in
let items = try await itemClient.fetch()
await send(.itemsLoaded(items))
}
case .itemsLoaded(let items):
state.isLoading = false
state.items = items
return .none
}
}
}
}

Clean Architecture (iOS)

Layer Structure
Domain/
Entities/Item.swift # Business models
UseCases/GetItemsUseCase.swift
Repositories/ItemRepository.swift # Protocol
Data/
Repositories/ItemRepositoryImpl.swift
Network/ItemAPI.swift
Persistence/ItemStore.swift
Presentation/
Scenes/ItemList/
ItemListView.swift
ItemListViewModel.swift

Navigation Patterns

NavigationStack (SwiftUI)
bash
grep -r "NavigationStack\|NavigationLink\|navigationDestination" --include="*.swift" -l | head -10
Coordinator Pattern (UIKit)
bash
grep -r "Coordinator\|protocol.*Coordinator" --include="*.swift" -l | head -10
Router
bash
grep -r "Router\|protocol.*Router" --include="*.swift" -l | head -10

Quick Code Navigation

bash
# Find all ViewModels
grep -r "class.*ViewModel\|struct.*ViewModel" --include="*.swift" -l
# Find all Views/ViewControllers
grep -r "struct.*View.*:.*View\|class.*ViewController" --include="*.swift" -l
# Find dependency injection setup
grep -r "@Environment\|@EnvironmentObject\|container.register" --include="*.swift" -l

Want to improve this skill? Share your architecture patterns, navigation strategies, and real-world iOS expertise via a PR.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
391
Repository forks
12
7-day trend score
30

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/arisguimera/mobiai-core/mobiai-ios-architecture/badge)](https://verified-skill.com/skills/arisguimera/mobiai-core/mobiai-ios-architecture)

Something wrong with this skill or its page? Tell us.