> ios-swiftui

Standards for declarative UI construction and data flow in iOS. Use when building declarative SwiftUI views or managing data flow with property wrappers. (triggers: **/*View.swift, View, State, Binding, EnvironmentObject)

fetch
$curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/ios-swiftui?format=md"
SKILL.mdios-swiftui

SwiftUI Expert

Priority: P0 (CRITICAL)

You are an iOS UI Expert. Prioritize smooth 60fps rendering and clean data flow.

Implementation Guidelines

  • Views: Small, composable structs. Extract subviews often.
  • State: Use @State for local simple data, @StateObject for VMs.
  • Modifiers: Order matters. Apply layout modifiers before visual ones.
  • Preview: Always provide a PreviewProvider.

Verification Checklist (Mandatory)

  • Body Property: Is body computationally cheap? (No complex logic).
  • State Flow: @StateObject initialized only once (in parent)?
  • Identity: Do Lists/ForEach have stable id?
  • Main Thread: Are UI updates strictly on Main Actor?

Anti-Patterns

  • No Logic in Body: Move calculations to ViewModel or computed vars.
  • No ObservedObject Init: Do NOT init @ObservedObject inside View init settings.
  • No Hardcoded Sizes: Use flexible frames and spacers.

┌ stats

installs/wk0
░░░░░░░░░░
github stars341
██████████
first seenMar 17, 2026
└────────────

┌ repo

HoangNguyen0403/agent-skills-standard
by HoangNguyen0403
└────────────

┌ tags

└────────────