convez.ai
Skill
SwiftyJourney

ios-architecture-expert-skill

SwiftyJourney/ios-architecture-expert-skill

Ver no GitHub
InicialPluginScore · de 0 a 100

Build modular, testable iOS apps with clean architecture: composition root, protocol boundaries, generic presenters, Swift 6 concurrency - Agent Skill

Instalação

$npx convez-ai SwiftyJourney/ios-architecture-expert-skill

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
2
Forks
0
Acompanhando
0
Saúde
37%
Último commit
há 2 semanas
Versão
—
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

iOS Architecture Expert Agent Skill

License: MIT Agent Skills

A Claude Code skill that guides building modular, testable iOS/Swift applications following a clean architecture methodology — protocol-oriented design, composition root patterns, generic presenters, and modern Swift concurrency.

Who is this for?

iOS developers who want AI-assisted guidance on:

  • Structuring apps with clean architecture layers
  • Composing dependencies via a Composition Root
  • Writing testable code with protocol boundaries
  • Building reusable presentation logic with generic presenters
  • Applying modern Swift concurrency (async/await, Sendable, @MainActor)
  • Enabling Swift 6 strict concurrency across all modules

Installation

Install via skills.sh:

npx skills add SwiftyJourney/ios-architecture-expert-skill

Compatible Agents

What the Skill Covers

Architecture Layers

  • Feature Layer: Domain models (struct, Hashable, Sendable) and use-case protocols
  • API Layer: Endpoint enums, static mappers, HTTPClient protocol
  • Cache Layer: Store protocols, local models, cache policy objects
  • Presentation Layer: Generic LoadResourcePresenter<Resource, View>, framework-agnostic view models
  • UI Layer: UIKit (DiffableDataSource, CellController) and SwiftUI (@Observable) patterns
  • Composition Layer: Composition Root, UI composers, adapters, virtual proxies

Composition Patterns

  • FeedService — @MainActor orchestrator with lazy init, Scheduler, and fallback strategy
  • FeedUIComposer — Static factory wiring presenter->adapter->view chains
  • LoadResourcePresentationAdapter — Generic async loader with Task.immediate and cancellation
  • WeakRefVirtualProxy — Retain cycle prevention via conditional conformance
  • Paginated<Item> — Recursive pagination model with @Sendable loadMore
  • Scheduler protocol — Abstract CoreData/InMemory execution context
  • InMemoryFeedStore — @MainActor, NSCache-backed production fallback when CoreData fails to init

Testing Strategy

  • Unit tests with makeSUT() factory and spy collaborators
  • Generic async test spy (LoaderSpy) with AsyncThrowingStream
  • Specification pattern for shared store contract tests
  • Integration tests with real CoreData stack
  • Snapshot tests (light/dark mode + accessibility sizes)
  • Acceptance tests with full DI container

Concurrency at Architecture Boundaries

  • @MainActor placement rules (presenters, adapters, composition — not domain types)
  • @Sendable closures at composition boundaries
  • Task.immediate for synchronous-first execution
  • async let for parallel loading in the Composition Root
  • Cancellation handling in adapters
  • Swift 6 strict concurrency (SWIFT_STRICT_CONCURRENCY = complete)

Skill File Structure

SKILL.md                                 # Hub + diagnostic table + gotchas + reference router
references/
├── architecture-layers.md               # Layer-by-layer patterns with code
├── composition-root.md                  # FeedService, Scheduler, fallback, SceneDelegate
├── adapters-and-proxies.md              # Adapters, proxies, pagination, cell lifecycle
├── concurrency-at-boundaries.md         # Concurrency at boundaries + async migration playbook
├── testing-strategy.md                  # 5-layer test strategy + generic async spy
├── feature-implementation-workflow.md   # Step-by-step feature building + duplicate-then-generalize
└── spm-project-structure.md             # SPM module layout + Swift 6 settings + CI
evals/                                   # Trigger eval queries + output-quality test cases

Related Skills

Credits

Built on well-established clean architecture, TDD, and modular design practices from the iOS community. Code examples written for Swift 6 / iOS 18+.

License

MIT — see LICENSE.

Ver o original no GitHub

Bom para

Relacionados