{
  "skill_name": "swift-language",
  "evals": [
    {
      "id": 0,
      "prompt": "Modernise this Swift: a validateBooking(_:) function that throws a generic Error, nests three if-let blocks, fills a mutable var label through a switch statement before returning it, and counts invalid seats with seats.filter { !$0.isValid }.count. Keep it plain Swift.",
      "expected_output": "A refactor that uses a typed throw for the single validation error type, guard-based preconditions, a switch expression and count(where:), with no detour into SwiftUI, concurrency or lint setup.",
      "files": [],
      "expectations": [
        "Declares the function with throws(ValidationError) or an equivalently named single error type and shows exhaustive catch handling",
        "Replaces the nested if-let blocks with guard preconditions that exit early",
        "Assigns the label directly from a switch expression instead of a mutable temporary",
        "Uses count(where:) instead of filter followed by count",
        "Does not add SwiftUI views, actors or tasks, or SwiftLint configuration"
      ]
    },
    {
      "id": 1,
      "prompt": "Check these Swift 6.3 changes: we export @c func hashBytes(_ data: UnsafeBufferPointer<UInt8>) -> UInt64 for our C library, annotate a generic sum with @specialize(where T == Int), expect @inline(always) to be only a hint, and resolve a clash between two Logger types with a typealias file.",
      "expected_output": "Corrections for each attribute: a C-compatible @c signature, the official @specialized spelling, the guaranteed-inlining semantics of @inline(always), and module selectors for the name clash.",
      "files": [],
      "expectations": [
        "Rejects UnsafeBufferPointer<UInt8> in a @c signature because it is a Swift struct that C cannot represent, and lists the other Swift-only types that are rejected",
        "Shows a corrected @c function that takes a C-compatible pointer plus a scalar count, optionally with a custom symbol name via @c(Name)",
        "Uses @specialized rather than @specialize or @_specialize",
        "States that @inline(always) guarantees inlining at direct call sites and produces a compile error when inlining is impossible",
        "Resolves the clash with ModuleName::Logger module selectors instead of aliasing"
      ]
    },
    {
      "id": 2,
      "prompt": "For our loyalty module: should the points publisher and a validation helper use Result<Int, Never> and throws(Never)? Also please build the Codable models with snake_case keys and a date strategy, and localize the points balance for each market.",
      "expected_output": "An answer that owns the some/any/Never language questions in full and routes Codable model design and formatting or localization to the sibling skills without implementing them.",
      "files": [],
      "expectations": [
        "Explains Never as uninhabited, bottom-like in expressions, and without implicit conformance to arbitrary protocols",
        "Explains what Result<Int, Never> and throws(Never) mean for callers",
        "Routes Codable models, key strategies and date decoding to swift-codable",
        "Routes number formatting and market display to swift-formatstyle together with a localization review",
        "Does not write full Codable models or formatting implementations for the sibling areas"
      ]
    }
  ]
}
