Help us improve
Share bugs, ideas, or general feedback.
From swift-api-design-guidelines
Write, review, or improve Swift APIs using official guidelines for naming, argument labels, documentation, terminology, and conventions. Use for new designs, refactoring, or fluency reviews.
npx claudepluginhub erikote04/swift-api-design-guidelines-agent-skill --plugin swift-api-design-guidelinesHow this skill is triggered — by the user, by Claude, or both
Slash command
/swift-api-design-guidelines:swift-api-design-guidelines-skillThe summary Claude sees in its skill listing — used to decide when to auto-load this 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.
Applies Swift API Design Guidelines to name, label, and document Swift APIs. Covers argument label rules, mutating/nonmutating pairs, side-effect naming, documentation comments, and clarity at call site.
Enforces Swift code style conventions for clean, readable code: CamelCase naming, golden path with early guards, extensions for organization, spacing rules, and idiomatic patterns. Use when writing or reviewing Swift code.
Applies Swift 6+ best practices for iOS/macOS code including concurrency (async/await, actors, MainActor, Sendable), API design, typed throws, and Swift 6 migration.
Share bugs, ideas, or general feedback.
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