Skip to content
Back to search

swift-concurrency-agent-skill

MarketplaceWorks with Claude CodeGitHubIncomplete

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/avdlee-swift-concurrency-agent-skill/badge.svg)](/listings/avdlee-swift-concurrency-agent-skill)

HTML

<a href="/listings/avdlee-swift-concurrency-agent-skill"><img src="/api/listings/avdlee-swift-concurrency-agent-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 55 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "swift-concurrency-agent-skill",
  4. "version": "2.3.1",
  5. "owner": {
  6. "name": "Antoine van der Lee",
  7. "email": "contact@avanderlee.com"
  8. },
  9. "metadata": {
  10. "description": "Expert guidance on Swift Concurrency: async/await, actors, tasks, Sendable conformance, and Swift 6 migration patterns."
  11. },
  12. "plugins": [
  13. {
  14. "name": "swift-concurrency",
  15. "description": "Expert guidance on Swift Concurrency best practices, patterns, and implementation. Covers async/await, actors, tasks, Sendable conformance, data race prevention, and Swift 6 migration strategies.",
  16. "repository": "https://github.com/AvdLee/Swift-Concurrency-Agent-Skill",
  17. "version": "2.3.1",
  18. "author": {
  19. "name": "Antoine van der Lee",
  20. "email": "contact@avanderlee.com"
  21. },
  22. "license": "MIT",
  23. "category": "development",
  24. "keywords": [
  25. "swift",
  26. "concurrency",
  27. "async-await",
  28. "actors",
  29. "sendable",
  30. "swift6",
  31. "data-races",
  32. "threading",
  33. "task-groups",
  34. "main-actor",
  35. "core-data",
  36. "migration",
  37. "ios",
  38. "macos",
  39. "apple"
  40. ],
  41. "tags": [
  42. "swift",
  43. "concurrency",
  44. "async-await",
  45. "actors",
  46. "sendable",
  47. "swift6",
  48. "data-races",
  49. "threading",
  50. "apple-platforms"
  51. ],
  52. "source": "./"
  53. }
  54. ]
  55. }
README.md · README · 207 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <a href="https://www.swiftconcurrencycourse.com?utm_source=github&utm_medium=agent-skill&utm_campaign=swift-concurrency-skill">
  3. <img width="900px" src="assets/github_readme_banner.jpg" alt="Swift Concurrency Agent Skill banner">
  4. </a>
  5. </p>
  6. # Swift Concurrency Agent Skill
  7. Expert guidance for any AI coding tool that supports the [Agent Skills open format](https://agentskills.io/home) — safe concurrency, performance, and Swift 6+ migration.
  8. Based on the comprehensive [Swift Concurrency Course](https://www.swiftconcurrencycourse.com?utm_source=github&utm_medium=agent-skill&utm_campaign=swift-concurrency-skill), distilled into actionable, concise references for agents.
  9. This repository is packaged as a portable [Agent Plugin](https://agent-plugins.org) (spec 1.0.0): compatible clients discover the skill automatically from the root `plugin.json` manifest and the `skills/` directory. Client-specific manifests for Claude Code, Cursor, Codex, and pi are included as well, and the plugin is published in the OpenAI Plugins Directory for ChatGPT and Codex.
  10. ## Who this is for
  11. - Teams migrating to Swift 6 / strict concurrency who need safe defaults and quick triage.
  12. - Developers debugging data races, isolation errors, or flaky async tests.
  13. - Anyone wanting performance-minded concurrency patterns (actors, tasks, Sendable, async streams).
  14. ## See also my other skills:
  15. - [SwiftUI Expert](https://github.com/AvdLee/SwiftUI-Agent-Skill)
  16. - [Core Data Expert](https://github.com/AvdLee/Core-Data-Agent-Skill)
  17. - [Swift Testing Expert](https://github.com/AvdLee/Swift-Testing-Agent-Skill)
  18. ## How to Use This Skill
  19. ### Option A: Using skills.sh (recommended)
  20. Install this skill with a single command:
  21. ```bash
  22. npx skills@latest add https://github.com/avdlee/swift-concurrency-agent-skill --skill swift-concurrency
  23. ```
  24. For more information, visit the [skills.sh platform page](https://skills.sh/avdlee/swift-concurrency-agent-skill/swift-concurrency).
  25. > Installed before the Agent Plugins migration? Run `npx skills@latest update` using skills CLI 1.5.24 or newer. It migrates the saved skill path without treating the skill as deleted.
  26. Then use the skill in your AI agent, for example:
  27. > Use the swift concurrency skill and analyze the current project for Swift Concurrency improvements
  28. ### Option B: ChatGPT & Codex (OpenAI Plugins Directory)
  29. This plugin is published in the universal OpenAI Plugins Directory shared by ChatGPT and Codex:
  30. 1. In the ChatGPT desktop app, select **Codex** (or ChatGPT with **Work** enabled), or use the plugin browser in Codex CLI.
  31. 2. Open **Plugins** and search for "Swift Concurrency".
  32. 3. Install the plugin. The skill becomes available in new chats and sessions.
  33. ### Option C: Claude Code Plugin
  34. #### Personal Usage
  35. To install this Skill for your personal use in Claude Code:
  36. 1. Add the marketplace:
  37. ```bash
  38. /plugin marketplace add AvdLee/Swift-Concurrency-Agent-Skill
  39. ```
  40. 2. Install the Skill:
  41. ```bash
  42. /plugin install swift-concurrency@swift-concurrency-agent-skill
  43. ```
  44. #### Project Configuration
  45. To automatically provide this Skill to everyone working in a repository, configure the repository's `.claude/settings.json`:
  46. ```json
  47. {
  48. "enabledPlugins": {
  49. "swift-concurrency@swift-concurrency-agent-skill": true
  50. },
  51. "extraKnownMarketplaces": {
  52. "swift-concurrency-agent-skill": {
  53. "source": {
  54. "source": "github",
  55. "repo": "AvdLee/Swift-Concurrency-Agent-Skill"
  56. }
  57. }
  58. }
  59. }
  60. ```
  61. When team members open the project, Claude Code will prompt them to install the Skill.
  62. ### Option D: Cursor Plugin
  63. Load the plugin from a local clone by placing it in `~/.cursor/plugins/local`, or install it from the Cursor Marketplace once listed. Cursor supports both the portable Agent Plugins manifest (`plugin.json`) and the Cursor Plugin manifest (`.cursor-plugin/plugin.json`) included in this repository.
  64. ### Using another tool?
  65. See [INSTALLATION.md](INSTALLATION.md) for all other installation options: pi, Gemini CLI, Autohand Code, and manual installation.
  66. **How to verify**:
  67. Your agent should reference the triage/playbook in `skills/swift-concurrency/SKILL.md` and jump into the relevant reference file for your error or task.
  68. ## What This Skill Offers
  69. This skill gives your AI coding tool comprehensive Swift Concurrency guidance. It can:
  70. ### Guide Your Concurrency Decisions
  71. - Choose the right tool for the job (async/await, actors, tasks, task groups)
  72. - Understand when to use `@MainActor`, custom actors, or `nonisolated`
  73. - Navigate isolation domains and prevent data races at compile time
  74. - Apply `Sendable` conformance correctly for value and reference types
  75. ### Write Safe Concurrent Code
  76. - Avoid common pitfalls like actor reentrancy and retain cycles
  77. - Prevent data races with proper isolation
  78. - Handle task cancellation and error propagation correctly
  79. - Manage memory safely in concurrent contexts
  80. ### Optimize Performance
  81. - Choose between serialized, asynchronous, and parallel execution
  82. - Reduce actor contention and unnecessary suspension points
  83. - Understand the tradeoffs of parallelism
  84. ### Migrate to Swift 6
  85. - Step-by-step migration strategies for existing codebases
  86. - Enable strict concurrency checking incrementally
  87. - Rewrite closure-based code to async/await
  88. - Migrate from Combine/RxSwift to Swift Concurrency
  89. - Use migration tooling for upcoming Swift features
  90. ### Test Concurrent Code
  91. - Write reliable tests using Swift Testing (recommended) or XCTest
  92. - Handle `@MainActor` isolation in tests
  93. - Use `withMainSerialExecutor` for deterministic testing
  94. - Avoid flaky tests with proper async handling
  95. ### Integrate with Core Data
  96. - Safely pass data between isolation domains using `NSManagedObjectID`
  97. - Implement the Data Access Object (DAO) pattern
  98. - Use custom actor executors when needed
  99. - Avoid common Core Data concurrency pitfalls
  100. ## What Makes This Skill Different
  101. **Expert Knowledge**: Based on real-world experience migrating large production codebases to Swift 6, distilled from the comprehensive [Swift Concurrency Course](https://www.swiftconcurrencycourse.com?utm_source=github&utm_medium=agent-skill&utm_campaign=swift-concurrency-skill).
  102. **Non-Opinionated**: Focuses on industry-standard best practices and compile-time safety, not architectural preferences. Works with any Swift project, coding style, or architecture.
  103. **Swift 6.2 Ready**: Covers the latest Swift Concurrency features including:
  104. - Default Actor Isolation
  105. - `isolated deinit`
  106. - Global Actor Conformance for protocols
  107. - `nonisolated(nonsending)` and `@concurrent`
  108. - Approachable Concurrency build settings
  109. - Concurrency-safe notifications (iOS 26+)
  110. **Practical & Concise**: Assumes your AI agent is already smart. Focuses on what developers need to know, not what they already understand. Includes code examples for every pattern.
  111. ## See it in action
  112. [![Youtube Video](assets/agent_skills_watch_on_youtube.png)](https://www.youtube.com/watch?v=khekVi1PK3o)
  113. ## Skill Structure
  114. ```
  115. skills/swift-concurrency/
  116. ├── SKILL.md # Main skill file with decision trees
  117. └── references/
  118. ├── _index.md # Quick navigation index for all reference files
  119. ├── actors.md # Actor isolation, global actors, reentrancy
  120. ├── async-algorithms.md # AsyncAlgorithms operators: debounce, merge, zip, Combine migration
  121. ├── async-await-basics.md # Fundamentals of async/await syntax
  122. ├── async-sequences.md # AsyncSequence and AsyncStream patterns
  123. ├── core-data.md # Core Data integration patterns
  124. ├── glossary.md # Terms & concepts for Swift Concurrency
  125. ├── linting.md # Linting rules for strict concurrency
  126. ├── memory-management.md # Retain cycles, weak self, isolated deinit
  127. ├── migration.md # Step-by-step Swift 6 migration guide
  128. ├── observation.md # @Observable isolation, observation tracking, Sendable snapshots
  129. ├── performance.md # Optimization with Xcode Instruments
  130. ├── sendable.md # Isolation domains and Sendable conformance
  131. ├── tasks.md # Task lifecycle, cancellation, priorities
  132. ├── testing.md # Testing concurrent code
  133. └── threading.md # Threads vs tasks, suspension points
  134. ```
  135. ## Contributing
  136. Contributions are welcome! This repository follows the [Agent Skills open format](https://agentskills.io/home), which has specific structural requirements.
  137. **We strongly recommend using AI assistance for contributions:**
  138. - Use the [skill-creator skill](https://github.com/anthropics/skills/tree/main/skills/skill-creator) with Claude to ensure proper formatting
  139. - This helps maintain the Agent Skills format and ensures your contribution works correctly with AI agents
  140. **Please read [CONTRIBUTING.md](CONTRIBUTING.md) for:**
  141. - How to use the skill-creator skill for contributions
  142. - Agent Skills format requirements
  143. - Quality standards and best practices
  144. - Pull request process
  145. This skill is maintained to reflect the latest Swift Concurrency best practices and will be updated as the language evolves.
  146. ## About the Author
  147. Created by [Antoine van der Lee](https://www.avanderlee.com), a Swift Concurrency expert and creator of the [Swift Concurrency Course](https://www.swiftconcurrencycourse.com?utm_source=github&utm_medium=agent-skill&utm_campaign=swift-concurrency-skill). With years of experience in Swift & Swift Concurrency, this skill distills practical knowledge into actionable guidance for AI assistants. He [published tens of articles on Swift Concurrency](https://www.avanderlee.com/category/concurrency/) on his blog called SwiftLee.
  148. ## License
  149. This skill is open-source and available under the MIT License. See [LICENSE](LICENSE) for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.