본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)48k · #5913

swiftui-performance-audit

하는 일

이 도구는 SwiftUI 앱을 느리거나 반응하지 않게 만드는 문제를 찾아 고치도록 돕습니다. 코드를 분석하고, 필요하면 원인을 정확히 찾기 위해 성능 테스트 데이터를 요청합니다.

사용하는 경우

  • ✓SwiftUI 앱이 정보를 표시하는 데 느릴 때.
  • ✓목록이나 표에서 스크롤할 때 버벅거리거나 끊길 때.
  • ✓이유가 분명하지 않은데 앱이 메모리나 CPU를 너무 많이 쓰는 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/swiftui-performance-audit/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/swiftui-performance-audit/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 앱이 긴 목록을 스크롤할 때 버벅이는데, 원인이 무엇일 수 있나요?”

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

작동 방식

먼저 도구가 코드에서 속도 저하를 일으키는 흔한 실수를 살펴봅니다. 그것만으로 부족하면, 기기에서 특정 성능 테스트를 실행해 더 많은 데이터를 모으도록 안내합니다.

기술 내용 (원본 SKILL.md)

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

SwiftUI Performance Audit

Quick start

Use this skill to diagnose SwiftUI performance issues from code first, then request profiling evidence when code review alone cannot explain the symptoms.

When to Use

  • When the user reports slow rendering, janky scrolling, layout thrash, or high CPU in SwiftUI.
  • When you need a code-first audit plus Instruments guidance if profiling evidence is required.

Workflow

  1. Classify the symptom: slow rendering, janky scrolling, high CPU, memory growth, hangs, or excessive view updates.
  2. If code is available, start with a code-first review using references/code-smells.md.
  3. If code is not available, ask for the smallest useful slice: target view, data flow, reproduction steps, and deployment target.
  4. If code review is inconclusive or runtime evidence is required, guide the user through profiling with references/profiling-intake.md.
  5. Summarize likely causes, evidence, remediation, and validation steps using references/report-template.md.

1. Intake

Collect:

  • Target view or feature code.
  • Symptoms and exact reproduction steps.
  • Data flow: @State, @Binding, environment dependencies, and observable models.
  • Whether the issue shows up on device or simulator, and whether it was observed in Debug or Release.

Ask the user to classify the issue if possible:

  • CPU spike or battery drain
  • Janky scrolling or dropped frames
  • High memory or image pressure
  • Hangs or unresponsive interactions
  • Excessive or unexpectedly broad view updates

For the full profiling intake checklist, read references/profiling-intake.md.

2. Code-First Review

Focus on:

  • Invalidation storms from broad observation or environment reads.
  • Unstable identity in lists and ForEach.
  • Heavy derived work in body or view builders.
  • Layout thrash from complex hierarchies, GeometryReader, or preference chains.
  • Large image decode or resize work on the main thread.
  • Animation or transition work applied too broadly.

Use references/code-smells.md for the detailed smell catalog and fix guidance.

Provide:

  • Likely root causes with code references.
  • Suggested fixes and refactors.
  • If needed, a minimal repro or instrumentation suggestion.

3. Guide the User to Profile

If code review does not explain the issue, ask for runtime evidence:

  • A trace export or screenshots of the SwiftUI timeline and Time Profiler call tree.
  • Device/OS/build configuration.
  • The exact interaction being profiled.
  • Before/after metrics if the user is comparing a change.

Use references/profiling-intake.md for the exact checklist and collection steps.

4. Analyze and Diagnose

  • Map the evidence to the most likely category: invalidation, identity churn, layout thrash, main-thread work, image cost, or animation cost.
  • Prioritize problems by impact, not by how easy they are to explain.
  • Distinguish code-level suspicion from trace-backed evidence.
  • Call out when profiling is still insufficient and what additional evidence would reduce uncertainty.

5. Remediate

Apply targeted fixes:

  • Narrow state scope and reduce broad observation fan-out.
  • Stabilize identities for ForEach and lists.
  • Move heavy work out of body into derived state updated from inputs, model-layer precomputation, memoized helpers, or background preprocessing. Use @State only for view-owned state, not as an ad hoc cache for arbitrary computation.
  • Use equatable() only when equality is cheaper than recomputing the subtree and the inputs are truly value-semantic.
  • Downsample images before rendering.
  • Reduce layout complexity or use fixed sizing where possible.

Use references/code-smells.md for examples, Observation-specific fan-out guidance, and remediation patterns.

6. Verify

Ask the user to re-run the same capture and compare with baseline metrics. Summarize the delta (CPU, frame drops, memory peak) if provided.

Outputs

Provide:

  • A short metrics table (before/after if available).
  • Top issues (ordered by impact).
  • Proposed fixes with estimated effort.

Use references/report-template.md when formatting the final audit.

References

  • Profiling intake and collection checklist: references/profiling-intake.md
  • Common code smells and remediation patterns: references/code-smells.md
  • Audit output template: references/report-template.md
  • Add Apple documentation and WWDC resources under references/ as they are supplied by the user.

…

자주 묻는 질문

'레이아웃 스래싱(layout thrash)'이란 무엇인가요?

앱이 화면 요소의 크기와 위치를 반복해서 조정하려고 하는 상황입니다. 시간이 낭비되고 모든 것이 느려집니다.

'무효화 폭풍(invalidation storms)'이란 무엇인가요?

합당한 이유 없이 화면의 많은 부분이 동시에 업데이트되는 상황입니다. 성능 문제를 일으킵니다.

이 도구를 쓰려면 프로그래머여야 하나요?

전문가일 필요는 없습니다. 이 도구는 경험이 많지 않은 사람도 문제를 찾을 수 있도록 설계되었지만, 기본적인 코드 개념을 이해하면 도움이 됩니다.

상세 정보

작성자의 원본 설명

Audit SwiftUI performance issues from code review and profiling evidence.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5913
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬