affaan-m avatar

Swiftui Patterns

Covers modern SwiftUI architecture with the Observation framework, showing you when to use @State versus @Observable versus @Binding, and how to structure view models that only trigger re-renders for the properties that actually changed. The navigation section gives you type-safe routing with NavigationStack and a Router pattern. Performance guidance is practical: lazy containers, stable IDs, keeping expensive work out of body, and selective Equatable conformance. If you're still using ObservableObject and @Published, this walks you through the migration. The state management decision table alone is worth having around when you're wiring up a new feature.

skills.sh installs
5.6K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill swiftui-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

SwiftUI Patterns

Modern SwiftUI patterns for building declarative, performant user interfaces on Apple platforms. Covers the Observation framework, view composition, type-safe navigation, and performance optimization.

When to Activate

  • Building SwiftUI views and managing state (@State, @Observable, @Binding)
  • Designing navigation flows with NavigationStack
  • Structuring view models and data flow
  • Optimizing rendering performance for lists and complex layouts
  • Working with environment values and dependency injection in SwiftUI

State Management

Property Wrapper Selection

Choose the simplest wrapper that fits:

WrapperUse Case
@StateView-local value types (toggles, form fields, sheet presentation)
@BindingTwo-way reference to parent's @State
@Observable class + @StateOwned model with multiple properties
@Observable class (no wrapper)Read-only reference passed from parent
@BindableTwo-way binding to an @Observable property
@EnvironmentShared dependencies injected via .environment()

@Observable ViewModel

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Code Review & Quality, Debugging, Mobile Development
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1forcedotcom avatarexternal-diagram-mermaid-generateforcedotcom/sf-skillsSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows,5.6Kskills.sh installs
2wondelai avatarrelease-itwondelai/skillsBuild production-ready systems with stability patterns: circuit breakers, bulkheads, timeouts, and retry logic. Use when the user mentions "production outage", 5.6Kskills.sh installs
3affaan-m avatarspringboot-verificationaffaan-m/eccVerification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.5.6Kskills.sh installs
4wondelai avatarhigh-perf-browserwondelai/skillsOptimize web performance through network protocols, resource loading, and browser rendering internals. Use when the user mentions "my site is slow", "Core Web V5.5Kskills.sh installs
5affaan-m avataragentic-osaffaan-m/eccBuild persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled autom5.5Kskills.sh installs
6samber avatartechnical-article-writersamber/cc-skillsWrite compelling technical articles and blog posts for developer audiences. Use this skill whenever the user asks to write a blog post, technical article, or an5.5Kskills.sh installs