Agent skill

Swift Concurrency Pro

by twostraws in twostraws/Swift-Concurrency-Agent-Skill

Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls.

MITAuto-check passedMobile

Install Swift Concurrency Pro

skills CLI
$ npx skills add twostraws/Swift-Concurrency-Agent-Skill --skill swift-concurrency-pro -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install twostraws/Swift-Concurrency-Agent-Skill swift-concurrency-pro --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/twostraws/Swift-Concurrency-Agent-Skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/swift-concurrency-pro .claude/skills/swift-concurrency-pro && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
swift-concurrency-pro
GitHub stars
566
Token cost
~1.4k tokens
SKILL.md length
528 words
Files
18 (incl. references, assets)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls.

  • Works in 12 steps: Scan for known-dangerous patterns using… → Check for recent Swift 6.2 concurrency… → Validate actor usage for reentrancy and… → …
  • Reviewing Swift concurrency code
  • SKILL.md covers Core Instructions, Output Format and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Swift Concurrency Pro is an agent skill from twostraws/Swift-Concurrency-Agent-Skill. Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls. Use when reading, writing, or reviewing Swift concurrency code.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 21 other files, including reference files and assets (for example `.claude-plugin/plugin.json`, `agents/openai.yaml` and `references/actors.md`).

It sits in Mobile, covering Async programming and iOS development. It works with Swift. The repository describes itself as: Swift Concurrency agent skill for Claude Code, Codex, and other AI tools. The licence is MIT.

When your agent uses it

  • Reviewing Swift concurrency code
  • Tasks that involve Async programming
  • Tasks that involve iOS development

Example prompts

  • “Use the swift-concurrency-pro skill to review Swift code for concurrency correctness, modern API usage, and common async/await pitfalls”
  • “/swift-concurrency-pro”

Workflow steps

12 steps, taken from the first numbered list in SKILL.md.

  1. Scan for known-dangerous patterns using references/hotspots.md to prioritize what to inspect.
  2. Check for recent Swift 6.2 concurrency behavior using references/new-features.md.
  3. Validate actor usage for reentrancy and isolation correctness using references/actors.md.
  4. Ensure structured concurrency is preferred over unstructured where appropriate using references/structured.md.
  5. Check unstructured task usage for correctness using references/unstructured.md.
  6. Verify cancellation is handled correctly using references/cancellation.md.
  7. Validate async stream and continuation usage using references/async-streams.md.
  8. Check bridging code between sync and async worlds using references/bridging.md.
  9. Review any legacy concurrency migrations using references/interop.md.
  10. Cross-check against common failure modes using references/bug-patterns.md.
  11. If the project has strict-concurrency errors, map diagnostics to fixes using references/diagnostics.md.
  12. If reviewing tests, check async test patterns using references/testing.md.

What it can do on your machine

Read from SKILL.md and the folder at commit bee3f69. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are swift).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swift Concurrency Pro loads about 1.4k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 528 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from twostraws/Swift-Concurrency-Agent-Skill at commit bee3f69, republished under its MIT licence (© twostraws). 528 words, ~1,373 tokens.

Download SKILL.mdSave it as .claude/skills/swift-concurrency-pro/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.
name
swift-concurrency-pro
description
Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls. Use when reading, writing, or reviewing Swift concurrency code.
license
MIT
metadata.author
Paul Hudson
metadata.version
1.0

Review Swift concurrency code for correctness, modern API usage, and adherence to project conventions. Report only genuine problems - do not nitpick or invent issues.

Review process:

  1. Scan for known-dangerous patterns using references/hotspots.md to prioritize what to inspect.
  2. Check for recent Swift 6.2 concurrency behavior using references/new-features.md.
  3. Validate actor usage for reentrancy and isolation correctness using references/actors.md.
  4. Ensure structured concurrency is preferred over unstructured where appropriate using references/structured.md.
  5. Check unstructured task usage for correctness using references/unstructured.md.
  6. Verify cancellation is handled correctly using references/cancellation.md.
  7. Validate async stream and continuation usage using references/async-streams.md.
  8. Check bridging code between sync and async worlds using references/bridging.md.
  9. Review any legacy concurrency migrations using references/interop.md.
  10. Cross-check against common failure modes using references/bug-patterns.md.
  11. If the project has strict-concurrency errors, map diagnostics to fixes using references/diagnostics.md.
  12. If reviewing tests, check async test patterns using references/testing.md.

If doing a partial review, load only the relevant reference files.

Core Instructions

  • Target Swift 6.2 or later with strict concurrency checking.
  • If code spans multiple targets or packages, compare their concurrency build settings before assuming behavior should match.
  • Prefer structured concurrency (task groups) over unstructured (Task {}).
  • Prefer Swift concurrency over Grand Central Dispatch for new code. GCD is still acceptable in low-level code, framework interop, or performance-critical synchronous work where queues and locks are the right tool – don't flag these as errors.
  • If an API offers both async/await and closure-based variants, always prefer async/await.
  • Do not introduce third-party concurrency frameworks without asking first.
  • Do not suggest @unchecked Sendable to fix compiler errors. It silences the diagnostic without fixing the underlying race. Prefer actors, value types, or sending parameters instead. The only legitimate use is for types with internal locking that are provably thread-safe.

Output Format

Organize findings by file. For each issue:

  1. State the file and relevant line(s).
  2. Name the rule being violated.
  3. Show a brief before/after code fix.

Skip files with no issues. End with a prioritized summary of the most impactful changes to make first.

Example output:

Show full SKILL.md (188 more words)Show less
DataLoader.swift

Line 18: Actor reentrancy – state may have changed across the await.

swift
// Before
actor Cache {
    var items: [String: Data] = [:]

    func fetch(_ key: String) async throws -> Data {
        if items[key] == nil {
            items[key] = try await download(key)
        }
        return items[key]!
    }
}

// After
actor Cache {
    var items: [String: Data] = [:]

    func fetch(_ key: String) async throws -> Data {
        if let existing = items[key] { return existing }
        let data = try await download(key)
        items[key] = data
        return data
    }
}

Line 34: Use withTaskGroup instead of creating tasks in a loop.

swift
// Before
for url in urls {
    Task { try await fetch(url) }
}

// After
try await withThrowingTaskGroup(of: Data.self) { group in
    for url in urls {
        group.addTask { try await fetch(url) }
    }

    for try await result in group {
        process(result)
    }
}
Summary
  1. Correctness (high): Actor reentrancy bug on line 18 may cause duplicate downloads and a force-unwrap crash.
  2. Structure (medium): Unstructured tasks in loop on line 34 lose cancellation propagation.

End of example.

References

  • references/hotspots.md - Grep targets for code review: known-dangerous patterns and what to check for each.
  • references/new-features.md - Swift 6.2 changes that alter review advice: default actor isolation, isolated conformances, caller-actor async behavior, @concurrent, Task.immediate, task naming, and priority escalation.
  • references/actors.md - Actor reentrancy, shared-state annotations, global actor inference, and isolation patterns.
  • references/structured.md - Task groups over loops, discarding task groups, concurrency limits.
  • references/unstructured.md - Task vs Task.detached, when Task {} is a code smell.
  • references/cancellation.md - Cancellation propagation, cooperative checking, broken cancellation patterns.
  • references/async-streams.md - AsyncStream factory, continuation lifecycle, back-pressure.
  • references/bridging.md - Checked continuations, wrapping legacy APIs, @unchecked Sendable.
  • references/interop.md - Migrating from GCD, Mutex/locks, completion handlers, delegates, and Combine.
  • references/bug-patterns.md - Common concurrency failure modes and their fixes.
  • references/diagnostics.md - Strict-concurrency compiler errors, protocol conformance fixes, and likely remedies.
  • references/testing.md - Async test strategy with Swift Testing, race detection, avoiding timing-based tests.

© twostraws, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 17 other files (references, assets) in swift-concurrency-pro of twostraws/Swift-Concurrency-Agent-Skill.

  • SKILL.md
  • .claude-plugin/plugin.json
  • agents/openai.yaml
  • assets/swift-concurrency-pro-icon.png
  • assets/swift-concurrency-pro-icon.svg
  • references/actors.md
  • references/async-streams.md
  • references/bridging.md
  • references/bug-patterns.md
  • references/cancellation.md
  • references/diagnostics.md
  • references/hotspots.md
  • references/interop.md
  • references/new-features.md
  • references/structured.md
  • references/testing.md
  • references/unstructured.md
  • … and 1 more

Open the folder on GitHubat commit bee3f69

Compare with similar skills

Swift Concurrency Pro next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swift Concurrency Pro compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swift Concurrency Pro this skilltwostraws/Swift-Concurrency-Agent-Skill566—~1.4kAutomated safety check: PassMIT
Modern Swiftjohnrogers/claude-swift-engineering231—~1kAutomated safety check: PassMIT
Swift ConcurrencyHoangNguyen0403/agent-skills-standard572—~545Automated safety check: PassMIT
Swift Concurrencyhenrypldev/react-native-nitro-mlx1003 repos~3.1kAutomated safety check: PassMIT
Swift Concurrencynimblehq/ios-templates110—~1.7kAutomated safety check: PassMIT
Swift Concurrencyjamesrochabrun/skills216—~1.9kAutomated safety check: PassMIT

Similar skills

  • Modern Swift

    johnrogers/claude-swift-engineering

    A skill your agent uses when writing async/await code, enabling strict concurrency, fixing Sendable errors, migrating from completion handlers, managing shared state with actors, or using…

    231 GitHub stars~1k tokensUpdated 8 mo ago
    MobileAuto-check passed
  • Swift Concurrency

    HoangNguyen0403/agent-skills-standard

    Implement async/await, Actors, and structured concurrency in Swift.

    572 GitHub stars~545 tokensUpdated yesterday
    MobileAuto-check passed
  • Swift Concurrency

    henrypldev/react-native-nitro-mlx

    Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when working with tasks, actors, @MainActor, Sendable, data races, thread safety, or…

    100 GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed
  • Swift Concurrency

    nimblehq/ios-templates

    Write, review, or fix Swift 6 concurrency code using actors, Sendable, structured concurrency, and the strict data-race-safety model.

    110 GitHub stars~1.7k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Swift Concurrency

    jamesrochabrun/skills

    Guide for building, auditing, and refactoring Swift code using modern concurrency patterns (Swift 6+).

    216 GitHub stars~1.9k tokensUpdated 8 mo ago
    DevelopmentAuto-check passed
  • Concurrency Patterns

    gustavscirulis/snapgrid

    Swift concurrency patterns including Swift 6.2 approachable concurrency, structured concurrency, actors, continuations, and migration.

    116 GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed

Works with

Questions about Swift Concurrency Pro

What does Swift Concurrency Pro do?

Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls. Swift Concurrency Pro is an agent skill from twostraws/Swift-Concurrency-Agent-Skill. Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls.

When should I use Swift Concurrency Pro?

Swift Concurrency Pro fits situations like: reviewing Swift concurrency code; tasks that involve Async programming; tasks that involve iOS development.

How do I install Swift Concurrency Pro in Claude Code?

Run `npx skills add twostraws/Swift-Concurrency-Agent-Skill --skill swift-concurrency-pro -a claude-code`. Or copy the skill folder (swift-concurrency-pro in twostraws/Swift-Concurrency-Agent-Skill) into .claude/skills/swift-concurrency-pro in your project. Claude Code loads it when a task matches its description.

How do I install Swift Concurrency Pro in Codex?

Run `npx skills add twostraws/Swift-Concurrency-Agent-Skill --skill swift-concurrency-pro -a codex`. Or copy the skill folder (swift-concurrency-pro in twostraws/Swift-Concurrency-Agent-Skill) into .agents/skills/swift-concurrency-pro in your project. Codex loads it when a task matches its description.

Can I use Swift Concurrency Pro in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add twostraws/Swift-Concurrency-Agent-Skill --skill swift-concurrency-pro -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swift-concurrency-pro, .gemini/skills/swift-concurrency-pro, .github/skills/swift-concurrency-pro and .opencode/skills/swift-concurrency-pro in your project.

What does Swift Concurrency Pro need to run?

SKILL.md names no scripts, command-line tools or credentials: Swift Concurrency Pro is instructions for the agent only.

Does Swift Concurrency Pro access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Swift Concurrency Pro safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Swift Concurrency Pro use?

Swift Concurrency Pro is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swift Concurrency Pro use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to Swift Concurrency Pro?

Skills that share tags, products or a category with Swift Concurrency Pro: Modern Swift (johnrogers/claude-swift-engineering, 231 stars), Swift Concurrency (HoangNguyen0403/agent-skills-standard, 572 stars), Swift Concurrency (henrypldev/react-native-nitro-mlx, 100 stars) and Swift Concurrency (nimblehq/ios-templates, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swift Concurrency Pro?

twostraws (a GitHub user) maintains it in twostraws/Swift-Concurrency-Agent-Skill, which has 566 GitHub stars. The repository was last updated on May 17, 2026.

Source: twostraws/Swift-Concurrency-Agent-Skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.