Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
erikote04 avatar

Swift Api Design Guidelines Skill

  • 905 installs
  • 27 repo stars
  • Updated February 18, 2026
  • erikote04/swift-api-design-guidelines-agent-skill

swift-api-design-guidelines-skill is a mobile development skill that guides developers to generate Swift APIs following official Apple design conventions so call sites read naturally and require minimal extra documentati

About

swift-api-design-guidelines-skill encodes Apple's Swift API Design Guidelines for agent-assisted Swift development on iOS, macOS, and server-side Swift projects. The skill documents rules such as omitting argument labels only when parameters cannot be usefully distinguished, using unlabeled value-preserving conversion initializers like Int64(someUInt32), and applying prepositional-phrase labels such as removeBoxes(havingLength:). Exceptions cover moving label boundaries when first arguments form one abstraction, as when first arguments are parts of one abstraction and the label shifts after the preposition. Reach for this skill when agents generate public Swift APIs, framework surfaces, or protocol requirements where call-site English readability matters as much as correctness. It complements SwiftLint style checks by focusing on API shape and naming—not project scaffolding. Developers building packages consumed by other modules benefit most because guideline violations compound across every call site in downstream code.

  • Applies the official Swift API Design Guidelines including argument label rules, prepositional phrases, and grammatical
  • Evaluates every declaration against real call-site clarity rather than isolated signatures.
  • Treats documentation as a core part of API design, not an afterthought.
  • Produces consistent, idiomatic Swift interfaces across every new endpoint or library function.
  • Works as a reusable agent capability that can be invoked before any Swift function or method is written.

Swift Api Design Guidelines Skill by the numbers

  • 905 all-time installs (skills.sh)
  • +23 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #440 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/erikote04/swift-api-design-guidelines-agent-skill --skill swift-api-design-guidelines-skill

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs905
repo stars27
Security audit3 / 3 scanners passed
Last updatedFebruary 18, 2026
Repositoryerikote04/swift-api-design-guidelines-agent-skill

How do you name Swift APIs per Apple guidelines?

Generate Swift APIs that follow official Apple design conventions so call sites read naturally and require almost no extra documentation.

Who is it for?

Swift developers and agents authoring public APIs, frameworks, or protocols where Apple-style call-site clarity is required.

Skip if: Teams writing internal-only scripts in Swift who do not publish APIs or care about Apple naming conventions for external consumers.

When should I use this skill?

The user asks for Swift API naming review, argument label guidance, or Apple API Design Guidelines compliance during Swift code generation.

What you get

Swift APIs with guideline-compliant argument labels, initializers, and method names readable at call sites without extra docs.

  • Guideline-compliant Swift method signatures
  • Argument label conventions
  • Readable call-site API surfaces

Files

SKILL.mdMarkdownGitHub ↗

Swift API Design Guidelines Skill

Overview

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.

Work Decision Tree

1) Review existing code

  • Inspect declarations and call sites together, not declarations alone.
  • Check naming clarity and fluency (see references/promote-clear-usage.md, references/strive-for-fluent-usage.md).
  • Check argument labels and parameter naming (see references/parameters.md, references/argument-labels.md).
  • Check documentation comments and symbol markup (see references/fundamentals.md).
  • Check conventions and overload safety (see references/general-conventions.md, references/special-instructions.md).

2) Improve existing code

  • Rename APIs that are ambiguous, redundant, or role-unclear.
  • Refactor labels to improve grammatical call-site reading.
  • Replace weakly named parameters with role-based names.
  • Resolve overload sets that become ambiguous with weak typing.
  • Strengthen documentation summaries to describe behavior and returns precisely.

3) Implement new feature

  • Start from use-site examples before finalizing declarations.
  • Choose base names and labels so calls read as clear English phrases.
  • Add defaults only when they simplify common usage.
  • Define mutating/nonmutating pairs with consistent naming.
  • Add concise documentation comments for every new declaration.

Core Guidelines

Fundamentals

  • Clarity at the point of use is the top priority.
  • Clarity is more important than brevity.
  • Every declaration should have a documentation comment.
  • Summaries should state what the declaration does, returns, accesses, creates, or is.
  • Use recognized Swift symbol markup (Parameter, Returns, Throws, Note, etc.).

Promote Clear Usage

  • Include all words needed to avoid ambiguity.
  • Omit needless words, especially type repetition.
  • Name parameters and associated types by role, not type.
  • Add role nouns when type information is weak (Any, NSObject, String, Int).

Strive For Fluent Usage

  • Prefer method names that produce grammatical, readable call sites.
  • Start factory methods with make.
  • Name side-effect-free APIs as noun phrases; side-effecting APIs as imperative verbs.
  • Keep mutating/nonmutating naming pairs consistent (sort/sorted, formUnion/union).
  • Boolean APIs should read as assertions (isEmpty, intersects).

Use Terminology Well

  • Prefer common words unless terms of art are necessary for precision.
  • If using a term of art, preserve its established meaning.
  • Avoid non-standard abbreviations.
  • Embrace established domain precedent when it improves shared understanding.

Conventions, Parameters, And Labels

  • Document complexity for computed properties that are not O(1).
  • Prefer methods/properties to free functions except special cases.
  • Follow Swift casing conventions, including acronym handling.
  • Use parameter names that improve generated documentation readability.
  • Prefer default arguments over method families when semantics are shared.
  • Place defaulted parameters near the end.
  • Apply argument labels based on grammar and meaning, not style preference.

Special Instructions

  • Label tuple members and name closure parameters in public API surfaces.
  • Be explicit with unconstrained polymorphism to avoid overload ambiguity.
  • Align names with semantics shown in documentation comments.

Quick Reference

Name Shape

SituationPreferred Pattern
Mutating verbreverse()
Nonmutating verbreversed() / strippingNewlines()
Nonmutating noun opunion(_:)
Mutating noun opformUnion(_:)
Factory methodmakeWidget(...)
Boolean queryisEmpty, intersects(_:)

Argument Label Rules

SituationRule
Distinguishable unlabeled argsOmit labels only if distinction is still clear
Value-preserving conversion initOmit first label
First arg in prepositional phraseUsually label from the preposition
First arg in grammatical phraseOmit first label
Defaulted argumentsKeep labels (they may be omitted at call sites)
All other argumentsLabel them

Documentation Rules

Declaration KindSummary Should Describe
Function / methodWhat it does and what it returns
SubscriptWhat it accesses
InitializerWhat it creates
Other declarationsWhat it is

Review Checklist

Clarity And Fluency

  • [ ] Call sites are clear without reading implementation details.
  • [ ] Base names include all words needed to remove ambiguity.
  • [ ] Names are concise and avoid repeating type names.
  • [ ] Calls read naturally and grammatically where it matters most.

Naming Semantics

  • [ ] Side-effect-free APIs read as nouns/queries.
  • [ ] Side-effecting APIs read as imperative verbs.
  • [ ] Mutating/nonmutating pairs use consistent naming patterns.
  • [ ] Boolean APIs read as assertions.

Parameters And Labels

  • [ ] Parameter names improve docs and role clarity.
  • [ ] Default parameters simplify common usage.
  • [ ] Defaulted parameters are near the end.
  • [ ] First argument labels follow grammar and conversion rules.
  • [ ] Remaining arguments are labeled unless omission is clearly justified.

Documentation And Conventions

  • [ ] Every declaration has a useful summary comment.
  • [ ] Symbol markup is used where appropriate.
  • [ ] Non-O(1) computed property complexity is documented.
  • [ ] Case conventions and acronym casing follow Swift norms.
  • [ ] Overloads avoid return-type-only distinctions and weak-type ambiguities.

References

  • references/fundamentals.md - Core principles and documentation comment rules
  • references/promote-clear-usage.md - Ambiguity reduction and role-based naming
  • references/strive-for-fluent-usage.md - Fluency, side effects, and mutating pairs
  • references/use-terminology-well.md - Terms of art, abbreviations, and precedent
  • references/general-conventions.md - Complexity docs, free function exceptions, casing, overloads
  • references/parameters.md - Parameter naming and default argument strategy
  • references/argument-labels.md - First-argument and general label rules
  • references/special-instructions.md - Tuple/closure naming and unconstrained polymorphism

Philosophy

  • Prefer clear use-site semantics over declaration cleverness.
  • Follow established Swift conventions before inventing local style rules.
  • Optimize for maintainability and reviewability of public API surfaces.
  • Keep guidance practical: apply the smallest change that improves clarity.

Related skills

How it compares

Pick swift-api-design-guidelines-skill over generic Swift style linters when the task is API surface naming and argument labels, not formatting or access control.

FAQ

What guidelines does swift-api-design-guidelines-skill follow?

swift-api-design-guidelines-skill follows official Apple Swift API Design Guidelines covering argument labels, conversion initializers, and prepositional-phrase naming for readable call sites.

When should Swift argument labels be omitted?

swift-api-design-guidelines-skill says omit labels only when unlabeled arguments cannot be usefully distinguished, as in min(x, y) or value-preserving conversions like Int64(someUInt32).

Who benefits most from this Swift skill?

swift-api-design-guidelines-skill helps developers publishing Swift frameworks or public APIs where Apple-style English call sites reduce the need for supplementary documentation.

Is Swift Api Design Guidelines Skill safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.