swift-concurrency

Swift Concurrency patterns — async/await, actors, tasks, Sendable conformance. Use when writing async/await code, implementing actors, working with structured concurrency, or ensuring data race safety.

11 stars

Best use case

swift-concurrency is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Swift Concurrency patterns — async/await, actors, tasks, Sendable conformance. Use when writing async/await code, implementing actors, working with structured concurrency, or ensuring data race safety.

Teams using swift-concurrency should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/swift-concurrency/SKILL.md --create-dirs "https://raw.githubusercontent.com/ravnhq/ai-toolkit/main/.claude-plugin/plugins/swift-concurrency/skills/swift-concurrency/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/swift-concurrency/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How swift-concurrency Compares

Feature / Agentswift-concurrencyStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Swift Concurrency patterns — async/await, actors, tasks, Sendable conformance. Use when writing async/await code, implementing actors, working with structured concurrency, or ensuring data race safety.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Swift Concurrency Patterns

Expert guidance on Swift Concurrency best practices covering async/await, actors, tasks, Sendable, threading, memory management, testing, and migration strategies.

## Rules

Core Swift Concurrency rules extracted as discrete, high-impact patterns. See [rules index](rules/_sections.md) for the full list organized by:

- **Async/Await Patterns** - Never add dummy suspension points to silence warnings
- **Actor Isolation** - Use actors for data-race safety with compiler verification
- **Task Lifecycle** - Understand task cancellation and structured concurrency
- **Sendable Conformance** - Require Sendable for crossing concurrency boundaries
- **Testing** - Patterns for testing async concurrent code without flaky tests

## References

See [references/swift-concurrency.md](references/swift-concurrency.md) for comprehensive guidance organized by:

- **Async/Await Fundamentals** - Core patterns, error handling, parallel execution
- **Tasks & Structured Concurrency** - Task lifecycle, cancellation, task groups
- **Actors & Isolation** - Actor isolation, suspension points, state safety
- **Sendable & Data Safety** - Sendable conformance, data races, safe captures
- **Threading & Execution** - Execution contexts, isolation domains
- **Memory Management** - Retain cycles, weak references, task lifecycle
- **Testing Concurrency** - Async test patterns, Swift Testing integration
- **Migration & Interop** - Strict concurrency migration, legacy interop

## Examples

### Positive Trigger

User: "Refactor callback-based network code to async/await with actor isolation."

Expected behavior: Use `swift-concurrency` guidance, follow its workflow, and return actionable output.

### Non-Trigger

User: "Refactor CSS grid layout for mobile breakpoints."

Expected behavior: Do not prioritize `swift-concurrency`; choose a more relevant skill or proceed without it.

## Troubleshooting

### Skill Does Not Trigger

- Error: The skill is not selected when expected.
- Cause: Request wording does not clearly match the description trigger conditions.
- Solution: Rephrase with explicit domain/task keywords from the description and retry.

### Guidance Conflicts With Another Skill

- Error: Instructions from multiple skills conflict in one task.
- Cause: Overlapping scope across loaded skills.
- Solution: State which skill is authoritative for the current step and apply that workflow first.

### Output Is Too Generic

- Error: Result lacks concrete, actionable detail.
- Cause: Task input omitted context, constraints, or target format.
- Solution: Add specific constraints (environment, scope, format, success criteria) and rerun.

## Workflow

1. Identify whether the request clearly matches `swift-concurrency` scope and triggers.
2. Apply the skill rules and referenced guidance to produce a concrete result.
3. Validate output quality against constraints; if gaps remain, refine once with explicit assumptions.

Related Skills

agent-skills-manager

11
from ravnhq/ai-toolkit

Manage AI skills from the Ravn AI Toolkit via corvus CLI — install, update, remove, search, and configure skills for any project. Use when: (1) Installing AI skills into a project, (2) Updating installed skills to latest versions, (3) Browsing or searching available skills, (4) Configuring global or per-project skill sets, (5) Troubleshooting corvus setup. Triggers on: "install skills", "add skills", "update skills", "corvus", "skill manager", "browse skills", "set up AI rules".

type-system-audit

11
from ravnhq/ai-toolkit

Audit a repository for type-system weaknesses using recent bug-fix commits as hard evidence. Produces prioritized findings tied to specific commits showing which types allowed real bugs. Use when: reviewing type safety, auditing types, analyzing type bugs. Triggers on: type audit, type system review, audit types, type safety audit.

ts-linter

11
from ravnhq/ai-toolkit

Set up and enforce a strict, production-grade ESLint configuration for TypeScript projects, then systematically fix all linting issues. Use this skill whenever the user asks to add a linter or ESLint, enforce code quality rules, fix linting errors, clean up code style, or add type-aware linting. Trigger on: "lint", "eslint", "code quality", "static analysis", "strict linting", "make it stricter", "make the code stricter", "add better rules", "clean up the codebase", "enforce standards", "fix all the warnings", or "ShadCN lint errors". Handles detection, config generation, dependency installation, auto-fix, and manual remediation. Do NOT use for Biome or Rome projects, Prettier-only formatting, non-TypeScript/JavaScript projects, writing custom ESLint rules or plugins, husky/lint-staged/pre-commit hook setup, or when the user just wants to run an existing linter without changing its configuration.

transcript-notes

11
from ravnhq/ai-toolkit

Convert meeting transcript .txt files into structured .md notes with metadata, TL;DR, key topics, action items, and quotes. Use when processing raw transcripts into formatted notes. Triggers on: "process transcript", "generate notes from transcript", "transcript to notes", "/transcript-notes".

test-plan-gen

11
from ravnhq/ai-toolkit

Generate professional QA Test Plan documents (.docx or .pdf) from a structured interview. Trigger on "create/write a test plan", "I need a test plan", "prepare QA documentation", /testplan, or when a user uploads a PRD/requirements and wants a test plan generated.

test-case-gen

11
from ravnhq/ai-toolkit

Generate, evaluate, audit, and normalize QA test cases to RAVN standards. Trigger on "generate/write/create test cases", "evaluate/score my test cases", "audit my test suite", "review test coverage", "normalize/reformat test cases", or when a user wants test design help. Also triggered by /testcases.

tech-react

11
from ravnhq/ai-toolkit

React 19 patterns for components, hooks, Server Components, and data fetching. Use when writing React components, managing state with hooks, implementing Suspense boundaries, optimizing renders with proper memoization, or building Server/Client component hierarchies.

tech-drizzle

11
from ravnhq/ai-toolkit

Drizzle ORM typesafe schema design, relational queries, prepared statements, migrations, and transactions. Use when working with Drizzle ORM, writing database queries, managing migrations, or optimizing query performance with prepared statements.

tech-android

11
from ravnhq/ai-toolkit

Android and Kotlin development patterns — Compose, architecture, coroutines, Room, navigation, Hilt. Use when building Android apps, writing Jetpack Compose UI, or reviewing Android-specific code.

rewrite-commit-history

11
from ravnhq/ai-toolkit

Rewrite a feature branch's commit history into clean conventional commits that tell a progressive, linear story. Handles backup, soft reset, and atomic recommit. Use when: (1) Cleaning up messy WIP commits before PR, (2) Reorganizing commits into logical units, (3) Converting commits to conventional commit format. Triggers on: "rewrite history", "clean up commits", "rewrite commits", "conventional commits", "squash and rewrite", "reorganize commits".

qa-personality-builder

11
from ravnhq/ai-toolkit

Create custom QA agent personalities for project-specific testing needs. Guided builder that asks about the specialty, tools, and test scenarios, then generates a personality file and registers it in the QA config. Trigger on "create a QA personality", "add a custom test agent", "build a webhook tester", or when the user needs a project-specific QA agent. Also triggered by /qa-create-personality.

qa-orchestrator

11
from ravnhq/ai-toolkit

Orchestrate QA agent workflows — spawn test agents in parallel, collect results, triage bugs, trigger the bug fixer, and generate QA reports. The main entry point for running a QA session. Trigger on "run QA", "start QA session", "test the PR", "orchestrate QA agents", or when the user wants to run multiple QA agents together. Also triggered by /qa-orchestrator.