swift-concurrency

Swift Concurrency Patterns

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "swift-concurrency" with this command: npx skills add ravnhq/ai-toolkit/ravnhq-ai-toolkit-swift-concurrency

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 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 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

  • Identify whether the request clearly matches swift-concurrency scope and triggers.

  • Apply the skill rules and referenced guidance to produce a concrete result.

  • Validate output quality against constraints; if gaps remain, refine once with explicit assumptions.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

core-coding-standards

No summary provided by upstream source.

Repository SourceNeeds Review
General

promptify

No summary provided by upstream source.

Repository SourceNeeds Review
General

tech-react

No summary provided by upstream source.

Repository SourceNeeds Review
General

platform-frontend

No summary provided by upstream source.

Repository SourceNeeds Review