Free developer resource · MIT license
SwiftUI code review worksheet and agent skill
Turn a concern about a SwiftUI change into a review finding that explains its trigger, user consequence, and supporting evidence.
By Lukáš Soukup, with AI assistance · Version 1.0.0 · Reviewed
Review one change against its intended behavior
Use this worksheet when you have a change or feature to review and can state what the user should be able to do. It asks for the affected location, expected behavior, trigger, result, cause, evidence, correction, and next check.
Evidence can be executed, source-traced, or unresolved. A source-traced finding can be actionable when its callers and assumptions are clear; it should still say that the interaction was not run. Missing product requirements belong in open questions.
Use the worksheet or install the skill
- Download and unpack the complete package. Read SKILL.md, both references, and LICENSE. You can use the worksheet manually without installing anything.
- For an assistant supporting the Agent Skills format, place the complete compot-swiftui-review folder in a skills directory supported by that client. Follow its documentation to choose project or personal scope.
- Confirm that the assistant lists compot-swiftui-review. Provide the change, the expected user behavior, and access to relevant callers.
- Ask for findings with an evidence label and a targeted next check. Apply fixes when they are part of your task, then verify the affected interaction.
Worked example: Cancel changes the reminder schedule
The parent owns the reminder schedule. The feature contract says Save commits an edit and Cancel discards it. In the exercise, the sheet’s Stepper writes directly through a binding to the parent.
Start at 15 minutes, open the editor, increment once, and press Cancel. Source tracing predicts that the parent now holds 20 minutes: the edit happened before dismissal. The proposed correction is to edit a local draft and commit it only on Save, with a defined policy for swipe-to-dismiss.
Evidence: source-traced. These steps describe a review exercise, not a recorded simulator run. Verify Cancel, Save, and interactive dismissal in the actual app.
Counterexample: if the feature explicitly applies every adjustment immediately and closes with Done, the shared binding can be correct. Establish the save policy before reporting a defect.
import SwiftUI
struct ReminderReviewExercise: View {
@State private var minutesBefore = 15
@State private var isEditing = false
var body: some View {
VStack {
Text("Reminder: \(minutesBefore) minutes before")
Button("Edit schedule") { isEditing = true }
}
.sheet(isPresented: $isEditing) {
ScheduleEditor(minutesBefore: $minutesBefore)
}
}
}
struct ScheduleEditor: View {
@Binding var minutesBefore: Int
@Environment(\.dismiss) private var dismiss
var body: some View {
Form {
Stepper("\(minutesBefore) minutes before", value: $minutesBefore, in: 5...60, step: 5)
Button("Cancel") { dismiss() }
Button("Save") { dismiss() }
}
}
}Read the files
Preview SKILL.md
---
name: compot-swiftui-review
description: Review one SwiftUI change against its intended user behavior using a review worksheet. Use for a focused code review with explicit evidence, reproduction steps, and coverage limits; pair with specialist guidance for framework details.
license: MIT
metadata:
author: Lukáš Soukup
version: "1.0.0"
---
# Compot SwiftUI review worksheet
Use this workflow for a scoped review. It organizes the evidence for a finding;
it does not supply a comprehensive SwiftUI API or modernization checklist.
## Establish the review boundary
Identify the changed feature, the expected user outcome and the relevant
callers. Check the project's instructions, deployment targets, build settings
and available verification tools. Record missing context before drawing a
conclusion that depends on it.
Open [the worksheet](references/review-worksheet.md) for the output fields and
evidence labels. Read [the exercise](references/review-exercise.md) when an
example helps distinguish a behavioral defect from a product-policy question.
## Trace a candidate finding
Choose a concrete action or state transition and follow it through the code.
Locate the value or side effect responsible for the observed or predicted
result. Compare that result with the feature's stated behavior.
Try to disprove the concern: inspect the caller, an existing guard, ownership
of the edited value and any relevant test. Use version-matched official docs
or an available specialist skill for uncertain framework semantics. Cite the
evidence that changes the conclusion. Do not treat a general coding preference
as the product's contract.
## Return an actionable review
Report each supported defect using the worksheet. State whether its trigger
was executed or inferred from source, and record the meaningful verification
that remains. Rank it by the consequence and realistic conditions of use.
When information is insufficient, identify the missing requirement or check
as an open question. If there are no supported findings, say so and describe
the review's coverage. Do not manufacture a finding to fill an output format.
Keep the review read-only unless the task already authorizes fixes. This skill
does not authorize uploads, production writes or public distribution.
How this fits with other Swift skills
This public edition is a compact workflow resource. AvdLee’s skill and SwiftUI Pro already include review guidance; use their broader framework references when needed. The Swift Agent Skills repository is a directory of independently maintained projects. This download includes none of their skill files or reference collections. No affiliation or endorsement is implied.
References and reuse
The public template, worksheet, and reminder exercise were written for Compot. Keep the included MIT notice when redistributing copies or substantial portions. The license covers these downloads, not external resources or other Compot products. Follow your coding assistant’s documentation for file discovery and skill activation.