Swift Concurrency Agent Skill
A Swift concurrency skill: safe work with actors and tasks, data race triage and Swift 6 migration
Low risk
We rate an entry low when it mostly gives the agent instructions and reference material.
Why this level
- The skill consists of instructions and references; the agent changes code under the user's control
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/swift-concurrency-agent-skillDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Run in a terminal in the project folder
npx skills add avdlee/swift-concurrency-agent-skill --skill swift-concurrency -a claude-code -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit d577081
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .claude/skills
cp -R "$tmp/skills/swift-concurrency" .claude/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add avdlee/swift-concurrency-agent-skill --skill swift-concurrency -a cursor -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit d577081
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .agents/skills
cp -R "$tmp/skills/swift-concurrency" .agents/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add avdlee/swift-concurrency-agent-skill --skill swift-concurrency -a github-copilot -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit d577081
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .github/skills
cp -R "$tmp/skills/swift-concurrency" .github/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add avdlee/swift-concurrency-agent-skill --skill swift-concurrency -a codex -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit d577081
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .agents/skills
cp -R "$tmp/skills/swift-concurrency" .agents/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add avdlee/swift-concurrency-agent-skill --skill swift-concurrency -a gemini-cli -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit d577081
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .agents/skills
cp -R "$tmp/skills/swift-concurrency" .agents/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .devin/skills
cp -R "$tmp/skills/swift-concurrency" .devin/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Formerly Windsurf.
Run in a terminal in the project folder
npx skills add avdlee/swift-concurrency-agent-skill --skill swift-concurrency -a cline -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit d577081
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .cline/skills
cp -R "$tmp/skills/swift-concurrency" .cline/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add avdlee/swift-concurrency-agent-skill --skill swift-concurrency -a roo -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit d577081
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .roo/skills
cp -R "$tmp/skills/swift-concurrency" .roo/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
A fork of Roo Code, same .roo folders.
Run in a terminal in the project folder
npx skills add avdlee/swift-concurrency-agent-skill --skill swift-concurrency -a opencode -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit d577081
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .agents/skills
cp -R "$tmp/skills/swift-concurrency" .agents/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .agents/skills
cp -R "$tmp/skills/swift-concurrency" .agents/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/avdlee/swift-concurrency-agent-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/swift-concurrency/
git -C "$tmp" checkout d5770817d2622e1585b1f7eaebc791a9cb0959c8
mkdir -p .agents/skills
cp -R "$tmp/skills/swift-concurrency" .agents/skills/swift-concurrencyCommands for macOS and Linux, on Windows run them in Git Bash.
Install the skill with npx skills@latest add https://github.com/avdlee/swift-concurrency-agent-skill --skill swift-concurrency. In Claude Code use /plugin marketplace add AvdLee/Swift-Concurrency-Agent-Skill and /plugin install swift-concurrency@swift-concurrency-agent-skill.
Other ways from the author
npx skills@latest add https://github.com/avdlee/swift-concurrency-agent-skill --skill swift-concurrencyThe recommended way via the skills manager.
This is third-party code. Review the repository files before installing.
What it does
The skill gives a coding agent expert Swift concurrency rules in the open Agent Skills format. It walks the agent through a short algorithm: first determine the language mode, strict concurrency level and isolation boundaries from the project settings, then propose the smallest safe change. The material is split into references on actors, tasks, Sendable, async sequences, memory management, testing, Core Data and migration. The skill helps triage isolation errors and data races, rewrite code to async and await, and enable strict checks incrementally. It sets explicit guardrails: do not apply MainActor as a blanket fix and do not refactor extra during migration.
Who it is for. For Swift developers moving to strict concurrency and Swift 6 or debugging data races.
Good fit when
- The compiler complains about actor isolation or Sendable
- You need to move a project to strict concurrency or Swift 6
- You need to rewrite closure-based code to async and await without races
Not a fit when
- The task is unrelated to Swift and its concurrency
- You need a tool that changes code itself rather than references and rules for the agent
Example request
Use the swift-concurrency skill and triage the actor isolation error in this file, propose the smallest safe fixLimitations
The skill provides rules and references; the agent changes code under your control. Some links point to the author's paid course and are only for deeper study, while the skill itself is MIT licensed. For isolation boundaries and project settings the skill asks for confirmation rather than guessing.
How to disable. Remove the skill with the manager you installed it with, for example npx skills@latest, or delete the skills/swift-concurrency folder from the skills directory. If installed as a plugin, remove it via /plugin.
Security check
- The skill consists of instructions and references; the agent changes code under the user's control
README in short
The README presents a skill of expert Swift concurrency guidance for any agent that supports the open Agent Skills format. The repository is packaged as a portable Agent Plugin with manifests for Claude Code, Cursor, Codex and pi, and installation is described via skills.sh, the OpenAI plugins directory, the Claude Code plugin, Cursor, Gemini CLI and manual copy. The skill covers choosing concurrency tools, safe race-free code, optimization, Swift 6 migration, testing and Core Data. The material is based on the author's Swift concurrency course, distilled into concise references. MIT licensed.
SKILL.md
--- name: swift-concurrency description: 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 concurrency-related compiler and linter warnings. --- # Swift Concurrency ## Fast Path Before proposing a fix: 1. Analyze `Package.swift` or `.pbxproj` to determine Swift language mode, strict concurrency level, default isolation, and upcoming features. Do this always, not only for migration work. 2. Capture the exact diagnostic and offending symbol. 3. Determine the isolation boundary: `@MainActor`, custom actor, actor instance isolation, or `nonisolated`. 4. Confirm whether the code is UI-bound or intended to run off the main actor. Guardrails: - Do not recommend `@MainActor` as a blanket fix. Justify why the code is truly UI-bound. - Prefer structured concurrency over unstructured tasks. Use `Task.detached` only with a clear reason. - If recommending `@preconcurrency`, `@unchecked Sendable`, or `nonisolated(unsafe)`, require a documented safety invariant and a follow-up removal plan. - Optimize for the smallest safe change. Do not refactor unrelated architecture during migration.
FAQ
Which agents does the skill work with?
Any that support the open Agent Skills format. The repository has manifests for Claude Code, Cursor, Codex and pi, and it installs via skills.sh, Gemini CLI or manually.
Is the skill paid?
No, the skill itself is MIT licensed. Only the author's course is paid; its links are given for deeper study.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything