Community-maintained Agent Skills for complete Swift and Apple-platform app delivery.
73
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Medium
Suggest reviewing before use
Adapted and rewritten for this collection; see ../NOTICE.md.
Use these checks to find runtime hazards, not to enforce a personal style. A pattern is a finding only when the value can vary at runtime, the ownership graph can form a cycle, or the API contract is misleading.
// Runtime input: the invariant is not proven.
let url = URL(string: userInput)! // possible crash
let first = response.items.first! // possible empty collection
let value = dictionary["key"]! // possible missing key
guard let url = URL(string: userInput) else {
return reportInvalidInput()
}
let first = response.items.first
let value = dictionary["key", default: fallback]Verify the actual source of the value before flagging !. A force unwrap can be
reasonable when a local invariant is explicit and testable (for example, a
validated literal URL), but an asset lookup, environment value, decoded payload,
or user input is still runtime data. Prefer optional binding, a throwing API, or
an explicit precondition whose failure is intentionally fatal.
Also check for the misleading nil-check-then-unwrap pattern:
if optionalString != nil {
print(optionalString!.count)
}Use if let/guard let so the value checked is the value used. For collections,
confirm that an index is valid at the point of access; .first, .last, or a
domain-specific missing-item path is safer than assuming a non-empty collection.
final class Controller {
var onComplete: (() -> Void)?
func installHandler() {
onComplete = { [weak self] in
self?.refresh()
}
}
}A stored closure that captures its owner strongly can form a cycle, but
[weak self] is not a universal fix: a task or callback may intentionally keep
an operation alive, and weak capture can make work disappear before completion.
Trace who stores the closure, how long it should live, and who cancels or clears
it. Prefer capturing immutable dependencies when that makes ownership clearer.
Use weak for a delegate only when the protocol is class-bound and the ownership
graph requires a non-owning reference. Do not flag a strong delegate without
checking whether the delegate is a value type, an external owner, or intentionally
retained. Use unowned only when the lifetime relationship is proven; otherwise
it turns a lifetime bug into a crash.
IBOutlet properties are a framework convention, but ordinary String!, model,
service, and image properties deserve the same scrutiny as other optionals. If a
value is required, initialize it before use; if it is genuinely absent, model it
as T? and handle the absent case.
Use Swift API Design Guidelines for naming and argument labels. Flag names when
they obscure side effects, contradict mutating/nonmutating behavior, or misstate
the ownership/error contract—not merely because another spelling is preferred.
Route a broad API naming audit to swift-api-design-guidelines.
.tessl-plugin
skills
accessorysetupkit
references
activitykit
adattributionkit
references
alarmkit
references
app-clips
app-intents
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
audioaccessorykit
references
authentication
references
avkit
background-processing
references
browserenginekit
callkit
references
carplay
cloudkit
contacts-framework
references
core-bluetooth
references
core-data
core-motion
references
core-nfc
references
coreml
references
cryptokit
cryptotokenkit
references
debugging-instruments
device-integrity
references
dockkit
energykit
references
eventkit
financekit
references
focus-engine
gamekit
healthkit
references
homekit
references
ios-accessibility
ios-app-workflow
references
ios-ettrace-performance
ios-localization
ios-memgraph-analysis
ios-networking
ios-simulator
references
metrickit
references
musickit
references
natural-language
references
paperkit
references
passkit
references
pdfkit
pencilkit
references
permissionkit
references
photokit
push-notifications
realitykit
references
relevancekit
references
scenekit
sensorkit
speech-recognition
references
spritekit
storekit
swift-api-design-guidelines
swift-architecture
references
swift-charts
swift-codable
references
swift-code-review
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-responsive-layout
swiftui-uikit-interop
swiftui-webkit
tabletopkit
tipkit
vision-framework
weatherkit
references