본문으로 건너뛰기
cccskills
무료GitHub에 공개

guide-swift-concurrency

Swift concurrency patterns — actors, structured concurrency, cancellation, async streams, GCD migration, strict-concurrency diagnostics, common bug patterns. Use when writing, reviewing, or debugging concurrent Swift code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(13)

  • SKILL.md3.4 KB
  • references/actors.md5.3 KB
  • references/async-streams.md2.1 KB
  • references/bridging.md2.9 KB
  • references/bug-patterns.md4.1 KB
  • references/cancellation.md3.6 KB
  • references/diagnostics.md4.4 KB
  • references/hotspots.md2.3 KB
  • references/interop.md3.6 KB
  • references/new-features.md7.7 KB
  • references/structured.md3.0 KB
  • references/testing.md8.1 KB
  • references/unstructured.md2.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Guide Skill — This is an expert workflow/pattern guide, not API reference documentation. Originally from twostraws/Swift-Concurrency-Agent-Skill by Paul Hudson. MIT License.

Swift Concurrency Patterns

Review and write Swift concurrency code for correctness, modern API usage, and adherence to project conventions. Report only genuine problems — do not nitpick or invent issues.

Core Instructions

  • Target Swift 6.2 or later with strict concurrency checking.
  • Prefer structured concurrency (task groups) over unstructured (Task {}).
  • Prefer Swift concurrency over GCD for new code. GCD is still acceptable in low-level code, framework interop, or performance-critical synchronous work.
  • Do not suggest @unchecked Sendable to fix compiler errors — prefer actors, value types, or sending parameters.

Review Process

  1. Scan for known-dangerous patterns using references/hotspots.md.
  2. Check for Swift 6.2 concurrency behavior using references/new-features.md.
  3. Validate actor usage for reentrancy and isolation using references/actors.md.
  4. Ensure structured concurrency is preferred using references/structured.md.
  5. Check unstructured task usage using references/unstructured.md.
  6. Verify cancellation handling using references/cancellation.md.
  7. Validate async stream and continuation usage using references/async-streams.md.
  8. Check bridging code between sync and async using references/bridging.md.
  9. Review legacy concurrency migrations using references/interop.md.
  10. Cross-check against common failure modes using references/bug-patterns.md.
  11. If strict-concurrency errors exist, map diagnostics to fixes using references/diagnostics.md.
  12. If reviewing tests, check async test patterns using references/testing.md.

If doing partial work, load only the relevant reference files.

References

TopicReference
Grep targets for code review — known-dangerous patternsreferences/hotspots.md
Swift 6.2: default isolation, @concurrent, Task.immediate, isolated deinitreferences/new-features.md
Actor reentrancy, global actor inference, isolation patternsreferences/actors.md
Task groups, async let, withDiscardingTaskGroup, concurrency limitsreferences/structured.md
Task vs Task.detached, when Task {} is a code smellreferences/unstructured.md
Cooperative cancellation, withTaskCancellationHandler, broken patternsreferences/cancellation.md
AsyncStream.makeStream(of:), continuation lifecycle, back-pressurereferences/async-streams.md
Checked continuations, wrapping delegates, @unchecked Sendablereferences/bridging.md
GCD migration, Combine to AsyncSequence, completion handlers, locksreferences/interop.md
Common concurrency failure modes LLMs produce and their fixesreferences/bug-patterns.md
Strict-concurrency compiler errors mapped to likely fixesreferences/diagnostics.md
Async test patterns, race detection, avoiding timing-based testsreferences/testing.md

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

apple-aso

무료

Optimize Apple App Store metadata in store.config.json for ASO (App Store Optimization). Use when working with store.config.json, App Store keywords, titles, subtitles, descriptions, or localizing app metadata. Helps maximize app visibility and downloads.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Prisma-Labs-Dev/apple-skills3472026년 9월 26일 업데이트

Index of Apple developer documentation for iOS, macOS, and related frameworks. Use when looking up what APIs exist in a framework, browsing available documentation, or deciding what docs to fetch. Covers SwiftUI, UIKit, Core Animation (QuartzCore), XCTest, HealthKit, Combine, SwiftData, and more.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Prisma-Labs-Dev/apple-skills3472026년 9월 26일 업데이트

API reference: BackgroundTasks. Query for BGTaskScheduler, app refresh, background processing.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Prisma-Labs-Dev/apple-skills3472026년 9월 26일 업데이트

combine

무료

API reference: Combine. Query for publishers, subscribers, operators, async data streams.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Prisma-Labs-Dev/apple-skills3472026년 9월 26일 업데이트

API reference: Core Animation (QuartzCore). Query for CALayer, CAAnimation, CABasicAnimation, CAKeyframeAnimation, CASpringAnimation, CATransaction, CAShapeLayer, CAGradientLayer, CAEmitterLayer, CATransform3D, CADisplayLink.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Prisma-Labs-Dev/apple-skills3472026년 9월 26일 업데이트

API reference: Core Haptics. Query for CHHapticEngine, haptic patterns, tactile feedback.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Prisma-Labs-Dev/apple-skills3472026년 9월 26일 업데이트

Prisma-Labs-Dev의 스킬 모두 보기

이 스킬의 문제 신고