Agent skills for iOS, iPadOS, Swift, SwiftUI, and modern Apple framework development.
80
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Advisory
Suggest reviewing before use
Load this reference when restructuring an existing SwiftUI view without an explicit request to change its interface or behavior.
A structure-only refactor preserves:
Record intentional changes separately. Do not let cleanup silently become a visual redesign, navigation rewrite, or business-rule change.
Use the extraction signals in the main skill. Dedicated View types are the default
for sections with substantial layout or branching, their own state or lifecycle,
narrower dependencies, independent preview value, or enough complexity to obscure
the parent's data flow. Keep only genuinely small stateless fragments as computed
some View properties. Extensions and // MARK: headings organize a file; they do
not create view boundaries. Do not replace one oversized body with a screen-sized
extension made of computed some View fragments.
Move non-trivial button actions and lifecycle closures to small named methods so
body reads as UI:
Button("Save", action: save)
.disabled(isSaving)
.task(id: searchText) {
await reload(for: searchText)
}
private func save() {
Task { await editorService.validateAndSave(draft) }
}
private func reload(for query: String) async {
results = await searchClient.results(for: query)
}The view methods remain thin orchestration points. They may update view-owned loading, selection, error, or presentation state around a service/model call.
Validation, persistence, networking, retry/caching rules, and reusable loading policy belong in services or models. Do not merely move a large inline closure into an equally large private view method and call the refactor complete.
Keep reusable domain errors and their recovery policy with the service or model that defines the operation. The view may translate those errors into presentation state, but it should not become the owner of domain failure semantics.
Pass extracted subviews only the values, bindings, and actions they need. Preserve the existing environment-versus-initializer ownership decision unless changing that boundary is part of the request. If a child needs a cohesive feature-scoped observable model, pass that model explicitly instead of replacing its interface with many unrelated closures.
After each meaningful extraction:
Preserve existing preview-rendering and snapshot-test CI gates. Compilation alone does not prove that extracted views still compose or render correctly.
A cleaner file that changes behavior, weakens a required dependency, or no longer builds is not a successful refactor.
.tessl-plugin
skills
accessorysetupkit
references
activitykit
references
adattributionkit
references
alarmkit
references
app-clips
app-intents
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
references
audioaccessorykit
references
authentication
references
avkit
references
background-processing
references
browserenginekit
references
callkit
references
carplay
references
cloudkit
references
contacts-framework
references
core-bluetooth
references
core-data
core-motion
references
core-nfc
references
coreml
references
cryptokit
references
cryptotokenkit
references
debugging-instruments
device-integrity
references
dockkit
references
energykit
references
eventkit
references
financekit
references
focus-engine
gamekit
references
healthkit
references
homekit
references
ios-accessibility
ios-ettrace-performance
ios-localization
ios-memgraph-analysis
ios-networking
ios-simulator
references
mapkit
metrickit
references
musickit
references
natural-language
references
paperkit
references
passkit
references
pdfkit
references
pencilkit
references
permissionkit
references
photokit
push-notifications
realitykit
references
relevancekit
references
scenekit
references
sensorkit
references
speech-recognition
references
spritekit
references
storekit
swift-api-design-guidelines
swift-architecture
references
swift-charts
references
swift-codable
references
swift-concurrency
swift-formatstyle
references
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-uikit-interop
swiftui-webkit
tabletopkit
references
tipkit
references
vision-framework
weatherkit
references
widgetkit
references