axiom-ios-concurrency by charleswiltgen/axiom
npx skills add https://github.com/charleswiltgen/axiom --skill axiom-ios-concurrency处理任何并发、async/await、线程或 Swift 6 并发工作时,您必须使用此技能。
在以下情况下使用此路由:
ios-concurrency 与 ios-performance:当应用冻结或感觉缓慢时:
ios-concurrency 与 ios-build:当遇到 Swift 6 并发错误时:
ios-concurrency 与 ios-data:当并发错误涉及 Core Data 或 SwiftData 时:
:数据加载期间的 2 秒冻结几乎总是由于主线程上的 或缺少后台调度。领域知识比时间性能分析器能更快地解决此问题。Core Data 线程违规需要 Core Data 特定的修复,而非通用的并发模式。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
awaitSwift 6 并发模式 → /skill axiom-swift-concurrency
Swift 并发 API 参考 → /skill axiom-swift-concurrency-ref
Swift 性能 → /skill axiom-swift-performance
同步参与者访问 → /skill axiom-assume-isolated
线程安全原语 → /skill axiom-synchronization
参数所有权 → /skill axiom-ownership-conventions
并发性能分析 → /skill axiom-concurrency-profiling
Combine 响应式模式 → /skill axiom-combine-patterns
并发审计 → 启动 concurrency-auditor 代理或使用 /axiom:audit concurrency(Swift 6 严格并发违规、不安全的 Task 捕获、缺少 @MainActor、Sendable 违规、参与者隔离问题)
| 想法 | 现实 |
|---|---|
| “只需添加 @MainActor 就能工作” | @MainActor 有隔离继承规则。swift-concurrency 涵盖了所有模式。 |
| “我会用 nonisolated(unsafe) 来消除警告” | 消除警告会隐藏数据竞争。swift-concurrency 展示了安全模式。 |
| “这只是一个异步调用” | 即使是单个异步调用也有取消和隔离的影响。swift-concurrency 涵盖了这些。 |
| “我知道参与者如何工作” | 参与者的可重入性和隔离规则在 Swift 6.2 中发生了变化。swift-concurrency 是最新的。 |
| “我稍后再修复 Sendable 警告” | Sendable 违规会导致运行时崩溃。swift-concurrency 现在就能正确修复它们。 |
| “Combine 已死,只用 async/await” | Combine 没有弃用通知。重写正常工作的管道会浪费时间并引入错误。combine-patterns 涵盖了增量迁移。 |
Swift 6 并发(swift-concurrency):
Swift 性能(swift-performance):
用户:“我在 Swift 6 中遇到‘数据竞争’错误” → 调用:/skill axiom-swift-concurrency
用户:“如何正确使用 @MainActor?” → 调用:/skill axiom-swift-concurrency
用户:“我的应用因不必要的复制而变慢” → 调用:/skill axiom-swift-performance
用户:“我应该对这个网络调用使用 async/await 吗?” → 调用:/skill axiom-swift-concurrency
用户:“如何使用 assumeIsolated?” → 调用:/skill axiom-assume-isolated
用户:“我的委托回调在主线程上运行,如何访问 MainActor 状态?” → 调用:/skill axiom-assume-isolated
用户:“我应该使用互斥锁还是参与者?” → 调用:/skill axiom-synchronization
用户:“os_unfair_lock 和 OSAllocatedUnfairLock 有什么区别?” → 调用:/skill axiom-synchronization
用户:“Swift 中的 borrowing 是做什么的?” → 调用:/skill axiom-ownership-conventions
用户:“如何使用 ~Copyable 类型?” → 调用:/skill axiom-ownership-conventions
用户:“我的异步代码很慢,如何分析它?” → 调用:/skill axiom-concurrency-profiling
用户:“我认为存在参与者争用,如何诊断?” → 调用:/skill axiom-concurrency-profiling
用户:“我的 Core Data 保存因后台任务而丢失数据” → 路由到:ios-data 路由(Core Data 线程是框架特定的)
用户:“如何创建 TaskGroup?” → 调用:/skill axiom-swift-concurrency-ref
用户:“AsyncStream API 是什么?” → 调用:/skill axiom-swift-concurrency-ref
用户:“如何创建自定义全局参与者?” → 调用:/skill axiom-swift-concurrency-ref
用户:“如何将完成处理程序转换为异步?” → 调用:/skill axiom-swift-concurrency-ref
用户:“参与者的可重入性规则是什么?” → 调用:/skill axiom-swift-concurrency-ref
用户:“我的 Combine 管道静默停止产生值” → 调用:/skill axiom-combine-patterns
用户:“我应该对这个数据流使用 Combine 还是 async/await?” → 调用:/skill axiom-combine-patterns
用户:“如何将 Combine 发布者桥接到 async/await 代码中?” → 调用:/skill axiom-combine-patterns
用户:“AnyCancellable 正在泄漏内存” → 调用:/skill axiom-combine-patterns
用户:“检查我的代码是否存在 Swift 6 并发问题” → 调用:concurrency-auditor 代理
每周安装量
169
仓库
GitHub 星标数
674
首次出现
2026年1月21日
安全审计
安装于
opencode150
codex145
gemini-cli142
cursor137
github-copilot136
claude-code136
You MUST use this skill for ANY concurrency, async/await, threading, or Swift 6 concurrency work.
Use this router when:
ios-concurrency vs ios-performance : When app freezes or feels slow:
ios-concurrency vs ios-build : When seeing Swift 6 concurrency errors:
ios-concurrency vs ios-data : When concurrency errors involve Core Data or SwiftData:
Rationale : A 2-second freeze during data loading is almost always await on main thread or missing background dispatch. Domain knowledge solves this faster than Time Profiler. Core Data threading violations need Core Data-specific fixes, not generic concurrency patterns.
Swift 6 concurrency patterns → /skill axiom-swift-concurrency
Swift concurrency API reference → /skill axiom-swift-concurrency-ref
Swift performance → /skill axiom-swift-performance
Synchronous actor access → /skill axiom-assume-isolated
Thread-safe primitives → /skill axiom-synchronization
Parameter ownership → /skill axiom-ownership-conventions
Concurrency profiling → /skill axiom-concurrency-profiling
Combine reactive patterns → /skill axiom-combine-patterns
Concurrency audit → Launch concurrency-auditor agent or /axiom:audit concurrency (Swift 6 strict concurrency violations, unsafe Task captures, missing @MainActor, Sendable violations, actor isolation problems)
| Thought | Reality |
|---|---|
| "Just add @MainActor and it'll work" | @MainActor has isolation inheritance rules. swift-concurrency covers all patterns. |
| "I'll use nonisolated(unsafe) to silence the warning" | Silencing warnings hides data races. swift-concurrency shows the safe pattern. |
| "It's just one async call" | Even single async calls have cancellation and isolation implications. swift-concurrency covers them. |
| "I know how actors work" | Actor reentrancy and isolation rules changed in Swift 6.2. swift-concurrency is current. |
| "I'll fix the Sendable warnings later" | Sendable violations cause runtime crashes. swift-concurrency fixes them correctly now. |
| "Combine is dead, just use async/await" | Combine has no deprecation notice. Rewriting working pipelines wastes time and introduces bugs. combine-patterns covers incremental migration. |
Swift 6 Concurrency (swift-concurrency):
Swift Performance (swift-performance):
User: "I'm getting 'data race' errors in Swift 6" → Invoke: /skill axiom-swift-concurrency
User: "How do I use @MainActor correctly?" → Invoke: /skill axiom-swift-concurrency
User: "My app is slow due to unnecessary copying" → Invoke: /skill axiom-swift-performance
User: "Should I use async/await for this network call?" → Invoke: /skill axiom-swift-concurrency
User: "How do I use assumeIsolated?" → Invoke: /skill axiom-assume-isolated
User: "My delegate callback runs on main thread, how do I access MainActor state?" → Invoke: /skill axiom-assume-isolated
User: "Should I use Mutex or actor?" → Invoke: /skill axiom-synchronization
User: "What's the difference between os_unfair_lock and OSAllocatedUnfairLock?" → Invoke: /skill axiom-synchronization
User: "What does borrowing do in Swift?" → Invoke: /skill axiom-ownership-conventions
User: "How do I use ~Copyable types?" → Invoke: /skill axiom-ownership-conventions
User: "My async code is slow, how do I profile it?" → Invoke: /skill axiom-concurrency-profiling
User: "I think I have actor contention, how do I diagnose it?" → Invoke: /skill axiom-concurrency-profiling
User: "My Core Data saves lose data from background tasks" → Route to: ios-data router (Core Data threading is framework-specific)
User: "How do I create a TaskGroup?" → Invoke: /skill axiom-swift-concurrency-ref
User: "What's the AsyncStream API?" → Invoke: /skill axiom-swift-concurrency-ref
User: "How do I create a custom global actor?" → Invoke: /skill axiom-swift-concurrency-ref
User: "How do I convert a completion handler to async?" → Invoke: /skill axiom-swift-concurrency-ref
User: "What are the actor reentrancy rules?" → Invoke: /skill axiom-swift-concurrency-ref
User: "My Combine pipeline silently stopped producing values" → Invoke: /skill axiom-combine-patterns
User: "Should I use Combine or async/await for this data flow?" → Invoke: /skill axiom-combine-patterns
User: "How do I bridge a Combine publisher into async/await code?" → Invoke: /skill axiom-combine-patterns
User: "AnyCancellable is leaking memory" → Invoke: /skill axiom-combine-patterns
User: "Check my code for Swift 6 concurrency issues" → Invoke: concurrency-auditor agent
Weekly Installs
169
Repository
GitHub Stars
674
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode150
codex145
gemini-cli142
cursor137
github-copilot136
claude-code136
ESLint迁移到Oxlint完整指南:JavaScript/TypeScript项目性能优化工具
1,600 周安装