본문으로 건너뛰기
Skillpedia
모바일 앱7.4k · #13248

swift-concurrency-expert

하는 일

이 스킬은 Swift 동시성에 관한 컴파일러 오류를 진단하고, 액터, 메인 스레드 격리, 공유 데이터에 대한 안전한 수정을 적용합니다. Swift 6 앱을 개발하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓Swift에서 액터, 격리, Sendable 타입에 관한 오류가 나올 때.
  • ✓백그라운드 작업을 메인 스레드에서 안전하게 옮겨야 할 때.
  • ✓기존 Swift 동시성 설정을 검토받고 싶을 때.

스킬 링크

https://github.com/steipete/agent-scripts/blob/main/skills/swift-concurrency-expert/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/steipete/agent-scripts/blob/main/skills/swift-concurrency-expert/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Xcode에서 뷰 모델에 Sendable 오류가 난다고 하네요. 가장 작고 안전한 변경으로 고쳐 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 정확한 컴파일러 메시지를 확보하고, 현재 액터 설정을 찾은 뒤, 동작을 그대로 유지하는 가장 작은 수정을 적용합니다. 스레드 안전성을 보일 수 없다면 안전하지 않은 지름길은 피합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Swift Concurrency Expert

Attribution: copied from @Dimillian’s Dimillian/Skills (2025-12-31).

Overview

Review and fix Swift Concurrency issues in Swift 6.2+ codebases by applying actor isolation, Sendable safety, and modern concurrency patterns with minimal behavior changes.

Workflow

1. Triage the issue

  • Capture the exact compiler diagnostics and the offending symbol(s).
  • Identify the current actor context (@MainActor, actor, nonisolated) and whether a default actor isolation mode is enabled.
  • Confirm whether the code is UI-bound or intended to run off the main actor.

2. Apply the smallest safe fix

Prefer edits that preserve existing behavior while satisfying data-race safety.

Common fixes:

  • UI-bound types: annotate the type or relevant members with @MainActor.
  • Protocol conformance on main actor types: make the conformance isolated (e.g., extension Foo: @MainActor SomeProtocol).
  • Global/static state: protect with @MainActor or move into an actor.
  • Background work: move expensive work into a @concurrent async function on a nonisolated type or use an actor to guard mutable state.
  • Sendable errors: prefer immutable/value types; add Sendable conformance only when correct; avoid @unchecked Sendable unless you can prove thread safety.

Reference material

  • See references/swift-6-2-concurrency.md for Swift 6.2 changes, patterns, and examples.
  • See references/swiftui-concurrency-tour-wwdc.md for SwiftUI-specific concurrency guidance.
자주 묻는 질문

앱의 동작이 바뀌나요?

데이터 경합 안전 규칙을 지키면서 동작 변경을 최소화하는 것을 목표로 합니다.

검사되지 않은 Sendable은 언제 허용되나요?

스레드 안전성을 증명할 수 있을 때에만 허용된다고 스킬이 설명합니다.

어떤 Swift 버전을 대상으로 하나요?

Swift 6.2 이상입니다.

상세 정보

작성자의 원본 설명

Swift concurrency review/fix: compiler errors, Sendable, isolation, remediation.

repo: steipete/agent-scripts

인기도

GitHub 스타
7.4k
순위
#13248
라이선스
MIT
업데이트
2026. 10. 30.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬