This Claude skill provides comprehensive expertise in building modern, declarative user interfaces using SwiftUI for Apple platforms including iOS, macOS, and visionOS. It empowers developers to master essential UI concepts such as view hierarchy, advanced state management (including the iOS 17+ Observation framework), complex layout systems, and fluid animations, ensuring the creation of high-performance and scalable applications.
Use Cases
Rapid UI Prototyping: Quickly generate and iterate on responsive mobile and desktop interfaces using declarative Swift code.
State Management Architecture: Implement robust data flows and reactive programming patterns using property wrappers like @State, @Binding, and the modern @Observable macro.
Custom Component Development: Design reusable UI modifiers and styled components to maintain design system consistency across multi-platform projects.
Complex Navigation Design: Build seamless user journeys and deep-linking capabilities using NavigationStack and programmatic navigation patterns.
Performance Optimization: Identify and resolve common SwiftUI bottlenecks such as unnecessary view updates and layout stutters using built-in validation rules.
name
swift-swiftui
description
Build modern UIs with SwiftUI - views, state management, animations, navigation
version
"2.0.0"
sasmp_version
"1.3.0"
bonded_agent
03-swift-swiftui
bond_type
PRIMARY_BOND
SwiftUI Skill
Declarative UI framework knowledge for building modern Apple platform interfaces.
// Trace view updates
var body: some View {
let _ = Self._printChanges()
// ... view content
}
// Check if preview
#if DEBUG
struct MyView_Previews: PreviewProvider {
static var previews: some View {
MyView(data: .preview)
}
}
#endif
Validation Rules
validation:
- rule: state_ownership
severity: error
check: @StateObject for views that create, @ObservedObject for passed
- rule: body_purity
severity: warning
check: No side effects in body computed property
- rule: lazy_for_lists
severity: info
check: Use LazyVStack/LazyHStack for long scrolling content