{
  "markdown": "<p align=\"center\">\n    <a href=\"https://www.swiftconcurrencycourse.com?utm_source=github&utm_medium=agent-skill&utm_campaign=swift-concurrency-skill\">\n        <img width=\"900px\" src=\"assets/github_readme_banner.jpg\" alt=\"Swift Concurrency Agent Skill banner\">\n    </a>\n</p>\n\n# Swift Concurrency Agent Skill\n\nExpert guidance for any AI coding tool that supports the [Agent Skills open format](https://agentskills.io/home) — safe concurrency, performance, and Swift 6+ migration.\n\nBased 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.\n\nThis 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.\n\n## Who this is for\n- Teams migrating to Swift 6 / strict concurrency who need safe defaults and quick triage.\n- Developers debugging data races, isolation errors, or flaky async tests.\n- Anyone wanting performance-minded concurrency patterns (actors, tasks, Sendable, async streams).\n\n## See also my other skills:\n- [SwiftUI Expert](https://github.com/AvdLee/SwiftUI-Agent-Skill)\n- [Core Data Expert](https://github.com/AvdLee/Core-Data-Agent-Skill)\n- [Swift Testing Expert](https://github.com/AvdLee/Swift-Testing-Agent-Skill)\n\n## How to Use This Skill\n\n### Option A: Using skills.sh (recommended)\nInstall this skill with a single command:\n```bash\nnpx skills add https://github.com/avdlee/swift-concurrency-agent-skill --skill swift-concurrency\n```\n\nFor more information, visit the [skills.sh platform page](https://skills.sh/avdlee/swift-concurrency-agent-skill/swift-concurrency).\n\nThen use the skill in your AI agent, for example:  \n> Use the swift concurrency skill and analyze the current project for Swift Concurrency improvements\n\n### Option B: ChatGPT & Codex (OpenAI Plugins Directory)\n\nThis plugin is published in the universal OpenAI Plugins Directory shared by ChatGPT and Codex:\n\n1. In the ChatGPT desktop app, select **Codex** (or ChatGPT with **Work** enabled), or use the plugin browser in Codex CLI.\n2. Open **Plugins** and search for \"Swift Concurrency\".\n3. Install the plugin. The skill becomes available in new chats and sessions.\n\n### Option C: Claude Code Plugin\n\n#### Personal Usage\n\nTo install this Skill for your personal use in Claude Code:\n\n1. Add the marketplace:\n   ```bash\n   /plugin marketplace add AvdLee/Swift-Concurrency-Agent-Skill\n   ```\n\n2. Install the Skill:\n   ```bash\n   /plugin install swift-concurrency@swift-concurrency-agent-skill\n   ```\n\n#### Project Configuration\n\nTo automatically provide this Skill to everyone working in a repository, configure the repository's `.claude/settings.json`:\n\n```json\n{\n  \"enabledPlugins\": {\n    \"swift-concurrency@swift-concurrency-agent-skill\": true\n  },\n  \"extraKnownMarketplaces\": {\n    \"swift-concurrency-agent-skill\": {\n      \"source\": {\n        \"source\": \"github\",\n        \"repo\": \"AvdLee/Swift-Concurrency-Agent-Skill\"\n      }\n    }\n  }\n}\n```\n\nWhen team members open the project, Claude Code will prompt them to install the Skill.\n\n### Option D: Cursor Plugin\n\nLoad 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.\n\n### Using another tool?\n\nSee [INSTALLATION.md](INSTALLATION.md) for all other installation options: pi, Gemini CLI, Autohand Code, and manual installation.\n\n**How to verify**: \n\nYour agent should reference the triage/playbook in `skills/swift-concurrency/SKILL.md` and jump into the relevant reference file for your error or task.\n\n## What This Skill Offers\n\nThis skill gives your AI coding tool comprehensive Swift Concurrency guidance. It can:\n\n### Guide Your Concurrency Decisions\n- Choose the right tool for the job (async/await, actors, tasks, task groups)\n- Understand when to use `@MainActor`, custom actors, or `nonisolated`\n- Navigate isolation domains and prevent data races at compile time\n- Apply `Sendable` conformance correctly for value and reference types\n\n### Write Safe Concurrent Code\n- Avoid common pitfalls like actor reentrancy and retain cycles\n- Prevent data races with proper isolation\n- Handle task cancellation and error propagation correctly\n- Manage memory safely in concurrent contexts\n\n### Optimize Performance\n- Choose between serialized, asynchronous, and parallel execution\n- Reduce actor contention and unnecessary suspension points\n- Understand the tradeoffs of parallelism\n\n### Migrate to Swift 6\n- Step-by-step migration strategies for existing codebases\n- Enable strict concurrency checking incrementally\n- Rewrite closure-based code to async/await\n- Migrate from Combine/RxSwift to Swift Concurrency\n- Use migration tooling for upcoming Swift features\n\n### Test Concurrent Code\n- Write reliable tests using Swift Testing (recommended) or XCTest\n- Handle `@MainActor` isolation in tests\n- Use `withMainSerialExecutor` for deterministic testing\n- Avoid flaky tests with proper async handling\n\n### Integrate with Core Data\n- Safely pass data between isolation domains using `NSManagedObjectID`\n- Implement the Data Access Object (DAO) pattern\n- Use custom actor executors when needed\n- Avoid common Core Data concurrency pitfalls\n\n## What Makes This Skill Different\n\n**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).\n\n**Non-Opinionated**: Focuses on industry-standard best practices and compile-time safety, not architectural preferences. Works with any Swift project, coding style, or architecture.\n\n**Swift 6.2 Ready**: Covers the latest Swift Concurrency features including:\n- Default Actor Isolation\n- `isolated deinit`\n- Global Actor Conformance for protocols\n- `nonisolated(nonsending)` and `@concurrent`\n- Approachable Concurrency build settings\n- Concurrency-safe notifications (iOS 26+)\n\n**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.\n\n## See it in action\n[![Youtube Video](assets/agent_skills_watch_on_youtube.png)](https://www.youtube.com/watch?v=khekVi1PK3o)\n\n\n## Skill Structure\n\n```\nskills/swift-concurrency/\n├── SKILL.md                # Main skill file with decision trees\n└── references/\n    ├── _index.md               # Quick navigation index for all reference files\n    ├── actors.md               # Actor isolation, global actors, reentrancy\n    ├── async-algorithms.md     # AsyncAlgorithms operators: debounce, merge, zip, Combine migration\n    ├── async-await-basics.md   # Fundamentals of async/await syntax\n    ├── async-sequences.md      # AsyncSequence and AsyncStream patterns\n    ├── core-data.md            # Core Data integration patterns\n    ├── glossary.md             # Terms & concepts for Swift Concurrency\n    ├── linting.md              # Linting rules for strict concurrency\n    ├── memory-management.md    # Retain cycles, weak self, isolated deinit\n    ├── migration.md            # Step-by-step Swift 6 migration guide\n    ├── observation.md          # @Observable isolation, observation tracking, Sendable snapshots\n    ├── performance.md          # Optimization with Xcode Instruments\n    ├── sendable.md             # Isolation domains and Sendable conformance\n    ├── tasks.md                # Task lifecycle, cancellation, priorities\n    ├── testing.md              # Testing concurrent code\n    └── threading.md            # Threads vs tasks, suspension points\n```\n\n## Contributing\n\nContributions are welcome! This repository follows the [Agent Skills open format](https://agentskills.io/home), which has specific structural requirements.\n\n**We strongly recommend using AI assistance for contributions:**\n- Use the [skill-creator skill](https://github.com/anthropics/skills/tree/main/skills/skill-creator) with Claude to ensure proper formatting\n- This helps maintain the Agent Skills format and ensures your contribution works correctly with AI agents\n\n**Please read [CONTRIBUTING.md](CONTRIBUTING.md) for:**\n- How to use the skill-creator skill for contributions\n- Agent Skills format requirements\n- Quality standards and best practices\n- Pull request process\n\nThis skill is maintained to reflect the latest Swift Concurrency best practices and will be updated as the language evolves.\n\n## About the Author\n\nCreated 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.\n\n## License\n\nThis skill is open-source and available under the MIT License. See [LICENSE](LICENSE) for details.\n\n\n\n",
  "bytes": 9646,
  "sha": "5da51d141199926bc698f54c98a060e4d9f651a58285b9df6c6a6ab62bf3971f",
  "repo_slug": "avdlee/swift-concurrency-agent-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_avdlee_swift_concurrency_agent_skill_swi_477963e5/readme"
}