mcpField
I
ios-chaos-monkey

ios-chaos-monkey

github.com/pproencaTesting & quality218264 installsUpdated 11w ago
Repository

About ios-chaos-monkey

ios-chaos-monkey is a crash-hunting guidance skill for iOS and Swift developers. Its prioritized rules cover concurrency, memory, persistence, and other runtime risks, using a test-first process that proves a crash before applying a fix.

Key features

  1. 01Prioritized crash-risk rules
  2. 02Concurrency and data-race checks
  3. 03Memory and deadlock guidance
  4. 04Async task and cancellation checks
  5. 05Persistence and file I/O risks
  6. 06Test-first proof-of-crash workflow

Use cases

  1. 01Auditing Swift concurrency for data races
  2. 02Checking async code for cancellation and continuation leaks
  3. 03Testing persistence and file I/O failure risks
  4. 04Writing failing crash tests before fixes

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill ios-chaos-monkey

After installing, type/ios-chaos-monkeyin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

metadata.json
assets/templates/
_template.md
references/
_sections.md
async-actor-hop-starvation.md
async-continuation-leak.md
async-detached-task-leak.md
async-missing-cancellation.md
async-task-group-error.md
async-unsafe-sendable.md
dead-actor-reentrancy.md
dead-mainactor-blocking.md
dead-queue-hierarchy.md
dead-recursive-lock.md
dead-semaphore-in-async.md
dead-sync-on-main.md
exhaust-file-descriptor-leak.md
exhaust-memory-warning-ignored.md
exhaust-thread-explosion.md
exhaust-unbounded-task-spawn.md
exhaust-urlsession-leak.md
io-concurrent-file-write.md
io-coredata-cross-thread.md
io-filemanager-race.md
io-keychain-thread-safety.md
io-plist-concurrent-mutation.md
io-swiftdata-background.md
mem-async-task-self-capture.md
mem-closure-retain-cycle.md
mem-combine-sink-retain.md
mem-delegate-strong-reference.md

Details

From the project README

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

Comments

Markdown supported