Agent skills for iOS, iPadOS, Swift, SwiftUI, and modern Apple framework development.
71
89%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
Extended examples for side-effect naming, the -ed/-ing decision tree, form- prefix patterns, Boolean naming, and factory methods.
Methods that change the receiver's state use imperative verb form.
array.sort()
array.append(newElement)
array.removeAll()
set.insert(member)
dictionary.updateValue(newValue, forKey: key)
buffer.replaceSubrange(range, with: newElements)Methods that return a value without changing the receiver use a form that describes the result.
let sorted = array.sorted()
let distance = point.distance(to: origin)
let trimmed = string.trimmingCharacters(in: .whitespaces)
let union = setA.union(setB)
let successor = index.advanced(by: 1)
let prefix = array.prefix(3)When both exist, the naming makes the difference obvious at every call site.
// Mutating
array.sort()
// Nonmutating — returns new value
let newArray = array.sorted()
// Mutating
set.formUnion(other)
// Nonmutating — returns new value
let combined = set.union(other)Use this decision tree to choose between -ed and -ing for the nonmutating variant of a verb-described operation.
Step 1: Try the past participle (-ed). Read the phrase: "a [verb]-ed [noun]". If it sounds grammatical, use -ed.
sort → sorted ✓ "a sorted array" sounds correct
reverse → reversed ✓ "a reversed collection" sounds correct
shuffle → shuffled ✓ "a shuffled deck" sounds correctStep 2: Does -ed sound ungrammatical?
If the past participle does not read naturally, use the present participle (-ing).
append → appending "an appended element" is awkward → use -ing
strip → stripping "a stripped newlines" is awkward → use -ingStep 3: Verb without a direct object?
If the verb has no direct object, -ing is almost always correct.
overlap → overlapping "overlapping with" not "overlapped with"| Mutating | Nonmutating | Suffix | Reasoning |
|---|---|---|---|
sort() | sorted() | -ed | "a sorted array" |
reverse() | reversed() | -ed | "a reversed collection" |
shuffle() | shuffled() | -ed | "a shuffled deck" |
append(_:) | appending(_:) | -ing | "an appended item" is awkward |
filter(_:) | filter(_:) | n/a | nonmutating only in stdlib |
drop(while:) | drop(while:) | n/a | nonmutating only in stdlib |
The form prefix applies only to noun-described operations where the nonmutating version is the noun itself.
| Nonmutating (noun) | Mutating (form- prefix) |
|---|---|
union(other) | formUnion(other) |
intersection(other) | formIntersection(other) |
symmetricDifference(other) | formSymmetricDifference(other) |
Do not apply form to verb-described operations. The imperative verb form is already the mutating version.
// WRONG — sort is a verb, not a noun
mutating func formSort() // ✗
mutating func sort() // ✓
// WRONG — append is a verb
mutating func formAppend(_:) // ✗
mutating func append(_:) // ✓The form prefix exists because the noun form (union) is naturally the nonmutating name, and the mutating version needs a distinct name. Verbs do not have this problem — the imperative (sort) and participle (sorted) are already distinct.
Boolean properties and methods read as assertions about the receiver. They answer a yes/no question.
// Properties — "is" prefix for adjectives
line.isEmpty
url.isFileURL
connection.isSecure
view.isHidden
option.isEnabled
// Properties — no prefix for verb phrases
set.contains(element) // "set contains element"
string.hasPrefix("https") // "string has prefix"
array.canAppend(element) // "array can append element"
// BAD patterns
line.empty // is this a verb ("empty the line") or adjective?
list.include // verb or boolean?
node.leaf // noun, not an assertionFactory methods that create and return a new value use the make prefix. This distinguishes them from initializers and from methods that return existing values.
// GOOD — factory creates a new value
let iterator = collection.makeIterator()
let buffer = parser.makeBuffer()
let snapshot = store.makeSnapshot()
// BAD — wrong prefix
let iterator = collection.createIterator() // use "make"
let buffer = parser.buildBuffer() // use "make"
let snapshot = store.getSnapshot() // "get" implies retrieval, not creationThe make prefix signals to callers that the returned value is freshly created, distinct from any cached or shared state.
skills
accessorysetupkit
references
activitykit
references
adattributionkit
references
alarmkit
references
app-clips
app-intents
references
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-localization
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
spritekit
references
storekit
swift-api-design-guidelines
swift-architecture
swift-charts
references
swift-codable
swift-concurrency
swift-formatstyle
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