Bridges UIKit and SwiftUI with UIViewRepresentable, UIViewControllerRepresentable, UIHostingController, UIHostingConfiguration, coordinator delegates, and UIKit automatic observation tracking for shared @Observable state.
SkillScore100Maintained
Automatic
◆Frontend / UI pack
Last verified 8/14/2026
What it changes
Passed 22 of 22 test cases with the skill, and 16 of 22 without it.
Without skill73%
With skill100%
Checks it passed that the model alone missed
Annotates the Coordinator class with @MainActor.
Uses [weak coordinator] in closure capture lists.
Includes .intrinsicContentSize in the sizingOptions property.
and 6 more in the full report
6 fixed16 passed either way0 still failing0 broke
Pass-rate lift
+27 pp
Tokens
+155%
Agent turns
0%
Response time
-27%
Model gemini-3.6-flashMeasured 8/14/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 6
Prompt
I'm building an iOS app where I need to wrap a native UISearchBar inside SwiftUI so I can filter items live with two-way binding. Can you show me how to write a complete UIViewRepresentable wrapper with a coordinator for delegate callbacks, including proper state sync handling?
What was checked, without and with the skill
Checked
Without skill
With skill
Annotates the Coordinator class with @MainActor.
Missed
Passed
Sets searchBar.delegate inside makeUIView rather than inside updateUIView.
Passed
Passed
Guards against redundant text reassignment in updateUIView by checking if the text property differs before setting it.
Passed
Passed
case-01 · gemini-3.6-flash · 8/14/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md420 lines3 files
SwiftUI-UIKit Interop
Bridge UIKit and SwiftUI in both directions: wrap UIKit views and controllers, embed SwiftUI in UIKit screens, and synchronize state without duplicating lifecycle ownership.
See references/representable-recipes.md for complete wrapping recipes and references/hosting-migration.md for UIKit-to-SwiftUI migration patterns.