Swiftui Patterns
SwiftUI architecture patterns with @Observable state, type-safe navigation, and render performance guidance for Apple platforms.
- CCM score
- 75 of 100
- skills.sh installs
- 12.4K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers property wrapper selection, @Observable view models, view composition, NavigationStack routing, and performance tuning for lists
- Includes code examples for @Observable view models, @Environment injection, a Router with NavigationPath, ViewModifier styling, and #Preview mock data
- Enforces avoiding ObservableObject, @Published, and @EnvironmentObject in new code, and keeps async work out of body and init
- Designed for developers building or reviewing SwiftUI views on iOS and macOS who need current state management guidance
Install
$ npx -y skills add affaan-m/ecc --skill swiftui-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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:
| Wrapper | Use Case |
|---|---|
@State | View-local value types (toggles, form fields, sheet presentation) |
@Binding | Two-way reference to parent's @State |
@Observable class + @State | Owned model with multiple properties |
@Observable class (no wrapper) | Read-only reference passed from parent |
@Bindable | Two-way binding to an @Observable property |
@Environment | Shared dependencies injected via .environment() |
@Observable ViewModel
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Mobile Apps, Frontend & UI Code
- First seen
- Jul 14, 2026
Questions
What does the swiftui-patterns skill do?
The swiftui-patterns skill guides building SwiftUI views with @Observable state, view composition, type-safe NavigationStack routing, and render performance tuning. It covers modern iOS and macOS UI practices, such as replacing ObservableObject with @Observable and using #Preview with mock data.
Where does swiftui-patterns rank in the Mobile Apps category?
On the Mobile Apps category page, swiftui-patterns ranks in the top 100. It sits alongside skills such as vercel-react-native-skills, animate-expo, write-swift, firebase-crashlytics and xcode-project-setup, and it focuses on SwiftUI architecture, state, navigation and performance.
How do I install the swiftui-patterns skill?
Run npx -y skills add affaan-m/ecc --skill swiftui-patterns -y in your project to install it. Once installed, the agent can help you build and review SwiftUI views, @Observable view models, NavigationStack flows and list rendering performance.
When should I use the swiftui-patterns skill?
Use swiftui-patterns when building or reviewing SwiftUI views, @Observable state, navigation or render performance. It helps you choose between @State, @Binding, @Bindable and @Environment, and it flags anti-patterns such as async work inside body or using AnyView.
More from affaan-m/ecc
All 257- Pytorch Patterns12.3K
- Bun Runtime12.3K
- Ai First Engineering12.3K
- Flutter Dart Code Review12.2K
- Perl Security12.2K
- Regex Vs Llm Structured Text12.2K
- Compose Multiplatform Patterns12.2K
- Continuous Agent Loop12.2K
- Content Hash Cache Pattern12.1K
- Kotlin Testing12.1K
- Ai Regression Testing12.1K
- Browser Qa12.1K
- Design System12.1K
- Jira Integration12K
- Investor Outreach12K
- Documentation Lookup12K
- Remotion Video Creation12K
- Swift Actor Persistence12K
- Swift Protocol Di Testing12K
- Blueprint12K
- Git Workflow11.9K
- Foundation Models On Device11.9K
- Exa Search11.9K
- Swift Concurrency 6 211.9K
Similar to Swiftui Patterns
More Mobile Appsswiftui-expert-skillSkillavdlee/swiftui-agent-skill37.2K installsTrace-driven SwiftUI guidance for iOS and macOS covering state, layout, performance, and Instruments analysis.
swiftui-developmentSkillmindrally/skills717 installsComprehensive SwiftUI guidelines covering MVVM architecture, Swift 6 concurrency, and modern state management for iOS 17+.
swiftui-ui-patternsSkilldimillian/skills3.8K installsStructured SwiftUI guidance covering view composition, state ownership, navigation, and async handling, with per-component reference files.
compose-multiplatform-patternsSkillaffaan-m/ecc12.2K installsPatterns for shared Compose UI covering state, navigation, theming, and recomposition performance.
swift-architecture-skillSkillefremidze/swift-architecture-skill2.1K installsPicks and applies one Swift iOS architecture playbook (MVVM, MVI, TCA, Clean Architecture, VIPER, MVP, Coordinator, or Reactive) for SwiftUI or UIKit work.
swiftui-expertPluginAvdLee/SwiftUI-Agent-Skill3.9K starsExpert SwiftUI guidance for state management, view composition, performance, modern SDK APIs, and Liquid Glass patterns.