OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add erikote04/swift-api-design-guidelines-agent-skill --skill swift-api-design-guidelines-skill
Write, review, or improve Swift APIs using Swift API Design Guidelines for naming, argument labels, documentation comments, terminology, and general conventions. Use when designing new APIs, refactoring existing interfaces, or reviewing API clarity and fluency.
npx skills add erikote04/swift-api-design-guidelines-agent-skill --skill swift-api-design-guidelines-skill
Use this skill to design and review Swift APIs that are clear at the point of use, fluent in call sites, and aligned with established Swift naming and labeling conventions. Prioritize readability, explicit intent, and consistency across declarations, call sites, and documentation comments.
references/promote-clear-usage.md, references/strive-for-fluent-usage.md).references/parameters.md, references/argument-labels.md).references/fundamentals.md).references/general-conventions.md, references/special-instructions.md).Parameter, Returns, Throws, Note, etc.).Any, NSObject, String, Int).make.sort/sorted, formUnion/union).isEmpty, intersects).O(1).| Situation | Preferred Pattern |
|---|---|
| Mutating verb | reverse() |
| Nonmutating verb | reversed() / strippingNewlines() |
| Nonmutating noun op | union(_:) |
| Mutating noun op | formUnion(_:) |
| Factory method | makeWidget(...) |
| Boolean query | isEmpty, intersects(_:) |
| Situation | Rule |
|---|---|
| Distinguishable unlabeled args | Omit labels only if distinction is still clear |
| Value-preserving conversion init | Omit first label |
| First arg in prepositional phrase | Usually label from the preposition |
| First arg in grammatical phrase | Omit first label |
| Defaulted arguments | Keep labels (they may be omitted at call sites) |
| All other arguments | Label them |
| Declaration Kind | Summary Should Describe |
|---|---|
| Function / method | What it does and what it returns |
| Subscript | What it accesses |
| Initializer | What it creates |
| Other declarations | What it is |
O(1) computed property complexity is documented.references/fundamentals.md - Core principles and documentation comment rulesreferences/promote-clear-usage.md - Ambiguity reduction and role-based namingreferences/strive-for-fluent-usage.md - Fluency, side effects, and mutating pairsreferences/use-terminology-well.md - Terms of art, abbreviations, and precedentreferences/general-conventions.md - Complexity docs, free function exceptions, casing, overloadsreferences/parameters.md - Parameter naming and default argument strategyreferences/argument-labels.md - First-argument and general label rulesreferences/special-instructions.md - Tuple/closure naming and unconstrained polymorphism