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 argument label rules, edge cases, parameter naming, and default argument strategy.
The base rule: when the first argument completes a prepositional phrase with the base name, use the preposition as the argument label.
// Standard cases — preposition is the label
x.removeBoxes(havingLength: 12)
view.fade(from: red)
path.relativePath(from: root)When the first two arguments represent parts of a single abstraction, fold the preposition into the base name so each component gets its own label.
// GOOD — x and y are parts of a single abstraction (a point)
a.moveTo(x: b, y: c)
// BAD — forces x and y into a single prepositional phrase
a.move(toX: b, y: c)// GOOD — row and column are parts of a single abstraction (a cell position)
table.cellAt(row: r, column: c)
// BAD
table.cell(atRow: r, column: c)When a method involves multiple prepositions, each argument gets its own prepositional label.
// GOOD
database.move(item, from: source, to: destination)
// GOOD
view.transition(from: oldState, to: newState, duration: 0.3)When the first argument and base name form a grammatical phrase, omit the first label and absorb any leading words into the base name.
// GOOD — "add subview"
view.addSubview(child)
// GOOD — "contains element"
array.contains(element)If the label would start with words that belong in the base name, move them.
// GOOD — "having length" absorbed into base name
removeBoxes(havingLength: 12)
// BAD — should be part of the base name
remove(boxesHavingLength: 12)Value-preserving (widening) — the conversion cannot lose information. Omit the first label.
Int64(someUInt32) // UInt32 always fits in Int64
String(someCharacter) // Character is always a valid String
Double(someFloat) // Float always fits in DoubleNarrowing or lossy — the conversion may lose information or change representation. Use a descriptive label.
Int64(truncating: someDecimal) // may lose precision
UInt32(clamping: someLargeInt) // may clamp to bounds
String(describing: someObject) // uses debug representation
Int(exactly: someDouble) // may return nilRepresentation change — the conversion changes how the value is viewed. Use a label that describes the interpretation.
String(utf8String: cString) // interprets as UTF-8
Data(contentsOf: url) // reads from file
URL(string: urlString) // parses string as URLParameter names drive the clarity of generated documentation, even though they do not appear at most call sites. Choose names that read well in a doc comment.
/// Finds the index of the equivalent element.
///
/// - Parameter element: The element to search for.
/// - Returns: The index of `element`, or `nil` if not found.
func index(of element: Element) -> Int?Compare with a poorly named parameter:
/// Finds the index of the equivalent element.
///
/// - Parameter e: ???
func index(of e: Element) -> Int?Name parameters as complete English words. Single letters and abbreviations damage documentation quality.
Prefer a single method with default parameter values over a family of methods.
// GOOD — one method, sensible defaults
func decode(
_ data: Data,
encoding: String.Encoding = .utf8,
allowLossyConversion: Bool = false
) -> String?// BAD — method family that differs only in which parameters are present
func decode(_ data: Data) -> String?
func decode(_ data: Data, encoding: String.Encoding) -> String?
func decode(_ data: Data, encoding: String.Encoding, allowLossyConversion: Bool) -> String?Place parameters with defaults at the end. Parameters without defaults typically carry more meaning and form the grammatical base of the call site.
// GOOD — required parameters first
func search(
query: String,
in scope: SearchScope = .all,
limit: Int = 50,
offset: Int = 0
) -> [Result]Exception: when a trailing closure is the most common override, it may come after defaulted parameters.
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