Apply Swift API Design Guidelines to names, argument labels, mutating/nonmutating pairs, protocols, and documentation comments. Use when designing or reviewing Swift APIs for clarity at the call site; file and project organization belongs to the relevant architecture/UI skill.
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Design APIs that read clearly at the call site and communicate semantic roles rather than implementation details.
This skill owns Swift declaration names, argument labels, mutating/nonmutating pairs, protocol naming, casing, overload clarity, and documentation comments. Route language/type-system mechanics to swift-language, concurrency semantics to swift-concurrency, lint configuration to swiftlint, and project/file naming to the relevant architecture or UI skill.
Preserve source compatibility when it is part of the request. Before renaming public API, inspect access level, protocol requirements, generated interfaces, call sites, and whether a deprecation/forwarding period is needed. Verify version-specific language behavior in primary Swift sources.
Read every proposed call as a sentence. Keep words that clarify the role of an argument; remove words that merely repeat its type or the declaration context.
Use the first applicable rule:
| Situation | Label strategy |
|---|---|
| Value-preserving conversion initializer | Omit first label |
Indistinguishable peer values such as min(x, y) | Omit peer labels |
| First argument completes the base-name phrase | Omit or fold words into the base name |
| Argument begins a prepositional phrase | Use that preposition as the label |
| General case | Use a role-based label |
Read Argument Labels and Parameters for grammatical/prepositional edge cases, conversions, peers, defaults, and multi-argument abstractions.
sort(), append(_:).sorted(), appending(_:).form plus noun for mutation: union(_:) / formUnion(_:).make for factories when creation is the semantic action.isEmpty, contains(_:).Read Side Effects and Mutating Pairs when -ed versus -ing, form, Boolean, or factory grammar is unclear.
-able, -ible, or -ing form.self; use free functions for symmetric peers, unconstrained generic operations, or established notation.Read Naming and Clarity for role names, terminology, weak-type compensation, and fluent usage.
Public API should have concise documentation that states purpose, parameters, return value, thrown errors, side effects, and relevant complexity. Function summaries describe what the operation does; type/property summaries describe what the declaration is.
Document non-constant complexity when callers could reasonably assume O(1). Use symbol links and parameter markup supported by DocC. Do not restate the declaration in prose.
Read Conventions and Special Rules for casing, complexity, tuples, closure labels, overloads, and documentation edge cases.
form...).remove(element: item) instead of remove(item)).checkEmpty() vs isEmpty).thienqo/ios-skills
6bf8b62
Also appears in
since Sep 6, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.