Loading...
Loading...
Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. Use when reading, writing, or reviewing SwiftUI projects.
npx skill4agent add twostraws/swiftui-agent-skill swiftui-proreferences/api.mdreferences/views.mdreferences/data.mdreferences/navigation.mdreferences/design.mdreferences/accessibility.mdreferences/performance.mdreferences/swift.mdreferences/hygiene.mdforegroundStyle()foregroundColor()foregroundStyle()foregroundColor()// Before
Text("Hello").foregroundColor(.red)
// After
Text("Hello").foregroundStyle(.red)// Before
Button(action: addUser) {
Image(systemName: "plus")
}
// After
Button("Add User", systemImage: "plus", action: addUser)Binding(get:set:)@StateonChange()// Before
TextField("Username", text: Binding(
get: { model.username },
set: { model.username = $0; model.save() }
))
// After
TextField("Username", text: $model.username)
.onChange(of: model.username) {
model.save()
}foregroundColor()foregroundStyle()references/accessibility.mdreferences/api.mdreferences/design.mdreferences/hygiene.mdreferences/navigation.mdNavigationStackNavigationSplitViewreferences/performance.mdreferences/data.mdreferences/swift.mdreferences/views.md