界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

ios-chaos-monkey

ios-chaos-monkey

【数据与研究】Crash-hunter skill for iOS 26 / Swift 6.2 clinic-architecture codebases that finds and fixes concurrency, memory, and I/O bugs using TDD. Covers data races, actor isolation, retain cycles, SwiftData context misuse, and sync-related failures in Domain/Data/App boundaries. Use when debugging crashes or hard-to-reproduce failures in ios-* and swift-* cl…

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: ios-chaos-monkey description: Crash-hunter skill for iOS 26 / Swift 6.2 clinic-architecture codebases that finds and fixes concurrency, memory, and I/O bugs using TDD. Covers data races, actor isolation, retain cycles, SwiftData context misuse, and sync-related failures in Domain/Data/App boundaries. Use when debugging crashes or hard-to-reproduce failures in ios-* and swift-* clinic modules.

iOS Chaos Monkey — Crash-Hunter Best Practices

Adversarial crash-hunting guide for iOS and Swift applications. Contains 47 rules across 8 categories, prioritized by crash severity. Every rule follows TDD: dangerous code first, a failing test that proves the bug, then the fix that makes the test pass.

Clinic Architecture Contract (iOS 26 / Swift 6.2)

All guidance in this skill assumes the clinic modular MVVM-C architecture:

  • Feature modules import Domain + DesignSystem only (never Data, never sibling features)
  • App target is the convergence point and owns DependencyContainer, concrete coordinators, and Route Shell wiring
  • Domain stays pure Swift and defines models plus repository, *Coordinating, ErrorRouting, and AppError contracts
  • Data owns SwiftData/network/sync/retry/background I/O and implements Domain protocols
  • Read/write flow defaults to stale-while-revalidate reads and optimistic queued writes
  • ViewModels call repository protocols directly (no default use-case/interactor layer)

When to Apply

Reference these guidelines when:

  • Hunting data races, deadlocks, and concurrency crashes in Swift
  • Auditing memory management for retain cycles and use-after-free
  • Reviewing async/await code for cancellation and continuation leaks
  • Stress-testing file I/O and CoreData/SwiftData persistence layers
  • Writing proof-of-crash tests before implementing fixes

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Data Races & Thread SafetyCRITICALrace-
2Memory Corruption & LeaksCRITICALmem-
3Deadlocks & Thread StarvationHIGHdead-
4Async/Await & Structured ConcurrencyHIGHasync-
5File I/O & Persistence CorruptionMEDIUM-HIGHio-
6Collection & State MutationMEDIUMmut-
7Resource ExhaustionMEDIUMexhaust-
8Objective-C Interop TrapsLOW-MEDIUMobjc-

Quick Reference

1. Data Races & Thread Safety (CRITICAL)

2. Memory Corruption & Leaks (CRITICAL)

3. Deadlocks & Thread Starvation (HIGH)

4. Async/Await & Structured Concurrency (HIGH)

5. File I/O & Persistence Corruption (MEDIUM-HIGH)

6. Collection & State Mutation (MEDIUM)

7. Resource Exhaustion (MEDIUM)

8. Objective-C Interop Traps (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information
我的收藏