Command Palette

Search for a command to run...

Назад к скиллам
скилл № 96979

axiom-audit-concurrency

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

БесплатноБез исполняемых скриптов
CharlesWiltgenот CharlesWiltgen★ 1 277 звёзд на GitHub

Установить axiom-audit-concurrency в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

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

Write a brief Isolation Architecture Map (5-10 lines) summarizing:

  • Default isolation strategy
  • Actor boundary locations
  • Concurrency entry point pattern (structured vs unstructured)
  • Cancellation approach

Present this map in the output before proceeding.

Phase 2: Detect Known Anti-Patterns

Run all 8 existing detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.

Compiler diagnostics take precedence

Patterns 4, 5, and 8 ask questions the Swift compiler answers exactly. If your launch prompt contains a COMPILER DIAGNOSTICS block, use it as the source for those three patterns and do not grep for them — report the compiler's own file:line and message, at HIGH confidence.

Two limits on the block, both of which you must respect:

  • It is a floor, not a complete list. The compiler stops reporting after the first errors in a file, so later violations in that same file are invisible until the earlier ones are fixed. Never state or imply that zero diagnostics means zero violations.
  • It covers one build configuration — one scheme, one destination, one set of #if branches. Code excluded from that configuration was not checked. Say so when it matters.

If there is no COMPILER DIAGNOSTICS block, fall back to the grep patterns for 4, 5, and 8 and label those findings LOW confidence (no compiler verification).

Patterns 1, 2, 3, 6, and 7 are unaffected — the compiler has nothing to say about them.

1. Missing @MainActor on UI Classes (CRITICAL/HIGH)

Pattern: ObservableObject (and other UI-state classes) without @MainActor Search: class.*ObservableObject — check 5 lines before for @MainActor Issue: Crashes when UI modified from background threads Fix: Add @MainActor to class declaration Note: UIViewController and UIView subclasses are NOT findings — both classes are NS_SWIFT_UI_ACTOR, so every subclass inherits @MainActor without an annotation. SwiftUI Views are implicitly @MainActor too. Skip this pattern entirely when the target sets SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor: every unannotated class is already @MainActor there. Field signal: Crashes with xcsym pattern_tag=swift_concurrency_violation (fires on _swift_task_isCurrentExecutor in the exception subtype) almost always trace back to this anti-pattern. If the user has .ips artifacts, run xcsym crash --format=summary <file> and correlate the crashed frames with grep hits. This agent only reads and searches, so it cannot run xcsym crash: ask for its output in your result, or run it yourself if you are following this procedure inline.

2. Unsafe Task Self Capture (HIGH/HIGH)

Pattern: Task { self.property } without [weak self] in a class Search: Task\s*\{ then check for self. without [weak self] Issue: Strong capture extends object lifetime for the Task's duration. For fire-and-forget Tasks this is temporary; for stored Tasks it's a retain cycle (see Pattern

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • agents/openai.yaml

FAQ

Что делает скилл axiom-audit-concurrency?

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

Как установить скилл axiom-audit-concurrency?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл axiom-audit-concurrency запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить axiom-audit-concurrency с