SuperAPI AI Directory

apple-swift

General & other

View repository

Updated 10-16 09:54

About this skill

Apple Swift Reference

A skill covering the Swift official documentation's Standard Library, Concurrency, Protocols/Generics, and Observation. Depending on the user's task, read the appropriate README.md, then follow it to the individual files.

Directory Structure

skills/apple-swift/
  SKILL.md
  references/
    standard-library/
      README.md
      int.md
      double.md
      float.md
      bool.md
      string.md
      character.md
      substring.md
      unicode.md
      array.md
      dictionary.md
      set.md
      range.md
      contiguous-array.md
      optional.md
      result.md
      keypath.md
    concurrency/
      README.md
      task.md
      taskgroup.md
      throwingtaskgroup.md
      withtaskgroup.md
      withthrowingtaskgroup.md
      taskpriority.md
      tasklocal.md
      actor.md
      mainactor.md
      globalactor.md
      sendable.md
      asyncsequence.md
      asyncstream.md
      asyncthrowingstream.md
      checkedcontinuation.md
      withcheckedcontinuation.md
      discardingtaskgroup.md
      throwingdiscardingtaskgroup.md
      withdiscardingtaskgroup.md
      withthrowingdiscardingtaskgroup.md
      clock.md
      duration.md
      instantprotocol.md
      continuousclock.md
      suspendingclock.md
      taskexecutor.md
    protocols-generics/
      README.md
      equatable.md
      hashable.md
      comparable.md
      identifiable.md
      codable.md
      encodable.md
      decodable.md
      caseiterable.md
      rawrepresentable.md
      sequence.md
      collection.md
      iteratorprotocol.md
      customstringconvertible.md
      error.md
      expressiblebyliteral.md
      generics.md
      some-any-opaque-types.md
    observation/
      README.md
      observable-protocol.md
      observable-macro.md
      observationignored.md
      observationtracked.md
      observationregistrar.md
      withobservationtracking.md

Exploration Procedure

Derive the category from the task, and identify the target page in the category's README.md:

  1. Find the category corresponding to the task in the mapping table below
  2. in that category references/{category}/README.md to identify the target page
  3. Read the .md of the corresponding page to check the details

Task → Category Mapping

Task Category Reference README
Want to use the numeric types Int / Double / Float / Bool standard-library references/standard-library/README.md
Want to handle String / Character / Substring / Unicode standard-library references/standard-library/README.md
Want to use Array / Dictionary / Set / Range / ContiguousArray standard-library references/standard-library/README.md
Want to check the APIs of Optional / Result / KeyPath standard-library references/standard-library/README.md
Want to write asynchronous processing with async / await / Task concurrency references/concurrency/README.md
Want to prevent data races with actor / MainActor / GlobalActor concurrency references/concurrency/README.md
Want to structure parallel processing with TaskGroup / withTaskGroup concurrency references/concurrency/README.md
Want to use AsyncSequence / AsyncStream / for await in concurrency references/concurrency/README.md
Want to conform to Sendable and bridge callback APIs to async concurrency references/concurrency/README.md
Want to use TaskLocal / TaskPriority concurrency references/concurrency/README.md
Want to structure child tasks that discard results with DiscardingTaskGroup / withDiscardingTaskGroup concurrency references/concurrency/README.md
Want to handle time measurement and sleeping with Clock / Duration / InstantProtocol / ContinuousClock / SuspendingClock concurrency references/concurrency/README.md
Want to specify the execution destination of a task with TaskExecutor concurrency references/concurrency/README.md
Want to make a type conform to Equatable / Hashable / Comparable protocols-generics references/protocols-generics/README.md
Want to serialize JSON with Codable / Encodable / Decodable protocols-generics references/protocols-generics/README.md
Want to use Identifiable / CaseIterable / RawRepresentable protocols-generics references/protocols-generics/README.md
Want to implement Sequence / Collection / IteratorProtocol protocols-generics references/protocols-generics/README.md
Want to write generic functions, types, associatedtype, and where clauses protocols-generics references/protocols-generics/README.md
Want to use some / any opaque types and existential protocols-generics references/protocols-generics/README.md
Want to define custom errors with the Error protocol protocols-generics references/protocols-generics/README.md
Want to link state with SwiftUI / UIKit using the @Observable macro observation references/observation/README.md
Want to manually conform to the Observable protocol observation references/observation/README.md
Want to set a property as not tracked using @ObservationIgnored observation references/observation/README.md
Want to receive change notifications with withObservationTracking observation references/observation/README.md