[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71A1SJWSSEWGWHQD1Z3N9H8":3,"skill-same:01M71A1SJWSSEWGWHQD1Z3N9H8":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":14,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":46,"install":47,"resources":60},"01M71A1SJWSSEWGWHQD1Z3N9H8","swift-concurrency-expert",null,"Review and fix Swift concurrency issues such as actor isolation and Sendable violations.","sapsapshen\u002Fai-memory-router","sapsapshen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20347959?v=4","01M6XDQEF1DP50DKF37H81J3J5","shenmian","01M6XDQEJPE41Y3DT2763X8ZJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fswift-concurrency-expert\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"swift","concurrency","swift concurrency expert","swift concurrency","expert","concurrency expert","review","safe","issues","fix","review and fix","isolation","as","2026","actor","2026-11-10 10:12:30",false,"---\nname: swift-concurrency-expert\ndescription: Review and fix Swift concurrency issues such as actor isolation and Sendable violations.\nrisk: safe\nsource: \"Dimillian\u002FSkills (MIT)\"\ndate_added: \"2026-03-25\"\n---\n\n# Swift Concurrency Expert\n\n## Overview\n\nReview and fix Swift Concurrency issues in Swift 6.2+ codebases by applying actor isolation, Sendable safety, and modern concurrency patterns with minimal behavior changes.\n\n## When to Use\n\n- When the user asks to review Swift concurrency usage or fix compiler diagnostics.\n- When you need guidance on actor isolation, `Sendable`, `@MainActor`, or async migration.\n\n## Workflow\n\n### 1. Triage the issue\n\n- Capture the exact compiler diagnostics and the offending symbol(s).\n- Check project concurrency settings: Swift language version (6.2+), strict concurrency level, and whether approachable concurrency (default actor isolation \u002F main-actor-by-default) is enabled.\n- Identify the current actor context (`@MainActor`, `actor`, `nonisolated`) and whether a default actor isolation mode is enabled.\n- Confirm whether the code is UI-bound or intended to run off the main actor.\n\n### 2. Apply the smallest safe fix\n\nPrefer edits that preserve existing behavior while satisfying data-race safety.\n\nCommon fixes:\n- **UI-bound types**: annotate the type or relevant members with `@MainActor`.\n- **Protocol conformance on main actor types**: make the conformance isolated (e.g., `extension Foo: @MainActor SomeProtocol`).\n- **Global\u002Fstatic state**: protect with `@MainActor` or move into an actor.\n- **Background work**: move expensive work into a `@concurrent` async function on a `nonisolated` type or use an `actor` to guard mutable state.\n- **Sendable errors**: prefer immutable\u002Fvalue types; add `Sendable` conformance only when correct; avoid `@unchecked Sendable` unless you can prove thread safety.\n\n### 3. Verify the fix\n\n- Rebuild and confirm all concurrency diagnostics are resolved with no new warnings introduced.\n- Run the test suite to check for regressions — concurrency changes can introduce subtle runtime issues even when the build is clean.\n- If the fix surfaces new warnings, treat each one as a fresh triage (return to step 1) and resolve iteratively until the build is clean and tests pass.\n\n### Examples\n\n**UI-bound type — adding `@MainActor`**\n\n```swift\n\u002F\u002F Before: data-race warning because ViewModel is accessed from the main thread\n\u002F\u002F but has no actor isolation\nclass ViewModel: ObservableObject {\n    @Published var title: String = \"\"\n    func load() { title = \"Loaded\" }\n}\n\n\u002F\u002F After: annotate the whole type so all stored state and methods are\n\u002F\u002F automatically isolated to the main actor\n@MainActor\nclass ViewModel: ObservableObject {\n    @Published var title: String = \"\"\n    func load() { title = \"Loaded\" }\n}\n```\n\n**Protocol conformance isolation**\n\n```swift\n\u002F\u002F Before: compiler error — SomeProtocol method is nonisolated but the\n\u002F\u002F conforming type is @MainActor\n@MainActor\nclass Foo: SomeProtocol {\n    func protocolMethod() { \u002F* accesses main-actor state *\u002F }\n}\n\n\u002F\u002F After: scope the conformance to @MainActor so the requirement is\n\u002F\u002F satisfied inside the correct isolation context\n@MainActor\nextension Foo: SomeProtocol {\n    func protocolMethod() { \u002F* safely accesses main-actor state *\u002F }\n}\n```\n\n**Background work with `@concurrent`**\n\n```swift\n\u002F\u002F Before: expensive computation blocks the main actor\n@MainActor\nfunc processData(_ input: [Int]) -> [Int] {\n    input.map { heavyTransform($0) }   \u002F\u002F runs on main thread\n}\n\n\u002F\u002F After: hop off the main actor for the heavy work, then return the result\n\u002F\u002F The caller awaits the result and stays on its own actor\nnonisolated func processData(_ input: [Int]) async -> [Int] {\n    await Task.detached(priority: .userInitiated) {\n        input.map { heavyTransform($0) }\n    }.value\n}\n\n\u002F\u002F Or, using a @concurrent async function (Swift 6.2+):\n@concurrent\nfunc processData(_ input: [Int]) async -> [Int] {\n    input.map { heavyTransform($0) }\n}\n```\n\n## Reference material\n\n- See `references\u002Fswift-6-2-concurrency.md` for Swift 6.2 changes, patterns, and examples.\n- See `references\u002Fapproachable-concurrency.md` when the project is opted into approachable concurrency mode.\n- See `references\u002Fswiftui-concurrency-tour-wwdc.md` for SwiftUI-specific concurrency guidance.\n","# Swift Concurrency Expert\n\n## Overview\n\nReview and fix Swift Concurrency issues in Swift 6.2+ codebases by applying actor isolation, Sendable safety, and modern concurrency patterns with minimal behavior changes.\n\n## When to Use\n\n- When the user asks to review Swift concurrency usage or fix compiler diagnostics.\n- When you need guidance on actor isolation, `Sendable`, `@MainActor`, or async migration.\n\n## Workflow\n\n### 1. Triage the issue\n\n- Capture the exact compiler diagnostics and the offending symbol(s).\n- Check project concurrency settings: Swift language version (6.2+), strict concurrency level, and whether approachable concurrency (default actor isolation \u002F main-actor-by-default) is enabled.\n- Identify the current actor context (`@MainActor`, `actor`, `nonisolated`) and whether a default actor isolation mode is enabled.\n- Confirm whether the code is UI-bound or intended to run off the main actor.\n\n### 2. Apply the smallest safe fix\n\nPrefer edits that preserve existing behavior while satisfying data-race safety.\n\nCommon fixes:\n- **UI-bound types**: annotate the type or relevant members with `@MainActor`.\n- **Protocol conformance on main actor types**: make the conformance isolated (e.g., `extension Foo: @MainActor SomeProtocol`).\n- **Global\u002Fstatic state**: protect with `@MainActor` or move into an actor.\n- **Background work**: move expensive work into a `@concurrent` async function on a `nonisolated` type or use an `actor` to guard mutable state.\n- **Sendable errors**: prefer immutable\u002Fvalue types; add `Sendable` conformance only when correct; avoid `@unchecked Sendable` unless you can prove thread safety.\n\n### 3. Verify the fix\n\n- Rebuild and confirm all concurrency diagnostics are resolved with no new warnings introduced.\n- Run the test suite to check for regressions — concurrency changes can introduce subtle runtime issues even when the build is clean.\n- If the fix surfaces new warnings, treat each one as a fresh triage (return to step 1) and resolve iteratively until the build is clean and tests pass.\n\n### Examples\n\n**UI-bound type — adding `@MainActor`**\n\n```swift\n\u002F\u002F Before: data-race warning because ViewModel is accessed from the main thread\n\u002F\u002F but has no actor isolation\nclass ViewModel: ObservableObject {\n    @Published var title: String = \"\"\n    func load() { title = \"Loaded\" }\n}\n\n\u002F\u002F After: annotate the whole type so all stored state and methods are\n\u002F\u002F automatically isolated to the main actor\n@MainActor\nclass ViewModel: ObservableObject {\n    @Published var title: String = \"\"\n    func load() { title = \"Loaded\" }\n}\n```\n\n**Protocol conformance isolation**\n\n```swift\n\u002F\u002F Before: compiler error — SomeProtocol method is nonisolated but the\n\u002F\u002F conforming type is @MainActor\n@MainActor\nclass Foo: SomeProtocol {\n    func protocolMethod() { \u002F* accesses main-actor state *\u002F }\n}\n\n\u002F\u002F After: scope the conformance to @MainActor so the requirement is\n\u002F\u002F satisfied inside the correct isolation context\n@MainActor\nextension Foo: SomeProtocol {\n    func protocolMethod() { \u002F* safely accesses main-actor state *\u002F }\n}\n```\n\n**Background work with `@concurrent`**\n\n```swift\n\u002F\u002F Before: expensive computation blocks the main actor\n@MainActor\nfunc processData(_ input: [Int]) -> [Int] {\n    input.map { heavyTransform($0) }   \u002F\u002F runs on main thread\n}\n\n\u002F\u002F After: hop off the main actor for the heavy work, then return the result\n\u002F\u002F The caller awaits the result and stays on its own actor\nnonisolated func processData(_ input: [Int]) async -> [Int] {\n    await Task.detached(priority: .userInitiated) {\n        input.map { heavyTransform($0) }\n    }.value\n}\n\n\u002F\u002F Or, using a @concurrent async function (Swift 6.2+):\n@concurrent\nfunc processData(_ input: [Int]) async -> [Int] {\n    input.map { heavyTransform($0) }\n}\n```\n\n## Reference material\n\n- See `references\u002Fswift-6-2-concurrency.md` for Swift 6.2 changes, patterns, and examples.\n- See `references\u002Fapproachable-concurrency.md` when the project is opted into approachable concurrency mode.\n- See `references\u002Fswiftui-concurrency-tour-wwdc.md` for SwiftUI-specific concurrency guidance.\n",{"name":5,"risk":26,"source":39,"date_added":40,"description":7},"Dimillian\u002FSkills (MIT)","2026-03-25","main","7a38d8e7073e61c16eda85681cb32fb68a8657a5","skills-store\u002Fglobal\u002Fswift-concurrency-expert","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router","https:\u002F\u002Fgithub.com\u002Fsapsapshen","2026-04-14 21:12:12",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add sapsapshen\u002Fai-memory-router --skill swift-concurrency-expert",{"tool":53,"command":54},"bunx","bunx skills add sapsapshen\u002Fai-memory-router --skill swift-concurrency-expert",{"tool":56,"command":57},"pnpm","pnpm dlx skills add sapsapshen\u002Fai-memory-router --skill swift-concurrency-expert","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fswift-concurrency-expert\u002FSKILL.md",true,[61,67,71,75],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"agents\u002Fopenai.yaml","REFERENCE","参考文档",243,"https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fswift-concurrency-expert\u002Fagents\u002Fopenai.yaml",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fapproachable-concurrency.md",2471,"https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fswift-concurrency-expert\u002Freferences\u002Fapproachable-concurrency.md",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fswift-6-2-concurrency.md",10673,"https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fswift-concurrency-expert\u002Freferences\u002Fswift-6-2-concurrency.md",{"path":76,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fswiftui-concurrency-tour-wwdc.md",1645,"https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fswift-concurrency-expert\u002Freferences\u002Fswiftui-concurrency-tour-wwdc.md",[80,90,97,105,111,119],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":85,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":89},"01M72R8PZX1ABFHJGTYPA4CAF1","webapp-testing","To test local web applications, write native Python Playwright scripts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fwebapp-testing\u002FSKILL.md",[],[],"2026-11-10 22:39:42",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":89},"01M72QG37MMZNDY7X7GXPAK5W6","python-packaging","Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fpython-packaging\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":89},"01M72NXR0QMP9G46TW6A2DH59C","canvas-design","These are instructions for creating design philosophies - aesthetic movements that are then EXPRESSED VISUALLY. Output only .md files, .pdf files, and .png files.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fcanvas-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fcanvas-design\u002FSKILL.md",[],[],{"skillNo":106,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":107,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":89},"01M72N55TK3EEQ4QK4AWDC2KZS","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":89},"01M72MTWC150CFAP4Y5GSNKF80","slack-gif-creator","A toolkit providing utilities and knowledge for creating animated GIFs optimized for Slack.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fslack-gif-creator\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":89},"01M72KPT3VVNSP88MNAY466TZT","frontend-design","You are a frontend designer-engineer, not a layout generator.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Ffrontend-design\u002FSKILL.md",[],[]]