Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Builds and reviews SwiftUI views using modern MV architecture, @Observable state, view composition, isolated previews, and iOS 26+ APIs.
Use this skill ↓68% 91%+23 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 15 of 22 without it.
3 of 3 safety checks passed
Not used yet
Use previews as deterministic compositions of a view's required inputs. A preview should render without launching the full app or reaching production services.
Provide separate previews for the states that materially change the interface:
Skip state permutations that do not change layout, behavior, or accessibility.
Keep production dependencies required. Install every environment value, observable model, action, and persistence container the view expects instead of making a dependency optional to silence a preview failure.
@MainActor
private struct ProfilePreview: View {
let state: ProfileStore.State
var body: some View {
ProfileScreen()
.environment(ProfileStore.preview(state: state))
.environment(\.profileClient, .preview)
}
}
#Preview("Loaded") {
ProfilePreview(state: .loaded(.fixture))
}
#Preview("Loading") {
ProfilePreview(state: .loading)
}
#Preview("Empty") {
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.