swiftui-view-refactor — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited swiftui-view-refactor (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Attribution: Sourced from steipete/agent-scripts by Peter Steinberger. Originally created by @Dimillian from Dimillian/Skills (2025-12-31).
Apply a consistent structure and dependency pattern to SwiftUI views, with a focus on ordering, Model-View (MV) patterns, careful view model handling, and correct Observation usage.
private/public let@State / other stored propertiesvar (non-view)initbody@State, @Environment, @Query, and task/onChange for orchestration.@Environment; keep views small and composable.body grows beyond a screen or has multiple logical sections, split it into smaller subviews.View types when they carry state or complex branching.// ✅ Extracted sections
var body: some View {
VStack(alignment: .leading, spacing: 16) {
HeaderSection(title: title, isPinned: isPinned)
DetailsSection(details: details)
ActionsSection(onSave: onSave, onCancel: onCancel)
}
}init, then pass them into the view model in the view's init.// ✅ Observation-based view model
@State private var viewModel: SomeViewModel
init(dependency: Dependency) {
_viewModel = State(initialValue: SomeViewModel(dependency: dependency))
}@Observable reference types, store them as @State in the root view.@State, @Environment, @Query, task, and onChange.@State view model initialized in init.@State for root @Observable view models, no redundant wrappers.body and non-view computed vars above init.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.