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

swiftui-pro

하는 일

Apple SwiftUI 코드를 최신 관행과 접근성 규칙에 비추어 신중하게 검토하는 방법을 안내합니다. 집중된 검토를 원하는 iPhone 및 iPad 앱 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓개발자가 출시 전에 SwiftUI 코드 검토를 요청할 때.
  • ✓개발자가 기존 앱에서 지원 중단된 SwiftUI API를 찾고 싶을 때.
  • ✓개발자가 앱이 Dynamic Type, VoiceOver, Reduce Motion과 함께 작동하는지 확인하려 할 때.

스킬 링크

https://github.com/twostraws/SwiftUI-Agent-Skill/blob/main/swiftui-pro/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“제 SwiftUI 화면에서 오래된 API와 접근성 문제를 검토하고, 실제 문제만 목록으로 보여 주세요.”

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

작동 방식

스킬은 API, 데이터 흐름, 탐색, 레이아웃, 접근성, 성능 등 고정된 점검 항목을 차례로 확인하며, 실제 문제만 보고합니다.

기술 내용 (원본 SKILL.md)

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

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

Include deprecated API in review findings. During feature work or bug fixes, complete the requested change and suggest unrelated modernization separately; do not apply it without being asked.

Review process:

  1. Check for deprecated API using references/api.md.
  2. Check that views, modifiers, and animations have been written optimally using references/views.md.
  3. Validate that data flow is configured correctly using references/data.md.
  4. Ensure navigation is updated and performant using references/navigation.md.
  5. Ensure the code uses designs that are accessible and compliant with Apple's Human Interface Guidelines using references/design.md.
  6. Review layout behavior as windows resize, including iPad multitasking and folding iPhone Duo, using references/resizability.md.
  7. Validate accessibility compliance including Dynamic Type, VoiceOver, and Reduce Motion using references/accessibility.md.
  8. Check localized text, formatting, and resource handling using references/localization.md.
  9. Ensure the code is able to run efficiently using references/performance.md.
  10. Quick validation of Swift code using references/swift.md.
  11. Final code hygiene check using references/hygiene.md.

If doing a partial review, load only the relevant reference files.

Keep references/performance-plus.md out of routine reviews. Load it for a requested deep performance review; its more involved changes can also help investigate an established performance problem.

Core Instructions

  • iOS 27 exists, and is the default deployment target for new apps.
  • Xcode 27.1 and the corresponding 27.1 platform releases are available. Do not dismiss their APIs as speculative.
  • iPhone Duo is a folding iPhone, with a small outer display and a large inner display.
  • Check the project's deployment target before applying version-specific advice. Use newer runtime APIs only when the target supports them or within an appropriate #available check. Keep the existing target unchanged. Requirements tied to an Xcode version also need that toolchain; a runtime check cannot make an older SDK recognize a new declaration.
  • Target Swift 6.4 or later, using modern Swift concurrency.
  • As a SwiftUI developer, the user will want to avoid UIKit unless requested.
  • Do not introduce third-party frameworks without asking first.
  • Break different types up into different Swift files rather than placing multiple structs, classes, or enums into a single file.
  • Use a consistent project structure, with folder layout determined by app features.

Output Format

Organize findings by file. For each issue:

  1. State the file and relevant line(s).
  2. Name the rule being violated (e.g., "Use foregroundStyle() instead of foregroundColor()").
  3. Show a brief before/after code fix.

Skip files with no issues. End with a prioritized summary of the most impactful changes to make first.

Example output:

ContentView.swift

Line 12: Use foregroundStyle() instead of foregroundColor().

// Before
Text("Hello").foregroundColor(.red)

// After
Text("Hello").foregroundStyle(.red)

Line 24: Give the button a descriptive label so VoiceOver explains its action.

// Before
Button(action: addUser) {
    Image(systemName: "plus")
}

// After
Button("Add User", systemImage: "plus", action: addUser)

Line 31: Avoid Binding(get:set:) in view body – bind to the property directly and move the setter's side effect into onChange().

// Before
TextField("Username", text: Binding(
    get: { model.username },
    set: { newValue in model.username = newValue; model.save() }
))

// After
TextField("Username", text: $model.username)
    .onChange(of: model.username) {
        model.save()
    }

Use onChange() when saving should follow changes to the username, including programmatic changes. Equal-value assignments will not trigger a save.

Summary

  1. Accessibility (high): The add button needs an “Add User” label; the symbol’s default label does not explain what will be added.
  2. Deprecated API (medium): foregroundColor() on line 12 should be foregroundStyle().
  3. Data flow (medium): The manual binding on line 31 is fragile and harder to maintain.

End of example.

References

  • references/accessibility.md - Dynamic Type,
자주 묻는 질문

묻지 않고 코드를 바꾸나요?

기능 작업 중에는 요청된 변경을 마무리하고, 다른 업데이트는 따로 제안합니다.

접근성도 다루나요?

네. Dynamic Type, VoiceOver, Reduce Motion 지원을 확인합니다.

모든 스타일 문제를 보고하나요?

아니요. 사소한 지적을 피하고 실제 문제만 보고하도록 되어 있습니다.

상세 정보

작성자의 원본 설명

Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. Use when reading, writing, or reviewing SwiftUI projects.

repo: twostraws/SwiftUI-Agent-Skill

인기도

GitHub 스타
6.4k
순위
#14193
라이선스
MIT
업데이트
2026. 10. 26.

이 스킬이 유용한가요?

0

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

댓글

  • …

비슷한 스킬