Install any skill in seconds. Free to start, no credit card required.
Get Started Free →sickn33/swiftui-view-refactor
Refactor SwiftUI views into smaller components with stable, explicit data flow.
Passed 19 of 22 test cases with the skill, and 15 of 22 without it.
and 4 more in the full report
5 fixed14 passed either way2 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
In my `AccountSettingsView.swift`, I have properties declared in random order: `@State private var isNotificationsEnabled = true`, `let userId: String`, `@Environment(\.dismiss) private var dismiss`, `var title: String { "Settings" }`, and `init(userId: String)`. How should these declarations be ordered inside the view type? Provide the reordered Swift code snippet.
| Checked | Without skill | With skill |
|---|---|---|
| Places `@Environment` property declarations before `let` properties. | Passed | Passed |
| Places `@State` property declarations after stored `let` properties. | Passed | Passed |
| Places non-view computed properties above the `init` initializer. | Missed | Passed |
The instructions your model reads when the skill loads.
Refactor SwiftUI views toward small, explicit, stable view types. Default to vanilla SwiftUI: local state in the view, shared dependencies in the environment, business logic in services/models, and view models only when the request or existing code clearly requires one.
body implementations.private/public let@State / other stored propertiesvar (non-view)initbody@State, @Environment, @Query, .task, .task(id:), and onChange before reaching for a view model.@Environment; keep domain logic in services/models, not in the view body.some View helpersbody properties that are longer than roughly one screen or contain multiple logical sections.View types for non-trivial sections, especially when they have state, async work, branching, or deserve their own preview.some View helpers rare and small. Do not build an entire screen out of private var header: some View-style fragments.Prefer:
var body: some View {
test cases passed, vs 15 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.