ios-swiftui
БесплатноБез исполняемых скриптовНе проверенBuild declarative UI and manage data flow with SwiftUI in iOS. Use when building declarative SwiftUI views or managing data flow with property wrappers.
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
SwiftUI Expert
Priority: P0 (CRITICAL)
Role: iOS UI Expert. Prioritize smooth 60fps, clean data flow.
Implementation Guidelines
- Views: Small, composable structs. Extract subviews often to keep
bodyclean. - State Selection (iOS 17+, default):
- @State for local simple data (Booleans, Strings, local view toggles).
- @State for VMs marked
@Observable(owning parent creates it once:@State private var vm = MyViewModel()). - Plain
let/property for passed-in@ObservableVMs — no wrapper needed, child views auto-track only the fields they read. - Legacy (pre-iOS 17 or Combine
ObservableObjectVMs): - @StateObject for VMs (initialized only once in parent view).
- @ObservedObject for passed-in VMs (initialized by parent).
- Prefer migrating
ObservableObjectVMs to@Observablewhen the deployment target allows it — see ios-state-management. - Modifiers: Order matters sequentially. Apply layout modifiers before visual ones (e.g.,
.padding().background()). - Preview: Always provide
PreviewProvideror#Previewfor every view.
Verification Checklist (Mandatory)
- Body Property: body property computationally cheap? (No complex logic or calculations).
- State Flow:
@State/@StateObjectVM initialized only once (in parent)? - Identity: Lists/ForEach stable
id? - Main Actor: UI updates strictly on Main Actor?
Anti-Patterns
- No Logic in Body: Move calculations to ViewModel or computed vars. Keep
bodyfor UI composition only. - No ObservedObject Init: NOT init
@ObservedObjectinside View settings — this causes leaks and performance issues. - No New
ObservableObjectVMs on iOS 17+: Use@Observablefor new code; reserveObservableObject/@Publishedfor code that must support pre-17 or already depends on Combine operators. - No Hardcoded Sizes: Use flexible frames and spacers for responsive UI.
Установить ios-swiftui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ios-swiftui?
Build declarative UI and manage data flow with SwiftUI in iOS. Use when building declarative SwiftUI views or managing data flow with property wrappers.
Как установить скилл ios-swiftui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ios-swiftui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic