[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DRJWN7YRY3Y6JJH89ZPM78":3,"skill-same:01M6DRJWN7YRY3Y6JJH89ZPM78":93},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M6DRJWN7YRY3Y6JJH89ZPM78","swift-expert",null,"Builds iOS\u002FmacOS\u002FwatchOS\u002FtvOS applications, implements SwiftUI views and state management, designs protocol-oriented architectures, handles async\u002Fawait concurrency, implements actors for thread safety, and debugs Swift-specific issues. Use when building iOS\u002FmacOS applications with Swift 5.9+, SwiftUI, or async\u002Fawait concurrency. Invoke for protocol-oriented programming, SwiftUI state management, actors, server-side Swift, UIKit integration, Combine, or Vapor.","AntifragileTech\u002Fantifragile-claude-code","AntifragileTech","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F174357194?v=4","01M6DQCYMK4CDSQQAN0ZC72NTV","01M6DQCYS9YPW1WKMQ5TJMPQ43",9,"MIT","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fswift-expert\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"swift expert","expert","swift","concurrency","server-side","async","use","programming","uikit","swiftui","applications","ios","server","integration","issues","state","code","state management","development","github","2026-11-10 10:12:30",false,"---\nname: swift-expert\ndescription: Builds iOS\u002FmacOS\u002FwatchOS\u002FtvOS applications, implements SwiftUI views and state management, designs protocol-oriented architectures, handles async\u002Fawait concurrency, implements actors for thread safety, and debugs Swift-specific issues. Use when building iOS\u002FmacOS applications with Swift 5.9+, SwiftUI, or async\u002Fawait concurrency. Invoke for protocol-oriented programming, SwiftUI state management, actors, server-side Swift, UIKit integration, Combine, or Vapor.\nlicense: MIT\nmetadata:\n  author: https:\u002F\u002Fgithub.com\u002FJeffallan\n  version: \"1.1.0\"\n  domain: language\n  triggers: Swift, SwiftUI, iOS development, macOS development, async\u002Fawait Swift, Combine, UIKit, Vapor\n  role: specialist\n  scope: implementation\n  output-format: code\n  related-skills: \n---\n\n# Swift Expert\n\n## Core Workflow\n\n1. **Architecture Analysis** - Identify platform targets, dependencies, design patterns\n2. **Design Protocols** - Create protocol-first APIs with associated types\n3. **Implement** - Write type-safe code with async\u002Fawait and value semantics\n4. **Optimize** - Profile with Instruments, ensure thread safety\n5. **Test** - Write comprehensive tests with XCTest and async patterns\n\n> **Validation checkpoints:** After step 3, run `swift build` to verify compilation. After step 4, run `swift build -warnings-as-errors` to surface actor isolation and Sendable warnings. After step 5, run `swift test` and confirm all async tests pass.\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| SwiftUI | `references\u002Fswiftui-patterns.md` | Building views, state management, modifiers |\n| Concurrency | `references\u002Fasync-concurrency.md` | async\u002Fawait, actors, structured concurrency |\n| Protocols | `references\u002Fprotocol-oriented.md` | Protocol design, generics, type erasure |\n| Memory | `references\u002Fmemory-performance.md` | ARC, weak\u002Funowned, performance optimization |\n| Testing | `references\u002Ftesting-patterns.md` | XCTest, async tests, mocking strategies |\n\n## Code Patterns\n\n### async\u002Fawait — Correct vs. Incorrect\n\n```swift\n\u002F\u002F ✅ DO: async\u002Fawait with structured error handling\nfunc fetchUser(id: String) async throws -> User {\n    let url = URL(string: \"https:\u002F\u002Fapi.example.com\u002Fusers\u002F\\(id)\")!\n    let (data, _) = try await URLSession.shared.data(from: url)\n    return try JSONDecoder().decode(User.self, from: data)\n}\n\n\u002F\u002F ❌ DON'T: mixing completion handlers with async context\nfunc fetchUser(id: String) async throws -> User {\n    return try await withCheckedThrowingContinuation { continuation in\n        \u002F\u002F Avoid wrapping existing async APIs this way when a native async version exists\n        legacyFetch(id: id) { result in\n            continuation.resume(with: result)\n        }\n    }\n}\n```\n\n### SwiftUI State Management\n\n```swift\n\u002F\u002F ✅ DO: use @Observable (Swift 5.9+) for view models\n@Observable\nfinal class CounterViewModel {\n    var count = 0\n    func increment() { count += 1 }\n}\n\nstruct CounterView: View {\n    @State private var vm = CounterViewModel()\n\n    var body: some View {\n        VStack {\n            Text(\"\\(vm.count)\")\n            Button(\"Increment\", action: vm.increment)\n        }\n    }\n}\n\n\u002F\u002F ❌ DON'T: reach for ObservableObject\u002FPublished when @Observable suffices\nclass LegacyViewModel: ObservableObject {\n    @Published var count = 0  \u002F\u002F Unnecessary boilerplate in Swift 5.9+\n}\n```\n\n### Protocol-Oriented Architecture\n\n```swift\n\u002F\u002F ✅ DO: define capability protocols with associated types\nprotocol Repository\u003CEntity> {\n    associatedtype Entity: Identifiable\n    func fetch(id: Entity.ID) async throws -> Entity\n    func save(_ entity: Entity) async throws\n}\n\nstruct UserRepository: Repository {\n    typealias Entity = User\n    func fetch(id: UUID) async throws -> User { \u002F* … *\u002F }\n    func save(_ user: User) async throws { \u002F* … *\u002F }\n}\n\n\u002F\u002F ❌ DON'T: use classes as base types when a protocol fits\nclass BaseRepository {  \u002F\u002F Avoid class inheritance for shared behavior\n    func fetch(id: UUID) async throws -> Any { fatalError(\"Override required\") }\n}\n```\n\n### Actor for Thread Safety\n\n```swift\n\u002F\u002F ✅ DO: isolate mutable shared state in an actor\nactor ImageCache {\n    private var cache: [URL: UIImage] = [:]\n\n    func image(for url: URL) -> UIImage? { cache[url] }\n    func store(_ image: UIImage, for url: URL) { cache[url] = image }\n}\n\n\u002F\u002F ❌ DON'T: use a class with manual locking\nclass UnsafeImageCache {\n    private var cache: [URL: UIImage] = [:]\n    private let lock = NSLock()  \u002F\u002F Error-prone; prefer actor isolation\n    func image(for url: URL) -> UIImage? {\n        lock.lock(); defer { lock.unlock() }\n        return cache[url]\n    }\n}\n```\n\n## Constraints\n\n### MUST DO\n- Use type hints and inference appropriately\n- Follow Swift API Design Guidelines\n- Use `async\u002Fawait` for asynchronous operations (see pattern above)\n- Ensure `Sendable` compliance for concurrency\n- Use value types (`struct`\u002F`enum`) by default\n- Document APIs with markup comments (`\u002F\u002F\u002F …`)\n- Use property wrappers for cross-cutting concerns\n- Profile with Instruments before optimizing\n\n### MUST NOT DO\n- Use force unwrapping (`!`) without justification\n- Create retain cycles in closures\n- Mix synchronous and asynchronous code improperly\n- Ignore actor isolation warnings\n- Use implicitly unwrapped optionals unnecessarily\n- Skip error handling\n- Use Objective-C patterns when Swift alternatives exist\n- Hardcode platform-specific values\n\n## Output Templates\n\nWhen implementing Swift features, provide:\n1. Protocol definitions and type aliases\n2. Model types (structs\u002Fclasses with value semantics)\n3. View implementations (SwiftUI) or view controllers\n4. Tests demonstrating usage\n5. Brief explanation of architectural decisions\n","# Swift Expert\n\n## Core Workflow\n\n1. **Architecture Analysis** - Identify platform targets, dependencies, design patterns\n2. **Design Protocols** - Create protocol-first APIs with associated types\n3. **Implement** - Write type-safe code with async\u002Fawait and value semantics\n4. **Optimize** - Profile with Instruments, ensure thread safety\n5. **Test** - Write comprehensive tests with XCTest and async patterns\n\n> **Validation checkpoints:** After step 3, run `swift build` to verify compilation. After step 4, run `swift build -warnings-as-errors` to surface actor isolation and Sendable warnings. After step 5, run `swift test` and confirm all async tests pass.\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| SwiftUI | `references\u002Fswiftui-patterns.md` | Building views, state management, modifiers |\n| Concurrency | `references\u002Fasync-concurrency.md` | async\u002Fawait, actors, structured concurrency |\n| Protocols | `references\u002Fprotocol-oriented.md` | Protocol design, generics, type erasure |\n| Memory | `references\u002Fmemory-performance.md` | ARC, weak\u002Funowned, performance optimization |\n| Testing | `references\u002Ftesting-patterns.md` | XCTest, async tests, mocking strategies |\n\n## Code Patterns\n\n### async\u002Fawait — Correct vs. Incorrect\n\n```swift\n\u002F\u002F ✅ DO: async\u002Fawait with structured error handling\nfunc fetchUser(id: String) async throws -> User {\n    let url = URL(string: \"https:\u002F\u002Fapi.example.com\u002Fusers\u002F\\(id)\")!\n    let (data, _) = try await URLSession.shared.data(from: url)\n    return try JSONDecoder().decode(User.self, from: data)\n}\n\n\u002F\u002F ❌ DON'T: mixing completion handlers with async context\nfunc fetchUser(id: String) async throws -> User {\n    return try await withCheckedThrowingContinuation { continuation in\n        \u002F\u002F Avoid wrapping existing async APIs this way when a native async version exists\n        legacyFetch(id: id) { result in\n            continuation.resume(with: result)\n        }\n    }\n}\n```\n\n### SwiftUI State Management\n\n```swift\n\u002F\u002F ✅ DO: use @Observable (Swift 5.9+) for view models\n@Observable\nfinal class CounterViewModel {\n    var count = 0\n    func increment() { count += 1 }\n}\n\nstruct CounterView: View {\n    @State private var vm = CounterViewModel()\n\n    var body: some View {\n        VStack {\n            Text(\"\\(vm.count)\")\n            Button(\"Increment\", action: vm.increment)\n        }\n    }\n}\n\n\u002F\u002F ❌ DON'T: reach for ObservableObject\u002FPublished when @Observable suffices\nclass LegacyViewModel: ObservableObject {\n    @Published var count = 0  \u002F\u002F Unnecessary boilerplate in Swift 5.9+\n}\n```\n\n### Protocol-Oriented Architecture\n\n```swift\n\u002F\u002F ✅ DO: define capability protocols with associated types\nprotocol Repository\u003CEntity> {\n    associatedtype Entity: Identifiable\n    func fetch(id: Entity.ID) async throws -> Entity\n    func save(_ entity: Entity) async throws\n}\n\nstruct UserRepository: Repository {\n    typealias Entity = User\n    func fetch(id: UUID) async throws -> User { \u002F* … *\u002F }\n    func save(_ user: User) async throws { \u002F* … *\u002F }\n}\n\n\u002F\u002F ❌ DON'T: use classes as base types when a protocol fits\nclass BaseRepository {  \u002F\u002F Avoid class inheritance for shared behavior\n    func fetch(id: UUID) async throws -> Any { fatalError(\"Override required\") }\n}\n```\n\n### Actor for Thread Safety\n\n```swift\n\u002F\u002F ✅ DO: isolate mutable shared state in an actor\nactor ImageCache {\n    private var cache: [URL: UIImage] = [:]\n\n    func image(for url: URL) -> UIImage? { cache[url] }\n    func store(_ image: UIImage, for url: URL) { cache[url] = image }\n}\n\n\u002F\u002F ❌ DON'T: use a class with manual locking\nclass UnsafeImageCache {\n    private var cache: [URL: UIImage] = [:]\n    private let lock = NSLock()  \u002F\u002F Error-prone; prefer actor isolation\n    func image(for url: URL) -> UIImage? {\n        lock.lock(); defer { lock.unlock() }\n        return cache[url]\n    }\n}\n```\n\n## Constraints\n\n### MUST DO\n- Use type hints and inference appropriately\n- Follow Swift API Design Guidelines\n- Use `async\u002Fawait` for asynchronous operations (see pattern above)\n- Ensure `Sendable` compliance for concurrency\n- Use value types (`struct`\u002F`enum`) by default\n- Document APIs with markup comments (`\u002F\u002F\u002F …`)\n- Use property wrappers for cross-cutting concerns\n- Profile with Instruments before optimizing\n\n### MUST NOT DO\n- Use force unwrapping (`!`) without justification\n- Create retain cycles in closures\n- Mix synchronous and asynchronous code improperly\n- Ignore actor isolation warnings\n- Use implicitly unwrapped optionals unnecessarily\n- Skip error handling\n- Use Objective-C patterns when Swift alternatives exist\n- Hardcode platform-specific values\n\n## Output Templates\n\nWhen implementing Swift features, provide:\n1. Protocol definitions and type aliases\n2. Model types (structs\u002Fclasses with value semantics)\n3. View implementations (SwiftUI) or view controllers\n4. Tests demonstrating usage\n5. Brief explanation of architectural decisions\n",{"name":5,"license":14,"metadata":43,"description":7},{"role":44,"scope":45,"author":46,"domain":47,"version":48,"triggers":49,"output-format":34,"related-skills":6},"specialist","implementation","https:\u002F\u002Fgithub.com\u002FJeffallan","language","1.1.0","Swift, SwiftUI, iOS development, macOS development, async\u002Fawait Swift, Combine, UIKit, Vapor","master","c73386b305dec167db7654e0e6feacb462d4f9dc","assets\u002Fskills\u002Fdev\u002Fswift-expert",1,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code","https:\u002F\u002Fgithub.com\u002FAntifragileTech","2026-10-02 14:22:14",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add AntifragileTech\u002Fantifragile-claude-code --skill swift-expert",{"tool":63,"command":64},"bunx","bunx skills add AntifragileTech\u002Fantifragile-claude-code --skill swift-expert",{"tool":66,"command":67},"pnpm","pnpm dlx skills add AntifragileTech\u002Fantifragile-claude-code --skill swift-expert","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fswift-expert\u002FSKILL.md",true,[71,77,81,85,89],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fasync-concurrency.md","REFERENCE","参考文档",8467,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fswift-expert\u002Freferences\u002Fasync-concurrency.md",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fmemory-performance.md",8256,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fswift-expert\u002Freferences\u002Fmemory-performance.md",{"path":82,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fprotocol-oriented.md",7360,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fswift-expert\u002Freferences\u002Fprotocol-oriented.md",{"path":86,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fswiftui-patterns.md",6806,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fswift-expert\u002Freferences\u002Fswiftui-patterns.md",{"path":90,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Ftesting-patterns.md",9056,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fswift-expert\u002Freferences\u002Ftesting-patterns.md",[94,106,118,131,144,157],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":38},"01M6DT9Q6VYA615SCXR757TZZ7","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-skills\u002FSKILL.md",[],[101,102,24,103,104,105],"writing skills","writing","editing","work","deployment",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":38},"01M6DT9GFHDNY90P41WGAE1TV0","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-plans\u002FSKILL.md",[],[113,114,102,115,116,24,34,117],"plans","writing plans","requirements","task","spec",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":38},"01M6DT9C6PFGD86WS3HY7YE3XG","docs:write-concisely","Apply writing rules to any documentation that humans will read. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwrite-concisely\u002FSKILL.md",[],[125,126,127,128,129,130,102],"docs:write concisely","write","docs","read","Rules","documentation",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":38},"01M6DT98AWQ27P0N1CG97WAG66","kaizen:why","Iterative Five Whys root cause analysis drilling from symptoms to fundamentals","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwhy\u002FSKILL.md",[],[133,138,139,140,141,142,143],"why","kaizen","issue","five whys","analysis","root cause analysis",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":38},"01M6DT93EH25NAX19R3WGE1P53","verification-loop","A comprehensive verification system for Claude Code sessions.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-loop\u002FSKILL.md",[],[151,152,153,154,34,155,156],"verification loop","verification","loop","sessions","claude code sessions","system",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":38},"01M6DT90GW7Z7VCN98P9DVYSNC","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-before-completion\u002FSKILL.md",[],[164,152,165,104,24,166,167,168],"verification before completion","commands","evidence","claim","complete"]