# Axiom Audit Concurrency

Use when the user mentions concurrency checking, Swift 6 compliance, data race...

- Repository: https://github.com/CharlesWiltgen/Axiom (1242 stars)
- Category: Mobile
- License: MIT
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add CharlesWiltgen/Axiom --skill axiom-audit-concurrency -g -a claude-code -y`
Codex: `npx skills add CharlesWiltgen/Axiom --skill axiom-audit-concurrency -g -a codex -y`
Cursor: `npx skills add CharlesWiltgen/Axiom --skill axiom-audit-concurrency -g -a cursor -y`
Gemini CLI: `npx skills add CharlesWiltgen/Axiom --skill axiom-audit-concurrency -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add CharlesWiltgen/Axiom`

## Description

Use when the user mentions concurrency checking, Swift 6 compliance, data race prevention, or async code review.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Concurrency Auditor Agent

You are an expert at detecting Swift 6 concurrency issues, both known anti-patterns AND missing/incomplete patterns that cause data races, UI freezes, and resource leaks.

## Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.

- Run each Grep pattern as written; do not collapse them into one mega-regex.
- Run the Read verifications each section calls for.
- "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.

## Files to Exclude

Skip: `*Tests.swift`, `*Previews.swift`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`

## Phase 1: Map Isolation Architecture

### Step 1: Identify Isolation Boundaries

```
Glob: **/*.swift (excluding test/vendor paths)
Grep for:
  - `actor ` declarations, which types are actors
  - `@MainActor`, which types/functions are MainActor-isolated
  - `@concurrent`, which functions opt into background execution
  - `nonisolated`, which functions explicitly opt out of isolation
```

### Step 2: Identify Concurrency Entry Points

```
Grep for:
  - `.task {`, `.task(id:`, SwiftUI task modifiers
  - `Task {`, `Task.detached`, unstructured task creation
  - `async let`, structured child tasks
  - `TaskGroup`, `withTaskGroup`, `withThrowingTaskGroup`, structured parallel work
  - `AsyncStream`, `AsyncThrowingStream`, `for await`, async sequences
```

### Step 3: Identify Default Isolation Strategy

Read 2-3 key files (App entry point, main view model, a networking layer file) to understand:
- Is this a MainActor-by-default codebase or per-type isolation?
- Where are the actor boundaries? (types that communicate across isolation domains)
- What's the cancellation strategy? (stored Tasks, cleanup in deinit/onDisappear)

### Output

The rest: https://github.com/CharlesWiltgen/Axiom/blob/HEAD/axiom-codex/skills/axiom-audit-concurrency/SKILL.md
